« first day (63 days earlier)      last day (1472 days later) » 

00:09
What is “KEI”?
 
1 hour later…
01:19
Oh right, acronym for Iverson. I thought it was software
 
2 hours later…
02:52
Interesting conversation about ligatures on the google group. What I'm pondering is suppose we had two ligatures, one for ~< and one for <<. What would be the right way to represent ~<< ?
I'm no expert on font implementations however I'm guessing that the ~< ligature would be substituted for a symbol representing "not less than" but that wouldn't capture the true meaning of ~<< "not grade up"
03:18
@NerdRage agreed, very interesting. I haven’t seen a case where ligatures improve compehension or clarity - if anything, it’s disorientating to have characters occasionally span two or more monospace slots
Fira Code is an example github.com/tonsky/FiraCode
 
10 hours later…
13:02
one more thing to worry about while coding - your FONTs limitations! in a mobile future, no thanks
 
4 hours later…
16:45
What’s the rationale behind base conversion returning ‘empty list’ when converting zero to another base?
ngn
ngn
@chrispsn to avoid leading zero digits :)
@ngn Can you give an example?
ngn
ngn
@chrispsn if 2\:0 returned ,0 instead of !0, that would be a leading zero
is that what you were asking about?
@ngn yes. I... just don’t understand why that’s a leading zero!
ngn
ngn
@chrispsn it's the only element in the list of digits, so it's both leading and trailing
*would be
17:01
@ngn maybe the context helps. I’m writing a function that takes a number and converts it into “spreadsheet column header” format, ie ‘26’ would go to “AA”. I’m doing that by breaking the input number into its base 26 representation, converting each one into its capital equivalent, and concatenating
Everything’s great except when it comes to outputting “A” for the first column
I can special case it but to me, it’s a really surprising result that base conversion doesn’t output ‘,0’ for 0
@chrispsn regular base conversion isn't really the correct thing for doing that, as spreadsheet columns are encoded in bijective base 26
@dzaima bijective?
ngn
ngn
19
Q: Generate excel column name from index

Vilx-This one comes from a real life problem. We solved it, of course, but it keeps feeling like it could have be done better, that it's too lengthy and roundabout solution. However none of my colleagues can think of a more succinct way of writing it. Hence I present it as code-golf. The goal is to c...

@chrispsn bijective = fully reversible (or something like that), meaning that leading zeroes change the number
wikipedia has a pretty table
ngn
ngn
@ngn there are no k or apl answers there (yet) but some of the answers in other languages might be useful
17:07
@chrispsn you really can't generally - the 1st columns effect will stretch more and more over time
ngn
ngn
@chrispsn see also this discussion about the inverse problem (excel column name -> index)
thanks @ngn and @dzaima for the resources. I confess I don’t understand the rationale for zero specifically yet - it goes completely against my intuition - but will read and have a think
Like, I get bijectivity, but don’t see why it’s not preserved in this case for zero
17:22
@chrispsn it's just that the regular bases are strange. e.g. for base 10 you would want, for each possible number, 10 numbers with digits 0-9 preceding it. But, below e.g. 1000 are only 900 3-digit numbers, so you'd have to repeat the 100 both with and without the leading 0. If excel columns used 0-9 instead of the alphabet, before (& including) 99 there would be 111 possible columns
Why do we represent zero as ‘0’ at all then? Should we be representing ‘zero’ (as in the point on the number line) as “empty sequence of digits” if we were being pure in traditional mathematical notation?
@chrispsn because humans are strange beings and history wasn't made with spreadsheets in mind
@dzaima hmm
@ngn thanks!
"I have sheep!" - here's hoping SE doesn't break that
17:35
@dzaima this is a nice tool, what’s its purpose?
@chrispsn that's my ascii-art golfing language, and I'm using it as a JS interpreter :P
ngn
ngn
@chrispsn for k7 replace 9# with 6# (because of 32-bit overflows) and the first \ with \:
 
1 hour later…
18:50
@dzaima I now realise why base-26 conversion isn’t the right tool and don’t know why I ever thought it worked
Still thinking about ‘zero’ as ‘empty list’ though - am trying to find an example where “zero -> enlisted zero” would be counterproductive. Clearly it’s the way humans chose to represent zero (point on the number line), but maybe it complicates implementation
19:11
@chrispsn If empty works, why not use it? Many things are already strange with 0, and some things just can't be made to be nice
ngn
ngn
@dzaima 0 should have 0.9 digits :)
@ngn exactly.
ngn
ngn
actually, there should be 0.9 integers that have 0 digits
from the numbers 0-1, there should be 0.9 numbers with 0 digits, 0.09 numbers with -1 digits, 0.009 numbers with -2, and so on :D
ngn
ngn
a possible impl of base\:x could be: while x>0 extract a digit from x and append it to the result
this is simpler than special-casing 0
19:24
@ngn well it could also be a do ... while loop, which could potentially be faster because it doesn't have a redundant first test
ngn
ngn
@dzaima well, true
it doesn't feel right to classify 0 as a 1-digit number. there are base^n - base^(n-1) n-digit numbers for n>0. better have it to break down at n=0 instead of at n=1

« first day (63 days earlier)      last day (1472 days later) »