3 ms·
The best way to avoid dependencies is to use a language that is built in a way such that dependencies are worthless. Like APL, J, or kdb+/q. All of these langua
by smabie 6y ago
The best way to avoid dependencies is to use a language that is built in a way such that dependencies are worthless. Like APL, J, or kdb+/q. All of these languages are incredibly small, have almost non-existent standard libraries, and yet are designed in such a way that a large standard library becomes superfluous.
Having a large standard library speaks poorly of the composability and orthogonality of language primitives.
- yoz-y 6y agoSure, if the problems you are solving are well suited for languages like APL, J or kdb+/q...
- smabie 6y agoCall me an iconoclast, but I think array languages are more suitable for general purpose programming than even general purpose languages.
- rrampage 6y agoAs someone who is not well versed in APL/J/K, how do they deal with structured data like JSON? Is there some sort of DSL like jq built into them?
- smabie 6y agoBecause kdb+/q has such few datatypes and you can't define anymore, it's very easy: q) .j.k"[2.2, 3.5]" 2.2 3.5 Serialization is also trivial: q) .j.j 0 1 2 3 "[0,1,2,3]" In general, sending stuff across memory boundaries (files, network, ram, etc) is exceedingly trivial in kdb+/q. To execute a function on a remote server, simply connect to a server and send across the call to the handle. For example, to send synchronously compute 1+1: q) h:hopen `::6666 q) h(+;1;1) 2 You can send over anything you want, even the entire source code of program to be executed! This is a really flexible environment, where you can create really powerful app-engines. All members of a cluster can send code, data, and messages to any other node, async or sync. Much like Common Lisp and SmallTalk, you can easily connect to production nodes and modify code while the service is running. It's rare to find such a dynamic, flexible, and interpreted language that also has world class performance, even often beating hand written C. Combined with an integrated database, you get a distributed system that can't be beat, at least performance-wise. And the craziest thing is that all of this sits in at 650kb executable with libc has the only dependency. And all probably in less lines of code than a simple javascript webapp!