3 ms·
I struggled a lot too. I think the main issue is the problem domain in which these languages excel at. I like compilers, systems programming, distributed syste
by TurboHaskal 6y ago
I struggled a lot too. I think the main issue is the problem domain in which these languages excel at.
I like compilers, systems programming, distributed systems... but math? statistics? I'm admittedly terrible at that and find it really uninteresting. It doesn't help that most literature on J tries to teach its language concepts showing you how to solve math problems. I have no need for a fancy calculator.
For what it's worth, I like K and Klong and found them very approachable. Basically because you can get away by writing Scheme with m-expressions.
- ashtonkem 6y agoMy general belief is that these languages would be far more useful as embedded languages; occasionally there is a need for the core of some complicated system to take advantage of their power, but the same design that makes them good at math makes them horrible for writing APIs or database access.
- beagle3 6y agoThey work better than databases for accessing databases - nsl.com has examples like tables.k , a reasonably efficient in memory ordered-and-mostly-relational database in all of 14 lines of K. And a variety of spreadsheets, from 2 to 100 lines. They were sort-of-ok for API access, but Shakti’s FFI is actually incredibly straightforward - comparable to writing a C extern definition only much terser (‘cause it’s Arthur...)
- smabie 6y agoWhat makes them bad for APIs or databases? Both k and q are very practical general purpose languages (J and APL less so) that would be an appropriate choice for almost any kind of app, imo. q especially looks mostly like a normal procedural language, and can be used like one too.
- jodrellblank 6y agoAPL isn't always written (⊂∘⍋⌷⊢), APL has a traditional notation which is like other procedural languages: :If databaseResult.Rows.Count > 5 :AndIf warnOnLargeData :For Row :In databaseResult.Rows logToFile 'Careful, that's a lot of data, e.g. ', Row[1] :EndFor :EndIf and Dyalog APL is a .Net language, which has extended this style with :Namespace and :Class and :Access and :Signature ways to build objects and methods to make your API and export it as a .DLL for use by other .Net languages, or plugin to ASP.Net and make a web service[1], or accessing most things C# can[2], e.g. if you want to use a System.Collections.ArrayList it's right there: ⎕USING←'System' 'System.Collections' arr←⎕NEW ArrayList tmp←arr.Add ⊂'Test' tmp←arr.Add ⊂'Hello' tmp←arr.Add ⊂'World' arr[0 1 2] ┌────┬─────┬─────┐ │Test│Hello│World│ └────┴─────┴─────┘ arr.RemoveAt 0 arr[0 1] ┌─────┬─────┐ │Hello│World│ └─────┴─────┘ and that means things like System.Data.DataTable and SQL Connections for your database access. .Net isn't as popular as JavaScript and Rust, but it is a pretty large, stable, capable and established ecosystem to be able to hook into. The core of APL symbols more or less /are/ an embedded language in the wider APL, just that wider APL is not showy for codegolf and is not unusual and pretty symbols, and you can't use it /without/ the symbols. [1] See the examples shipped in the install folder like "C:\Program Files\Dyalog\Dyalog APL-64 18.0 Unicode\Samples\asp.net\webservices\" [2] I expect not /everything/ C# can; C# is the first-class .Net language, but if you have things written in C# you can use them.
- vchak1 6y agoActually, it seems that compilers is a domain that APL can potentially excel at.. https://github.com/Co-dfns/Co-dfns https://github.com/Co-dfns/Co-dfns