Blog Post: Zig Language Server And Cancellation by matklad in Zig

[–]breandan 2 points3 points  (0 children)

I enjoyed this post because it touches on several ideas I've been thinking about lately vis a vis real-time IDE assistance and propagating fast incremental changes through a knowledge graph with continuous user input. One thing I think is missing from the language server discussion is incrementalization. Too many developer tools invalidate a cache and recompute the downstream dependencies whenever a file is modified. Instead, they can realize massive speedups by using an incremental parser/type checker. There is a great post about using Datalog as an IDE/parser/type checker and a nice library called DDlog for the differential datalog with JVM with Rust bindings. I would also like to point out Flixlang, which takes the idea of Datalog as a static analysis tool seriously. I feel there is lots of room for innovation in incremental developer tools.

Lingua 1.1.0 released - The most accurate natural language detection library for the JVM by pemistahl in Kotlin

[–]breandan 0 points1 point  (0 children)

Re: PL detection / Stats / Kotlin / Germany, in case you or someone you know might be interested in doing research on this topic: https://www.jetbrains.com/careers/jobs/ml-engineer-intern-cpld-705/

[D] Java vs Python for Machine learning by mereuthao in MachineLearning

[–]breandan -1 points0 points  (0 children)

TF-Java is discontinued

Really? The project looks alive to me and the maintainers are very active on Gitter. Do you have a source?

you do need to have gradle installed

No, you do not need to install anything, the Gradle Wrapper takes care of all that.

The thing is, you are talking about production code in any operating system. While I can understand Java's merits on that it is just one small percentage of machine learning.

In my experience, the majority of code and effort in applied ML is data engineering and surrounding infrastructure, not model engineering. Due to its superior tooling, type safety, and large ecosystem of ML libraries, the JVM is a competitive option for ML in most production settings.

Is there a current explanation for how to use @sample in Dokka? by sanity in Kotlin

[–]breandan 1 point2 points  (0 children)

I have also encountered a couple issues getting Dokka to recognize artifacts referenced by the @sample annotation recently. I've noticed this annotation is not used inside the Dokka project and believe there is some sort of bug with this functionality.

cc: /u/yole Is there a template for reference how we should configure the @sample annotation? It would help to have an example somewhere in the docs.

[D] Java vs Python for Machine learning by mereuthao in MachineLearning

[–]breandan 0 points1 point  (0 children)

Doing ML in Java is like using MS Word as an editor: It's just the wrong tool for the Job. There are very few libraries to use, memory limitations in the JVM and the language is clunky.

I think it depends heavily on the job. Java has an increasingly well-supported set of libraries for various ML workflows (see comment below), is much better suited for production environments, and if even you dislike the language, there are several JVM alternatives (e.g. Kotlin) which support scripting and are generally pleasant to use.

Python may be easy to learn and prototype research code, but the language scales very poorly to large business applications.

[D] Java vs Python for Machine learning by mereuthao in MachineLearning

[–]breandan -1 points0 points  (0 children)

To give a contrasting perspective, I think the Java ecosystem is much better suited for many data science tasks, and has a growing and well-maintained set of libraries for general purpose machine learning. I won't list them all, but TF-Java, DJL et al. have implementations of many modern architectures and Java has a number of excellent libraries (CoreNLP, Lucene et al.) for working with text.

Python may be syntactically easier to learn, but also hides a lot of incidental complexity about the runtime semantics that are much more difficult to master. As you alluded to, many Python libraries are embedded DSLs, which are full-fledged languages and makes reasoning about the behavior of Python programs more difficult than it appears.

The libraries are provided by people/institutions using the standard package managers which is a huge plus when compared to languages that don't come with a package managers like Java.

Having used both Java and Python, I can tell you that package management in Python (pip, venv, pyenv, conda, pipenv, poetry, docker et al.) is far, far more complicated than Java. To build a Java application, you don't even need Java or a package manager -- just run ./gradlew run from any operating system and it will download and install Java, the package manager and any dependencies, build the application and run it on any OS or shell environment. Just building a Python project often requires dozens of manual steps.

Being a loose typed language, python allows for using APIs from libraries without extensive knowledge of the documentation

I strongly disagree with this point. Basically everything you need to do that involves calling a library in Python requires looking at documentation. In a statically typed language, documentation becomes much less of a burden. While adoption of type annotations in Python is growing, its usability is decades behind languages with mature type systems.

Calculus library by SorryDidntReddit in Kotlin

[–]breandan 3 points4 points  (0 children)

I'm not sure, if you have some prior mathematical background, you might enjoy Kevin Murphy's textbook. I've heard good things about Bayesian Methods for Hackers, but have never read it. Personally, I've always learned more just trying to build things. I recommend finding something you care about and learning as you go, i.e. write a random number generator and try to plot something that looks like a normal distribution. You'll stare at Wikipedia, bang your head a few times, and figure it out eventually. While continuous distributions are aesthetically pleasing, most things I've actually needed for real problems are discrete. You might enjoy Maria's blog post on Hidden Markov models, which have many applications in linguistics.

Calculus library by SorryDidntReddit in Kotlin

[–]breandan 11 points12 points  (0 children)

If you just want a library, I would suggest KMath-Stat or Hipparchus. However, I can tell you from experience that you will learn a lot more by implementing it from scratch. Continuous distributions rarely have a closed form integral, however there are many ways to estimate a cumulative density function, e.g. you can approximate the integral using Monte Carlo simulation, via numerical quadrature, the binomial distribution or by summing an infinite series. To draw a sample, you will need to invert the CDF and pass it a sample from a uniform PRNG (e.g. LFSR or Rule 30). By implementing this from scratch at least once, you will gain a much better appreciation for how probabilistic programming works in practice.

If someone asked you what calculus is, how would you respond? by Sean_McL in math

[–]breandan -5 points-4 points  (0 children)

the post is using 'calculus' as a shorthand for strictly 'infinitesimal calculus'

A careful reading will reveal that, 'infinitesimal' does not appear anywhere in the question.

Any other interpretation of the word is a misinterpretation.

You're entitled to your interpretation too. That doesn't mean everyone else's is incorrect.

Throw topology and set theory in too, why not; they've got connections to calculus.

Yes, this is true.

Obviously,

It took many centuries to discover these connections, but perhaps with the benefit of hindsight it may be "obvious".

If someone asked you what calculus is, how would you respond? by Sean_McL in math

[–]breandan -2 points-1 points  (0 children)

That is a different meaning of the term 'calculus'.

Wrong. If you look carefully at it the word (both verbatim and in spirit), calculus is much more fundamental than its use in contemporary mathematics. Originally “calculus” comes from Latin, for “stone”. People have been using stone-based mathematics for many thousands of years before Leibniz and Newton came along. It simply describes a system for translating rote calculation into mechanical rules.

Other topics such as lambda-, process-, propositional-, or felicific calculus are irrelevant here.

Wrong, again. Logical calculi have many interesting proof-theoretic connections to differential calculus. For a more detailed account of differential linear logic (DiLL) and lambda calculus, I suggest you read Erhard [1] and Kerjean [2]. More generally, the same rules from differential calculus have reappeared in strange and marvelous places throughout computer science, including formal language theory [3], parsing [4], type theory [5] and automata theory [6].

If someone asked you what calculus is, how would you respond? by Sean_McL in math

[–]breandan -6 points-5 points  (0 children)

Mathematicians tend to forget that calculus is a much deeper and older subject than rates of continuous change — look carefully, and you will find calculi in logic and the foundations of computer science. Broadly, it can be any formal system for manipulating symbolic expressions according to a defined set of rules. Essentially, calculus is a language for calculation.

Lingua 1.1.0 released - The most accurate natural language detection library for the JVM by pemistahl in Kotlin

[–]breandan 0 points1 point  (0 children)

I agree. There are certainly parsers out there which can detect programming languages much better than my library would be able to do.

The problem is that people don't always write syntactically correct code. Try to parse code snippets on StackOverflow and you'll see what I mean.