haha. that would mean I have at least one good idea, and that I have the knowledge and/or skill to pull off that rumored idea in one of these languages
last I checked, j was unstable, as I couldn't perform basic system IO due to some bug in a release branch. And in calling and talking to some sales rep at KX, there is no historic/unlicensed K3... which leaves gnu APL I guess?
I haven't the faintest understanding if kona is a reliable, optimized release, and the thing about k/q that interests me is its first class tables anyway.
so I'm not sure if kona would cut it for real business applications. these are all things that I don't know.
but what I DO know is I'd prefer to use APL, its descendants or Lisp and its descendants professionally over any other programming languages. The question who is hiring to use them and how good to you have to be with them to be hirable?
@nathanrogers If you want "in" at a developer of an APL, I can offer you two places to start: Apply for an internship (careers@dyalog.com) at Dyalog, or for an apprenticeship with Steven Taylor to help him working on Vector while being taught kdb+.
@nathanrogers I guess ⊃∘.,/ but yes, it is (like all other Dyalog APL code) limited to 15 dimensions. Instead, you could flatten as it goes along with ⊃(,∘.,)/.
@nathanrogers Tables are matrices, as APL allows rank above 1. And code generally applies to higher-rank arrays too, so no special functions are needed. You can always use ⍤ to specify how you want a function applied to higher rank.
@nathanrogers Not identical, but behave pretty similarly. E.g. you can't use = to compare two enclosed charvecs, but have to use ≡. However, to compare two lists of charvecs, you need ≡¨.
@nathanrogers ⍷ gives a 1 everywhere where ⍺ begins in ⍵:
@nathanrogers We've discussed that internally. Last time was this past spring. We concluded that it would overly complicate the language for too little gain. However, we will probably soon add "magic arrays" which are like classes, but behave like arrays and let you define primitives for them. That'll let you make your own strings.
@FrownyFrog Yes. Just use ⎕← to see the entire result.
@nathanrogers Split-on is char(≠⊆⊢)string and includes/contains is sub(∨/⍷)string. You can fold case with case(819⌶)text (0=lower; 1=upper). Replace and/or strip using ⎕R. In general you can use ⎕R and ⎕S for powerful regex based operations, although a clever APL formula may be faster.
@nathanrogers Strip←{(∨\' '≠⍵)/⍵}∘⌽⍣2 is probably a lot faster than Strip←'^ *| *$'⎕R''
@nathanrogers Internship? Right, just send an email saying you're interested. Tell them what who you are, and what background you have. You may say I sent you if you wish.
Question: How do you convert base 10 to binary as short as possible? It seems that ⊤ requires a variable number of 2's as left argument based on the magnitude of the right argument, so you would need the log function?
@Quintec nope. Tacit and whatever comes in effect when the end of an expression (a line, before an ending parentheses, ect) is a function, instead of an array
@Adám on the subject of new things overcomplicating the language, has there been any discussion of an APL 3.0 that uses modern available unicode, and simplifying APL idioms?
@nathanrogers Modern available Unicode? We do add new features that greatly simplify constructs, and we are (and are planning on) releasing libraries for various things, including string operations.
if you think about it though, you aren't exactly power typing apl characters. most of the time I'll bet you're just looking at what you wrote trying to decide how best to continue
that's fine. I'm not complaining about input methods. I'm also not complaining about lack of symbols. I'm just wondering if first class strings and string methods are to convoluted, why no go back to the drawing board
APL 2.0 has been around since, what, the 70's?
and in particular, there are so many "filter a list" idioms, that it'd be sensible to have a filter function=
@nathanrogers I do think there should be more string functions, but not in the form actual string objects. At least in APL, IMO what works on strings should also work on number arrays and array arrays in exactly the same way
@nathanrogers ok that I can agree with, combining with the fact that / can't be easily used in trains
In logic, negation, also called the logical complement, is an operation that takes a proposition
P
{\displaystyle P}
to another proposition "not
P
{\displaystyle P}
", written
¬
P
{\displaystyle \neg P}
(¬P), which is interpreted intuitively as being true when
P
{\displaystyle P}
is false, and false when
P
{\displaystyle P}
is true. Negation is thus a unary (single-argument) logical...
I'm becoming more familiar with the keyboard, so that isn't really the reason for my questions. It's just that APL, as a newcomer feels like a language from the 60s. Like common lisp vs scheme
some things that'd be great for APL to feel modern, first class strings, operators that work on characters, like grade up or sorting in general, comparisons that work on characters and strings, functions that are purpose built for the new first class strings, operators who simplify existing idioms, using more modern and visually explanatory symbols instead of anachronistic symbols (for example, a special r for remainder instead of pipe which typically means filter or the like...)
@nathanrogers All non-computation functions (and operators) work on characters. We do have grade up (now for all arrays), and sorting is 4 or 5 chars (though indexing is a bit awkward, but I have an idea which would make sorting just 3). Comparisons work on characters. We don't need a string class, though you can use .NET string objects or soon make your own.
@dzaima @nathanrogers As mentioned, we are working on a string library.
@nathanrogers APL uses hash tables internally, and you can also ask it to do so. You just don't need to deal with the gory details yourself. Same goes for data type conversions.
Personally I feel like first class strings aren't a solution either, as I could see splitting 1 2 0 4 0 0 7 on 0s being useful too. APL is about generalizing, not specializing
@nathanrogers So what? APL is a mathematical notation which happens to be executable. If you look at it like that it makes much more sense than if you compare it to common programming languages. Do you also suggest that traditional mathematics get updates with "modern" symbols and specialised functions?
its really just my musings as to where I'm getting stuck in my learning, not a criticism. and you're probably right, it maybe is unhelpful
to me, seeing something like ¬2r|⍳10 to filter even numbers of a list reads better
because | has similiar connotations in other contexts, and r is often uses as remainder in mathematiccs
oh, that was something else I meant to mention in my previous list, being able to define operators. using symbols instead of with names. allowing users of APL to create their own DSL withing APL would make it feel more modern
instead of ({~0=2|⍵}¨a)/a←⍳10
¬2r|⍳10
i mean, I'm the new guy, so I still have a lot more to learn before my critique is worth anything :P I have yet to write anything substantive in APL/j/k aside from simple code challenges. like the mac address question from yesterday.
which reminds me, the workspace size is too small for generating the first 6 columns of a macaddress number. how can I either increase the workspace size, or optimize the algorithm?
this wasn't a challenge, it's something I did once in python that seemed to fit the nature of K when I was learning that, so I figured out how to do it in j and k
@nathanrogers "allowing users to create their own DSL would make it feel more modern" sure, it'd be a very nice feature, but IMO that'd be a huge bonus, but not nowhere near a requirement to be modern.
@nathanrogers sorry, i was replying to older messages, it turned out a little messy... if you press the leftward-pointing arrow at the beginning of a message, it should take you to the message it's responding to
... or just hover, and the previous message will be highlighted in grey if it's in view
@ngn so I can't use that default "Dyalog APL" application that comes with RIDE and have to either start the interpreter from RIDE or from the command line. Very bad design :|
@nathanrogers so, to use a larger workspace, you need an environment variable MAXWS=2G (or however much memory you need). Do you know how to set an environment variable?
@dzaima It does increase dynamically. MAXWS just lets you set an upper limit on how much it will dynamically expand to. Feel free to set it to your actual RAM amount if you want.
@dzaima Not useless, it is just a quick-start with defaults (although I do think you can edit the defaults), but I think RIDE installs a "RIDE" shortcut too, which takes you to the connect screen.
@Adám lol I had that exact same problem at work the other day. One of our clients called support because they couldn't find an option in one of the menus, turns out our product wasn't handling their screen resolution properly
@nathanrogers Also, can you include your settings at Options > Configure > General > "Enable DPI Scaling of the interpreter…" and "Enable DPI Scaling of GUI application"?
@J.Sallé Yeah, it is really hard to get right. Even Windows' own GUI struggles with scaling issues at times.
@Adám yeah, RIDE is there too, it's just an annoying indirection to getting Dyalog started. There does seem to be ~/.dyalog/dyalog.config, but that again is an annoying thing to put upon a newcomer who just wants to store 10 million numbers
@nathanrogers There appears to be some issue with that setting (oddly enough, because I've changed mine before), because now for me, even changing it in the GUI has no effect. Very strange. I'll take it up with the appropriate colleague tomorrow.
He calls it ToE, Theory of Everything. So instead of loads of ⎕-fns to get info about things, you'd use the special dot to access a tree of info about the object.
So ⌷ for values, × for "has items" (should I have ~ for "is empty"?), and I chose | for length (because 2 chars is too long). Next, keys, and entries (key-value pairs). Forgot that those two need to exist D:
@dzaima I think ⌷ should give key-value pairs (or maybe a two element vector of keys values). You can use 9○ and 11○ for keys and values respectively, if ⊃⌷ and ⊃⌽⌷ bother you.
@dzaima Do you have a way to combine a list of keys and a list of values (or a list of key-value pairs) into a map?
yeah, I guess I have no other choice as creating maps has to be related to ⎕map as in the future I might make another map type which allows arbitrary keys instead of string-only
@Adám and yeah, niladic things do feel bad, but by some reason converting them to (generator ⍬) makes them feel not so strange ⍨
@dzaima You can always add more interesting arguments later, but once you go niladic, you can't change anything, and using the function (e.g. with ⍣) becomes awkward. An example of such a misstep was making ⎕OFF niladic. Later it was realised that one may need to specify error code, and so ⎕OFF had to be special-cased.
@nathanrogers I don't think so. But most Windows applications use WinForms (by way of ⎕WC, though one may use ⎕NEW as well).
@nathanrogers Not many. Dyalog APL was on Microsoft's official list of .NET languages. (It wasn't removed; Microsoft just doesn't maintain the list anymore.)