5 ms·
The ecosystem problems are genuine. Though I do not think they are so great as you make them out to be. But with respect to semantics, numpy et al are but pal
by moonchild 5y ago
The ecosystem problems are genuine. Though I do not think they are so great as you make them out to be. But with respect to semantics, numpy et al are but pale imitations. With respect to syntax, too (https://www.jsoftware.com/papers/tot.htm https://www.jsoftware.com/papers/tot.htm).
- nathan_compton 5y agoI sort of agree with you, especially about numpy. Nothing in the data science space in Python feels right to me. But you can't beat the network effects. Its still easier to actually do data analysis in Python than in J.
- user3939382 5y ago> I do not think they are so great as you make them out to be There's a dynamic with ecosystem problems I believe applies to all languages. You only need one missing or bad library that's critical to your project to make the whole language useless. An anecdotal example: I remember many years ago trying to give Python a go and within 15 minutes ran into a problem parsing XML. A search revealed this was a known issue that was being worked on with the foremost tool in Python for this job. You couldn't have credibly argued that Python had an ecosystem problem even at the time, but for me in that particular scenario Python had a show-stopping ecosystem problem. There were ways around this, but the most convenient way around it at the time was switching back to a more familiar language. My greater point is that, we can definitely make generalizations about a language's ecosystem health, but keep in mind there is a very context-sensitive, practical dimension to that type of language assessment.
- moonchild 5y ago> You only need one missing or bad library that's critical to your project to make the whole language useless ...no? If there is functionality I need, and no library implements it, I will implement it myself. That goes for any language. Otherwise, the job of a programmer would simply be to string together existing libraries, not writing anything meaningful.
- user3939382 5y ago> I will implement it myself Are you saying in the scenario described, your solution would have been to write an XML parser from scratch?
- moonchild 5y agoIf I need one, and I cannot find one, then yes.
- RexM 5y agoYeah. It can't be that hard.™
- mlochbaum 5y agoIt's not ideal, but I've done this in BQN and it took about 15 lines. I didn't need to handle comments or escapes, which would add a little complexity. See functions ParseXml and ParseAttr here: https://github.com/mlochbaum/Singeli/blob/master/data/iintrinsic.bqn https://github.com/mlochbaum/Singeli/blob/master/data/iintri... XML is particularly simple though, dealing with something like JPEG would be an entirely different experience.
- sillysaurusx 5y agoWhat... is this? # https://www.intel.com/content/dam/develop/public/us/en/include/intrinsics-guide/data-3-6-1.xml xml ← •FChars •wdpath •file.At ⊑•args #⌜ # An xml parser good enough for our use case # Accept xml; return (as three lists): # - Parent index of each tag # - Contents of open tag # - Text after last child tag E ← +`⊸×⟜¬-⊢ ParseXml ← { text‿tags ← ('?'=·⊑·⊑1⊸⊑)⊸(↓¨) <˘⍉⌊‿2⥊((+⟜»E∨)˝"<>"=⌜⊢)⊸⊔𝕩 d←+`tt←1-(+˜⊸+´'/'=0‿¯1⊸⊏)¨tags # Tag type: ¯1 close, 0 void, 1 open tp←(⍋⊏⟜d)⊸⊏∘/˘ 1‿¯1=⌜tt # Tag pairs ! (∧`' '⊸≠)⊸/¨⊸≡⟜(1⊸↓¨)˝tp⊏tags # Tag matching oi←(0<tt)(⌈`↕∘≠⊸×)⊸⊏⌾((⍋d)⊸⊏)↕≠tt # Open index, for closed and void tags ci←⍋⊸⊏○(∾⟜(/0=tt))˝tp pi←(/0≤tt)(1-˜⍋)¯1⌾⊑ci⊏oi # Parent index ⟨pi,(0≤tt)/tags,ci⊏text⟩ } I don't ... EDIT: Apparently https://mlochbaum.github.io/BQN/doc/primitive.html https://mlochbaum.github.io/BQN/doc/primitive.html is a list of functions. Interesting. After I learned to read Haskell, I liked to believe I could learn to read anything. But I think I'll hang up my hat on this one.