« first day (2022 days earlier)      last day (625 days later) » 

6:20 AM
@user17502717 Hi Hunter Schmitt, if you want to participate here, just email access@apl.chat
 
 
5 hours later…
11:45 AM
How do I get the nth smallest bit of an integer? E.g. the 13th smallest bit of 12411 is 1 (the 4096s place).
 
12:05 PM
@Adám {2|⌊⍵÷2*⍺-1} (or without the -1 depending on what the index should be)
 
Seems so expensive when you'd just mask it out in C.
I came up with {⊣⌿(⍺⍴2)⊤⍵}
 
APL doesn't do well at bit manipulation
 
 
6 hours later…
6:13 PM
Learning APL: find myself importing a txt file as a long string and then transforming that string into a vector masking that vector for various characters and then performing operations on it. I'm assuming that this is a fairly common task. Is there written documentation that goes over this process? I can look up Advent of code solutions but I'd prefer something more generic.
I'll keep looking. I'm probably missing something obvious.
I think I have come across a lot of documentation on the glyphs but less on how they are typically combined. I know that is where aplcart comes in. but there are so many idioms in there it can be difficult to figure out which ones are the most commonly used.
 
6:53 PM
for example. here are 20 common regular expressions string manipulations. When I type these into APLcart I don't get useful reponses. The only one that seems useful in this domain is blanks with dashes. '-'@(=∘' ')Y and that isn't even documented.
It's possible that my approach to APL is wrong or that I'm not understanding something as far as how to approach common problems.
I understand that I can use regex in APL but I feel like that defeats the purpose. perhaps I am wrong there as well.
 
One useful trick is to use quad-CSV to process external data even if it isn’t exactly csv—it’s quite flexible
 
excellent I'll give that a shot.
 
But I’d say regex support is there for a reason. When processing external strings it can definitely be the path of least resistance
 
that's good to know I was trying to figure out if it was against the APL way of doing things.
 
normally it's pretty easy to parse with APL too, there's no specific guide because it's too general
 
7:00 PM
I was trying to avoid regex because I was afraid it would stump my progress in learning the languge.
maybe the term I am looking for is parse.
 
Maybe you have some specific examples?
 
honestly I'm following your path and working through the AOC2015 so I'm afraid to give examples because I want to figure them out on my own. The quad CSV tip is helpful I will try that.
one question is I'm trying to match more than one term in a string. I've seen it done where the search is just 'abc' but if I want all the a's all the b's etc. 'a''b'='cats bears' gives me a length error.
 
7:16 PM
need something like outer product ∘.= or rank ⍤ or each ¨
      'ab' ∘.= 'cats bears'
0 1 0 0 0 0 0 1 0 0
0 0 0 0 0 1 0 0 0 0
 
ah ok. Thank you!
need to do some more research on outer product.
 
8:13 PM
Thank you!
 

« first day (2022 days earlier)      last day (625 days later) »