HNHacker News
TopNewBestAskShowJobs

sqrt17

1,299 karma · joined April 11, 2010

submissionscomments
sqrt17··on “No, we’re telling everyone we are using Java”
> moving from spaghetti Python code to well-structured Java

Python code quality is more a consequence of its beginner-friendliness (and subsequent prevalence of inexperienced programmers) than of the language itself. Similarly, the range of Java code I've seen goes from spaghetti within spaghetti (i.e. lack of structuring at both code and class/package level) over to extremely well-structured code

sqrt17··on Are Headers in C++ the Problem?
The problem may be not headers itself, but that there are so many ways to split the compilation and build artefacts in a project.

Java and (Turbo/Free) Pascal try to have few ways of dividing the materials: Java has class files (and Jar files, and modules), Turbo Pascal has Units. Both involve having a certain namespace correspond to some file the compiler can find and compile, and where you then use the definition from the compiled file.

Python and JavaScript/TypeScript have modules as namespaces that correspond to one source file - if you import a symbol from a module "bar/foo", the compiler will look in "bar/foo.js" (or a dozen places in node_modules, or in a dozen eggs), and if foo.js doesn't have that symbol you know something is wrong instead of wondering if there are other files that contribute to that namespace.

Lisp and C/C++ have a tradition that goes back far enough that compilation units and namespaces (packages in Common Lisp) are disjoint things. C++ is on the path to making this more complicated with the addition of modules that create another portioning of the compiled stuffs without forcing the others (headers, namespaces, source files) to agree with it.

So, headers are not the problem - it's that for a given entity in the source code (namespace, class, function, whatever) it's not automatically clear to the compiler where to look for it. Which effectively leads to the funky ball of dependencies between source files being variously manually specified in (auto-, C-)make files as well as extracted automatically and still being error-prone.

sqrt17··on Generating C code that people want to use
> Why should they demand that GHC generate readable C if it were generating C instead of assembly?

Debugging in programs that are mixed C and other code. If you're in the middle of debugging Firefox (or any composed system) and start stepping through unstructured gobbledegook, you'll end up cursing the people who did this to you.

This becomes less of an issue if/when the non-C language becomes so ubiquitous that there is proper debugging support for it (viz Python or C++ support in gdb), but as long as a bug may be triggered, propagated or otherwise be interacted from the non-C side, you want that code easily readable.

sqrt17··on Lombok makes Java cool again
The difference is more in a "batteries included" sense - Python values developer productivity and gives you what you need, similarly Haskell which is on the opposite end of a Dynamic vs Static spectrum, while Java was traditionally more oriented towards stability and predictability and partly attached to the old-school cool of potato programming.
sqrt17··on Windows 10 refutes the idea that the Linux kernel is what defines GNU/Linux
Even the strictly GNU parts are in the minority in modern Linux usage. There are dozens of libraries, some GPL and some X11/zlib/Apache licensed but most of them not part of the "GNU project". Some parts only run on Linux and Linux-compatible systems because they were built on top of Systemd or other Linux-only software.

FreeBSD has had a Linux emulation layer for quite a long time, so in that sense you can of course have a Linux environment without a Linux kernel, just as you can have (with WINE or ReactOS) a Windows environment without the Windows kernel.

sqrt17··on WeWork’s CEO Makes Millions as Landlord to WeWork
> Now, in a system that has the rule of law you cannot be prevented to do something that isn't illegal.

In a systme that has the rule of law, the lawmakers can choose to make certain behaviours legal if or when they harm the society. For example, private and corporate tax loopholes can be closed, and corrupt behavior can be outlawed or a liability instituted that the harmed party can claim.

It's childish not to blame capitalist governments for allowing certain kinds of corruption that are left to fester.

sqrt17··on Node-Red – Flow-Based Programming for the Internet of Things
It's pretty easy to end up with spaghetti, even for tasks that are <500 lines when you'd write them out in actual code. It's great for some quick do-A-if-B-happens scenarios, though.
sqrt17··on Flair: A simple framework for natural language processing
Google and Amazon have proprietary datasets for important sub-tasks (e.g. recognizing "consumer good" entities, or more accurate sentiment recognition, or supporting other languages better) that are not available to the public.

In other words, if your problem looks like one of the benchmarking tasks in NLP research (e.g. recognizing persons and locations in fluent text) you can expect good performance out of open source tools. If you go beyond that, you have to concoct your own dataset and/or use proprietary cloud services.

sqrt17··on Flair: A simple framework for natural language processing
It solves different problems. flair doesn't include parsing, Spacy doesn't support embeddings, gensim doesn't do tagging or parsing at all but contains the most practical word2vec implementation. NLTK is nice for learning, but don't use it in production unless you're ready to reimplement things in a more efficient way when parts start falling off.

The message is - again - learn about the mental framework, not individual tools, to understand where each strengths are and what the gaps are in between them. Or choose a problem, find the best tool for that problem and get progressively better at the tool(s) that helps you with most of your problems.

sqrt17··on Flair: A simple framework for natural language processing
Here's the thing: the authors, and most people in the NLP community (as opposed to people who can use off-the-shelf tools and nothing more) know how to get better performance on other domains. It's just that "it requires some adjustments and manual labour" doesn't add anything to the "deep learning solves the problem" narrative that is predominant in research articles and most blog posts on the topic.

On the other hand, you can bet that actual practice in Zalando (the authors are all from Zalando's reasearch lab) involves more regexes and retraining models on proprietary datasets and less using off-the-shelf models and hope they stick.

No one claims either that you can solve every Vision problem with a model trained on ImageNet - you'd do transfer learning, or for non-understanding problems (estimating colors and contrast or anything else that's unrelated to objects in the image) you'd use something else that doesn't involve deep learning models at all.

sqrt17··on Fixing a Tough Memory Leak in Python
The title seems to suggest that there's a memory leak in (C)Python, and while it's tedious to debug mixed Python+C code it's a Nice Numba memory leak rather than one in Python or numpy.
sqrt17··on Haskell to Perl 6
Javascript has `I have ${n} apples`, or even `This is chapter ${i+1}.`

In terms of interpolation, that's the variant that I like best.

sqrt17··on Show HN: An experimental code search engine
It seems to highlight matches both within strings and as normal identifiers (e.g. to_csv finds matches within strings)
sqrt17··on Amazon Quantum Ledger Database
... it also makes perfect sense as a ruse if you figure all those buzzword-chasing QuantumComputinAIDeepLearningBlockchainOfThings will be flocking around something that is not just useful but also buzzword compatible.

IBM has spent a bit of money drumming up all things Quantum (while being at most moderately more successful at actual useful QC implementation), it would be ironic if some of the buzz (in people who think Quantum is the "next big thing" without knowing how actual current QC would benefit them) now transfers to something useful and real but not-QC

sqrt17··on You should never spend $825K on a domain – but here’s why I’m glad I did
> presumably the domain name is a capital asset that preserves its basis

the domain name doesn't have an inherent value or basis, it's (presumably) unlikely that the next Cover Inc would be willing the same amount within a short timeframe of them wanting to disinvest from the name. Illiquid assets have to pay for liquidity in such cases.

sqrt17··on In Defense of “Mindless Rote” (2001)
The article shows a confusion between training (committing things to muscle memory, or to visual patterns that can be recognized or executed) and teaching (a deeper understanding of a thing). Training is always more testable than teaching, yet for the most part the things we test people on (e.g. multiplication of small numbers, solving quadratic equations) are only evidence that something like mathematical skill and understanding is building up rather than the desired thing itself.

Rote memorization is a skill that's quite useful, but it's only one skill among many others that people should take away from school or university. And just as it's wrong to dismiss certain teaching as "just" rote memorization (e.g. knowing vocabulary in a foreign language) it's also wrong to just omit the teaching part altogether and train people to do well on standardized tests.

sqrt17··on Ask HN: Is neuroscience-inspired machine learning the next big thing?
Our understanding of the neural tissue of the brain - as well as what it's actually doing are so poor, and the needs of what we're doing so different that there's a greater chance that our understanding of neural tissue is improved by developing our understanding of deep learning than the other way around.

To put it in bird flight analogy, by constructing airplanes and making it an exact science, we're able to get a much finer understanding of the pricipal problems in flight and get to appreciate the difference between the flight of colibris and bumblebees (who can't fly by gliding but must beat their wings frenetically) versus larger birds (which can fly by gliding, more closely resembling plane flight).

sqrt17··on Ask HN: How can I learn to read mathematical notation?
Ng's Coursera course will teach you what happens in Deep Learning and Machine Learning, but at least the Deep Learning course is very very light on the math side and avoids scary mathematics rather than making it accessible.

Without having read it, I'd recommend the "preliminary maths" part of Bengio et al's Deep Learning book - it teaches both the letters and the language, so to speak, and if the language isn't for you, you'd better throw away the papers and completely concentrate on reading and understanding the implementations that are our there, using the implementation first and foremost and the paper only as a backup to provide explanations when the implementation does mysterious or unexplained things.

You can do deep learning productively without having a PhD, but you won't be able (nor obliged) to read and understand PhD-level academic papers unless you have a solid (i.e., maths or physics or math-rich CS BSc) maths background.

sqrt17··on A story about Upwork and freelancers
With the raise of all these "platform" companies - basically some inbetween that solves some QA and paperwork issues, we see that (i) there are "natural" monopolies/monopsonies developing (e.g. people don't look further than Amazon marketplace, companies giving out all their work via upwork, people watching only Youtube videos) and then (ii) that these platform companies start behaving in abusive and/or arbitrarily damaging ways.

Does anyone else think that this should be an issue for targeted regulation? No one would accept a company taking over the road network and then randomly trashing people's cars for incomprehensible reason, yet people seem to be dreamy-eyed and naive about these new inbetween platform companies and seem to think that the market will solve itself. (Which is - as may be known - not the case with monopolies)

sqrt17··on Zig: software should be perfect [video]
There are still plenty of exceptions that are unchecked, i.e. subtypes of RuntimeException, which do not have to be declared on the callee. As well as people who think it's a good idea to throw instances of Exception and just tack a "throws Exception" on their methods.
sqrt17··on MongoDB switches up its open source license
I can't tell whether this is serious or sarcastic. It lacks the "/s" at the end, so I'll assume that you're serious.

> but it's not open source unless you know the OSI's definition. > Open source is an agreed upon definition for software provided under an OSI or FSF approved license.

Open source software (by today's standards) existed before the OSI or even the term "Open Source" existed - the creators of BSD *nix, X11 and TeX all chose a liberal, open source license before a cabal around Eric S. Raymond would decide on a definition of Open Source and the term itself. The idea came after the actual thing existed, and the definition after the idea. So it would be weird to call something Open Source that doesn't fit the Open Source Definition (because the latter was conceived together with the term), but it would absolutely be possible for a software/license to be Open Source without knowing about the Open Source Definition, as is the case with BSD, X11, TeX and many Free Software programs.

Next, there is the idea of the Open Source Initiative approving Open Source licenses, which is a good thing because people can trust any OSI-approved license to be an Open Source license. However, not every Open Source license is OSI-approved, because OSI applies additional criteria (e.g. being reusable).

So, yes, it's possible for a license to be Open Source but not OSI approved, when it fits the Open Source Definition but hasn't been submitted, not reviewed, or doesn't meet the additional criteria set forth by the OSI.

The fact that your employer's legal department will mistrust your personal judgement of software fitting the Open Source Definition (for perfectly sensible reasons) doesn't make software not Open Source (any more than a US State can decide to make Pi a rational number or to make dolphins be fish).

sqrt17··on Ask HN: What discontinued company/product do you wish was still around?
I remember distinctly when someone introduced Google (ca 1999) to me as an Altavista alternative where the good results were actually on the first page. As in, with Altavista you needed to rummage through the first couple pages (luckily back then you only had a couple pages' worth of results) to find what you were looking for.

Maybe what we miss is not exactly Altavista but a mid-2000s Google, also with the low occurrence of spam and sponsored content that we had back then. How about duckduckgo, does it fit the bill?

sqrt17··on Tale of Three Probabilistic Families: Discriminative, Descriptive and Generative
The text misappropriates (or, to use a more positive term, re-purposes) the notions of generative and discriminative models.

* Classically, a generative model is one that describes a statistical process that generates a whole observation (maybe plus some hidden part) and thus gives you scores that are consistent between different observations. An example for this would be (unidirectional) language models, where the total probabilities for different possible sentences can be compared

* Classically, discriminative models are models where you also get a probability over outputs, but only conditional on some observed facts. As an example, a CNN transforms an image to logits that express the likelihood of different classes for this image. Hence, CNNs (used in this fashion) are a form of discriminative modeling.

If we map this to their "probabilistic families", Generative Models (in the old sense) would be Descriptive in their book, while Discriminative stays Discriminative.

The closest counterpart to their "Generative" models would be generative (in the old sense) models that assume a common distribution over hidden variables and a process that generates the actual output. However, this only loosely fits how GANs are used today, where you don't really assume a distribution over the hidden seed for an output, and where you get a single output (i.e. a deterministic function from seed to output instead of a distribution).

Neural networks have deterministic functions where MRFs and Gibbs sampling and all the pre-2012 machine learning goodies have probability distributions. It's not really helpful to use the term "probabilistic families" here when the most important bits of what they describe are non-probabilistic.

sqrt17··on Payday loans are coming for everyone
One indication that this isn't B2B is the use of WorkMarket instead of dealing with gig workers in a B2B fashion. The stated value-add of WorkMarket is to allow businesses to manage their "freelancers and independent contractors".

So businesses take a cut out of the budget to hand it over to a "management" company to sort out the paperwork, and they require their gig workers to provide liquidity to the client business via net30/60/90 terms.

One has to be blind or stupid to call this a B2B relationship in the sense of two equals dealing with each other.

sqrt17··on New Artificial Intelligence RPA Tool
RPA is mostly buzzword these days but this doesn't seem to be RPA. But "BI chatbot" probably sounds quite a bit less exciting...

Also, it's quite obvious that setup costs will realistically dwarf the 99$/month it costs to keep a running instance around

sqrt17··on Magic Angle Sculpture
1. Extrude each figure 2. Rotate to the respective angles that the figures will be seen at 3. Form intersection of the three(?) rotated extrusions 4. ??? 5. Profit

I was mildly puzzled at all the pseudoscientific gobbledigook that the artist put on his webpage - it definitely takes some crafting experience but then it's not rocket science either

sqrt17··on FrontPage 98: Elegant and Exquisite (1997)
> don't forget to test your site at 640x480 with 256 colors.

Don't forget: you couldn't (or shouldn't) bring your own 256 color palette, because the actual palette would be a compromise between all the applications open - so you were forced/encouraged to use the "Web palette", which contained a fixed set of 216 colors.

sqrt17··on Reazon – miniKanren for Emacs
Snarky aside: you can also install a real Prolog (e.g. SWI Prolog) and run that in an Emacs session, and will be more performant and expressive than anything you would build on top of Emacs Lisp
sqrt17··on Why I never finish my Haskell programs
It's not - it starts with the unit coefficient (1), then x (-3), then x^2 (0), then x^3 (1). Some things become easier this way - including addition of polynomials of differing degree - and as an added bonus you can phantasize about representing power series as (lazy) infinite lists.
sqrt17··on Open source takes continued investment, and that must be subsidized somehow
There's Redis (OSS), Antirez (OSS developer), and RedisLabs (commercial company and employer of Antirez).

RedisLabs made some extra software available (nice) under a noncommercial-only license (well duh but ok), pretending some material relation between the noncommercial-use-only license and the Apache License (not nice).

The pitchforks and torches are (to 98%) about that last bit. Everyone is happy that Redis still exists and that Antirez and RedisLabs have a sustainable business around Redis. No one - and potentially especially not the Apache foundation - enjoys the bait-and-switch of using the Apache name for a proprietary shared source license.

← PreviousPage 4 of 15Next →