« first day (910 days earlier)      last day (1750 days later) » 

ngn
10:28 AM
in talk.tryitonline.net, Jul 14 '18 at 16:12, by ngn
@FreezePhoenix I'm on the opposite side - I find TIO's texteareas too bright and low-contrast, so I made them all #fff on #000 and now they're much easier for me to read. You can install greasemonkey (or equivalent for your browser) and use this script to customise the colours:
 
@ngn Uh oh. You have fairly poor eyesight, right? With 0.9, APLcart still has more contrast than TIO, but I suppose you liked the 1.0 better, right?
 
ngn
here's the trouble. reducing contrast is easy - the histogram just shrinks to the middle of the colourspace. but increasing contrast cannot be done without compromises. something will fall off the edges of the colourspace. one way to deal with it is just cut it off, something like 255⌊0⌈scale×colour, but that produces a "black crush" effect - shades of grey that should look close to black look exactly black.
@Adám my eyesight is still good, i don't wear glasses, but i prefer not to put too much strain on my eyes. sometimes when i'm tired, i get slightly blurry vision, i guess that's normal.
 
12 hours ago, by Adám
@dzaima Thanks for the feedback. My reasoning was that it is fairly easy to lower screen contrast and/or brightness, but someone with weak vision may appreciate the possibility of having high contrast. Maybe the contrast button should be a slider?
 
@ngn heh, i'm on the opposite side - whenever a site has a #000 background, i'm forced to make a userstyle making it brighter to make my eyes happier
 
ngn
10:44 AM
@Adám oh, and very rarely, typically after a thunderstorm, i experience colourful visions for about an hour, but that's in the brain, not the eye itself.
 
Maybe I should have that slider or four radio buttons with settings for 0 0.1 0.9 and 1.0.
 
ngn
@Adám no matter what you do, someone will complain :)
 
@ngn My borough's old website allows you to cycle between multiple colour schemes and font sizes!
 
ngn
in the early 2000s there was a browser setting for default colours and fonts which would work for most websites as they didn't bother with css, but sadly those days are gone
most websites now believe they know better than me what colours and fonts i want to see
@Adám i suppose that's one of the best solutions
 
@ngn Pretty ugly, imho, but shows an extreme measure of concern for the customer.
It drives me absolutely nuts that Transport for London's speaker announcements so clearly demonstrate that nobody (in charge) ever bothered thinking how those messages would be perceived by the customers.
 
ngn
11:01 AM
@Adám like "mind the gap" when there's no gap? :)
btw, aplcart.info's current theme is tolerable for me. i don't want to leave the wrong impression. i just wanted to explain why i prefer high contrast by default.
 
That one is minor, and there's always some gap, but they consistently speak to the passengers as if the passengers had a hive mind:
Please use all available doors! — Like put my luggage through one door and myself through another‽
Would customers please use the full length of the platform! — You want me to lie down and stretch myself on the platform?
To avoid congestion, walk up the left side of the escalator and also use the middle staircase! – You actually want me to crawl up the handrail so I can have one leg on the stairs and one on the escalator‽
What they should do is paint the stations with one blue end and one red end, and then announce: There's much more space at the blue end of the platform, to the right when facing the track. and The middle staircase is the fastest way out!
 
ngn
@Adám lol, 5s later the middle staircase will be crowded :)
 
I've occasionally heard there's more room at the front of the platform but which way is the front? Of course, for the staff that remains on the platform between trains, it is obvious, but not for anyone else.
@ngn No, most prefer the escalator, but even so, that's fine — you just make a new announcement.
I've only once heard a staff member do it right (and remember I tend to spend 3 hours for 8 trips with the tube per day!) and only a fraction of the crowed followed the instructions to move. The effect was very good.
 
ngn
11:18 AM
@Adám a country of commuters... sometimes this looks so pointless
 
@ngn Ideally, we should pool all homes (in appropriate size buckets, of course) and redistribute them to minimise commuting.
 
ngn
@Adám pooling homes doesn't sound realistic to me, but embracing remote work does (assuming the nature of the business doesn't require physical presence)
also: hiring locals / seeking local jobs
 
@ngn Maybe we should pool and redistribute jobs. I'm sure a lot of people with equivalent jobs cross each other in their daily commutes.
 
ngn
@Adám one idea that seems appealing to me is that of a "programmer village"
 
 
1 hour later…
12:57 PM
@Adám Ah, nothing a like a social engineering early in the morning! I'm sure you're making a programmer joke here, but just in case you are not, two little things to consider:
1. Who is the "we" doing the pooling and the redistributing (of jobs, houses, or whatever), those soothing words masking force and injustice?
2. Why is minimizing commuting a target over say maximizing income, or house size or minimizing the cost of housing or a dozen other goals? And is there any reason this would be the same for all people?
 
@PaulMansour The benevolent dictator, of course!
@PaulMansour Excellent point. One could optimise for maximum total happiness, but that is utilitarianism, i.e. morally dangerous.
@PaulMansour Also, where's the limit? Should we also pool spouses to optimise xyz?
 
@Adám Also impossible.
 
 
1 hour later…
ngn
2:06 PM
@PaulMansour commuting takes away from a precious limited physical resource - time! if you're lucky you might be able to earn some money later, but you will never be able to recover the time wasted in public transport instead of with your friends and family.
 
ngn
2:29 PM
and of course the goals needn't be the same for all. people differ by their needs and abilities.
 
2:57 PM
I want to run multiple line user defined function.
{
i←⍵
i
}
But it is printed as { i←⍵ i } And giving length error
 
@HarshJain in what context/place are you entering the multiline dfn? it works fine for me and TIO
 
@HarshJain TryAPL doesn't allow multiline functions, but you can do {i←⍵ ⋄ i} where practically is pretty much the same as a newline
 
Also I what to roundoff an integer what's the best way
 
@HarshJain the usual way is ⌊0.5+num
 
3:58 PM
Domain error: aa←{x←(1 0/1 1) ⋄ y←(0 1/1 1) ⋄ w←((x+1)(x-1)) ⋄ (w>0)/w}
 
 
1 hour later…
5:19 PM
if 'a' is a string and "a" is an invalid token, and (⊂'a') is needed to make a boxed character array, "a" could make a boxed character array literal without the parens
with the extra lines indicating an extra layer of wrapping
 
@TessellatingHeckler there's been talk of utilizing " for something like that before here, but there's a question whether "a" should be ⊂,'a'or just ,'a'. the ,'a' version is implemented in my APL
 
@TessellatingHeckler Yes, I'm already pushing such a proposal. Note, however, that "abc" "def" should be 'abc' 'def' and not (⊂'abc')(⊂'def').
 
@dzaima oh that's cool. still doesn't quite work for my playing around, but unrelated; tio.run/##ASsA1P9hcGwtZHphaW1h///…
@Adám should be an enclosed box of two vectors? I'm sure you have good reasons, but it looks unintuitive
 
@HarshJain Because x←(1 0/1 1) makes x a one element vector (same as ,1 or 1⍴1) so w becomes (,2)(,0) and so w>0 is (,1)(,0) which is an invalid left argument for /
@TessellatingHeckler No, not ⊂'abc' 'def', just (⊂'abc'),(⊂'def') which is the same as 'abc' 'def'
 
@Adám I think I see; there is more distinction between "one thing" and "many things" than I'd have thought
 
5:27 PM
@TessellatingHeckler One thing and many things? The idea is that the following should work:
      "abc" "def"⍳"abc"
1
      "abc" "def"⍳"def" "abc"
2 1
 
@Adám I just mean that in my head, a string is always one thing, but in APL 'abc' 'def' is a vector of two strings, but 'abc' is a vector of three characters. Because my terminology is out, they're not strings, they're character vectors, and nested or not
 
@TessellatingHeckler note that Adám's proposal is to have "abc" be ⊂,"abc", i.e. the character vector, enclosed
 
5:43 PM
@TessellatingHeckler Yes, as dzaima says, my proposal will let you treat "text" much like one thing. So, e.g. "abc" ≡ "abc" "def"[1]
 
6:35 PM
@ngn @dzaima OK, how's the contrast now? It starts out grey (slightly lighter than originally, more like TIO), but you can rotate with the button white/black/grey, or press Alt+Shift+W/B/G or add ?w or ?b to the url.
 
ngn
@Adám well, it's the same as tio as you say :)
 
@ngn No, use the black theme!
@ngn You'd bookmark aplcart.info?b
 
ngn
@Adám can't get any blacker than #000, so great
 
@ngn For the black theme, I also darkened the UI parts.
 
ngn
@Adám your white is not really #fff but it looks ok
i'm not a typical user of this site anyway
 
6:42 PM
@ngn Yes it is. Only the UI parts are #ddd
 
ngn
@Adám when i hover over the result rows, i can see it gets brighter
 
@ngn Illusion, the text gets darker. #333 → #000
 
ngn
@Adám i was talking from the point of view of the darkest theme. anyway. maybe you should remember the preference in localStorage?
 
@ngn Oh, ok. But is it clear enough for you now? I'm a bit reluctant to stuff stuff on people's devices. I'd rather be 100% clean.
 
ngn
@Adám yeah, the darkest one looks good to me (but that may be just me). "100% clean" - fair enough
 
7:28 PM
I like the darkest theme.
The darker the better IMO
 
@J.Sallé I think this solution is pretty good. There's a choice, and it is very easy switch to or bookmark one's preference.
 
 
2 hours later…
9:08 PM
@Adám, what's a good way to get the digital sum of a number >9? I think I just need to split the string (i.e.: 12) into 1 2 before converting back to integers, but that has me stumped
 
@J.Sallé Good or short?
 
Preferably short
 
+/⍎¨⍕n
 
@Adám I forgot to mention I have an array of integers instead of just n, so this gives me a domain error >.>
 
@J.Sallé 1⊥10⊥⍣¯1 or add ¨s the the above.
 
9:12 PM
@Adám Ah, nice! That will solve it for sure.
 
@J.Sallé Well, yeah that is the definition. Notice the difference in notation between TMN:
and APL: 1⊥b(⊥⍣¯1)x
 
Yeah, I see it now.
 
And then the APL even works for tensors…
 
For some reason I forget 10⊥⍣¯1 works for numbers already in base 10
 
@J.Sallé Btw, 1⊥10⊤ works in Extended
 
9:18 PM
I see
 
So the above TMN is 1⊥b⊤x or as a tacit function with b as left arg and x as right arg: 1⊥⊤ or +⌿⊤ :-D
 
9:45 PM
@Adám new question: is it possible to call a recursion specifically n times?
 
@J.Sallé Isn't that iteration, i.e. ⍣n?
 
Hm, I'm not sure.
I'll link you to the challenge
 
@J.Sallé I thought that by definition, recursion was applying a fn to its result until a certain condition applies, never a fixed number of times.
 
@Adám I'll try using the ⍣n thing and let you know
For some reason my answer linking to the challenge isn't being sent
 
@J.Sallé What is the title?
 
9:50 PM
@Adám So, this challenge. I have the basic n-DSS function made: {⎕←⍵⋄∇⍵+1⊥10⊥⍣¯1⊢⍵}
Okay, it worked now hahahah
I'm trying to remake that n-DSS function using instead
Getting syntax errors galore though
 
@J.Sallé Syntax errors? TIO link?
 
I'm sure I'm just doing something wrong
I'm testing with {(⍵+1⊥10⊥⍣¯1⊢⍵)⍣⍵}15
 
@J.Sallé the left operand of has to be a function. Since the last thing before ) is an array, it isn't a train. And also, the derived function …⍣⍵ needs an argument.
 
Okay, let me try to fix that then
 
You probably want something like {10(⍵+1⊥⊥⍣¯1)⍣⍵⊢⍵} or {10(⊢+1⊥⊥⍣¯1)⍣⍵⊢⍵}15
 
9:57 PM
Ah, cool. Making trains with and the like is still giving me trouble hahahah
Okay good, that works. Is there a way to print the intermediate results?
 
@J.Sallé Ah, the classic issue with . dzaima's returns all the iterations. Otherwise you have to get a ⎕← in there (hard in tacit) or wrap in a dfn and do ¨⍳⍵ :-(
 
Yeah, I tried putting ⎕← everywhere and the repl just laughed at me. I'll wrap it
 
@J.Sallé You can replace ( with ({⎕←⍵}
 
Yeah, that works as well
 
10:18 PM
CMQ: What is -/|A ?
 
10:40 PM
@Adám Looks like the median of a numeric array?
 
@J.Sallé Median? How so?
 
Although it results in a negative number for arrays with an even number of elements
@Adám I just tested it to see the results, I'm not entirely sure hahahahah
 
@J.Sallé The median of 3 4 6 is 4, but:
⍞←-/|3 4 7
 
@Adám 6
 
I should've said a range instead of a numeric array, I guess? I tested it with ⍳7, that's why it looked like the median
I'm also not entirely sure what's | doing there
 
10:44 PM
@J.Sallé It also looked like the mean :-)
@J.Sallé Exactly my question. I found it in an ancient idiom list I was adding to APLcart.
 
Maybe I meant mean? I forget the terminology
@Adám it has no explanation there?
 
@J.Sallé No, it just lists the idioms.
 
I see
Is the list specifically for Dyalog? I think I remember | being one of those operators that has special cases in other APLs?
Function*
 
@J.Sallé It is specifically for APL2 (written by one of its main architects), but | is standard.
 
Then I have no clue >.>
 

« first day (910 days earlier)      last day (1750 days later) »