« first day (2472 days earlier)      last day (2375 days later) » 
00:00 - 21:0021:00 - 00:00

12:25 AM
Can anyone here recommend any good TeX editors? (It has to work with TeX Live installed on Ubuntu)
 
12:40 AM
@LegionMammal978 i use vim :P
 
 
1 hour later…
2:08 AM
@LegionMammal978 TeXstudio maybe
 
2:27 AM
@ASCII-only Yeah, ended up reinstalling that, and then uninstalling the old TeX Live distros that apt installed with it
Also, does the size of a font measure the distance between the baseline and the cap height? Are these measured in DTP points, or some other point definition?
 
2:41 AM
> We are offer; - Word press Website/ Drupal website/ Magento Website/ Joomla website/ Ecommerce Website/Business Website/ Personal Website,
do these people offer normal websites :/
 
wat
Why does viewing a document at 100% scale not display it at 100% scale physically
 
3:01 AM
@LegionMammal978 nobody knows
 
 
2 hours later…
4:56 AM
0
Q: SQL query shortest and longest name & alphabetical order (ORACLE)

ProgramSpreeQuery the two cities in STATION with the shortest and longest CITY names, as well as their respective lengths (i.e.: number of characters in the name). If there is more than one smallest or largest city, choose the one that comes first when ordered alphabetically. Sample Input Let's say that CI...

 
 
1 hour later…
6:11 AM
-3
Q: what is error in this

Himanshu Titgaieninclude using namespace std; class Employee { private: int name; int age; public: void setName (int); void setAge (const int); int getName (); int getAge (); }; Employee::setAge (const int a) { age = a; } Employee::setName (int n) { name = n; } Employee:: getName() { retur...

 
6:59 AM
Would you ever pay $650 for a theatrical performance? Cause that's what Hamilton tickets are :(
 
I might. Trouble is, since I'm on the wrong hemisphere, my list of expenses for watching Hamilton live starts with a round-trip plane ticket :(
Is the Chicago performance any cheaper?
 
 
2 hours later…
9:05 AM
lol, today on HNQ: "I want to make a fraction, but with no denominator or bar"
JUST THE NUMERATOR
 
9:58 AM
Hi everyone
 
hi
wait wat it's wen
what are you doing here
@feersum :/
 
Oh
 
also. did that person refer to vinculum as bar.
prepares hunting gear
 
I was just wondering, does anyone have any recommendations on any golfing languages for me to learn
 
Charcoal
Jelly/APL/J for people with a math background I guess
05AB1E/Actually would be suitable too I guess
 
10:08 AM
@ASCII-only also MATL and Husk
 
oh yeah i always forget about husk >_>
also kinda mthmtca
 
What, so all of them at once?
 
@Wen1now no, use Javagony first
 
@ASCII-only That language actually exist?
 
@user202729 I did just link to it you know
 
10:12 AM
@ASCII-only Only Jelly is actual golfing language in those.
 
@user202729 of course. but the other two are still a lot golfier than most languages
 
@ASCII-only I see. Just that I didn't know about that and occasionally I see someone said that is is hypothetical.
Why does sometimes the star show as an empty star and sometimes a filled star?
 
@user202729 empty stars are pinned by ROs
 
@user202729 a.k.a. stars without soul
 
So... there is [empty star] 0 or pinned message with 1 star is displayed as [empty star] 1?
 
10:19 AM
@user202729 pin = special star, so 1 star (just the pin and no other stars) displays as just a star...
@Mego fish is clearly superior to zsh (which is superior to bash)
><> >>>>>>>> fish but it's not a shell yet
 
Because I don't have those shells can anyone briefly tell me what benefits does those shells have over cmd?
 
they're linux shells for one
 
So because linux is better than windows? Any other reasons?
 
not that
but imo yeah the linux binutils can be used for much more than windows
also just cleaner syntax/way easier to use. especially with oh-my-zsh and oh-my-fish
 
10:37 AM
I don't see why you guys are bashing cmd. What could be more convenient than the shortcut Alt-Space-E-P for pasting?
 
@feersum where does that shortcut work
 
In cmd of course.
 
@feersum if you mean cmd then ctrl+v and right click work too
it's not 1990 anymore
 
It is if you use Windows 7.
I'm assuming that must be a 10 "innovation".
 
maybe
 
10:47 AM
@feersum O_O never knew a shortcut existed, is there also a replacement for crtl+c? or crtl+x?
@feersum doesn't seem to work =/
 
@flawr What if you just press Alt-Space? Does anything happen?
 
Oh you don't have to press them simultaneously :)
(the drop downs are in german on my computer)
 
But you can.
 
doesn't seem to work here even with the german commands
 
Alt has to be pressed before space though
 
10:54 AM
@feersum Correct.
@ASCII-only No, Alt+Space, E, P.
 
@user202729 huhwhat
 
hi guys
 
hello
 
(E stands for edit, P stands for paste) | For German commands it may be different.
 
Anyone here have experience with neural networks?
 
10:56 AM
@user202729 yeah? what about it?
@Daruchini kinda not really, why
 
I'm getting a bit confused trying to normalise continuous inputs
 
@Daruchini People often says "Just do it".
 
My model uses the sigmoid activation which has a domain of [0,1] so would that mean I should scale all inputs to fall within that range?
Cos I see loooads of repos who just use z-score norm
 
Depends, I guess?
 
Really?
how so
 
10:59 AM
@Daruchini I guess it would gives better results, but otherwise not scaling the input also works.
 
I mean, z-score may be for inputs that don't really have limits?
@user202729 not scaling does not work very often
 
Isn't mapping stuff into the range [0, 1] is what sigmoids are for?
 
Yeh thats right @feersum , so would you ensure all inputs were mapped to that scale also
I'm just getting a little confused because I've seen multiple approaches
I know I could try them all and see which gives me better but wanted to know the math behind the approaches
 
I'd say it depends on input distribution?
If you can't give hard limits, or almost all the inputs take up a very small part of the range then use z-score
 
@Daruchini I guess that it depends on which approach gives the "nicest" result function.
 
11:04 AM
In my head, it makes more sense to try to keep the inputs within the active domain of the activation function being used. But I can see what @ASCII-only is saying
Plus i've looked at the density distributions of min-max normalisation and I can see you loose a bit of information
 
You could also use z-score to just guarantee that the activation function gives reasonable results for most data you throw at it probably?
 
I don't understand?
 
Like if you just scale to the z-score of a dataset you can basically guarantee the activation function works reasonably well no matter what dataset you pass it
 
Yeh I guess
I'll attempt both normalisation
 
11:51 AM
@EricTressler While reading this PDF (background: because I find my algorithm for the next OEIS sequence too slow) I notice that it mentions level of a poset, even when it is not necessarily graded. What is it, or I just misunderstood the sequence and the poset are graded?
 
12:14 PM
Where can I get golfscript assistance?
 
0
Q: Encode and Decode me

Kishan KumarGiven any input, you need to do is either decode or encode it in or from BASE16,32,64. So your task if you choose to accept will be to make a base16,32,64 encoder,decoder RULES: Standard Loopholes apply It should not be a builtin function. It must be a full program and that's all INPUT: In any ...

 
In particular, I'm trying to write a function with multiple variables.
Hm, I guess I want to take the second item on the stack.
But I'm not sure how to call it.
 
12:44 PM
0
A: Sandbox for Proposed Challenges

Kishan KumarI asked this question in main site. Got a very bad review. So, I would be glad if any kind soul here would like to help me make this question better. And Some feedback on how can i make it good. Given any input, you need to encode / decode it in or from base 16, 32, 64. So your task will be to ...

 
Don't you hate it when you spend a while writing a test for something, and then it works the first time?
All that testing was for nothing!
 
@feersum it's so it doesn't break later on
 
Not if it's a single-use piece of code :P
 
 
1 hour later…
2:04 PM
You can recognize a mathematician in that he always checks his Sudoku is correct because he knows that at this point he has only proved unicity :) — François Brunault Apr 29 '13 at 20:45
 
It's the first time I ever use an RNG for test cases :-D
 
2:20 PM
0
Q: fixed header bar

TitusI want a fixed header bar in PPCG (like in SE), but my custom css doesn´t work any more with the new layout. (also, I cannot remember where I put it - in Firefox. It was not in userContent.css) this does not work (excerpt from userContent.css): @-moz-document domain(stackexchange.com) { .to...

 
3:06 PM
CMC: make a Python expression that results in the integer 2 using only the characters [<]
 
@orlp [[]<[[]]][[]<[]]<<[[]<[[]]][[]<[]]
 
@feersum that's exactly what I had :)
 
There's not a ton of choice!
 
especially using [x][[]<[]] just to parenthesize x feels weird
but it works :P
@feersum I had an interesting problem I've been kinda stuck on for a while (although I didn't spend too much time on it)
given a list of positive elements we can 'split' an element x by removing it from the list and adding a, b to the list such that a + b = x
 
is the same possible for 3?
 
3:13 PM
Only powers of 2, I would expect.
 
Because << is leftshift.
 
I know
 
@feersum what is an optimal algorithm that given a list l and n splits minimizes the maximum in the resulting list
 
Was this a recent question?
 
I've stated it in primes and squares a while ago
n = 1 is trivial, splitting the maximum element of l into two equal splits
but even n = 2 already things can start getting more difficult
 
3:16 PM
I don't understand the question?
 
so say we have a list [1, 3]
 
@orlp [[]<[[]<[]]][[]<[]]<<[[]<[]][[]<[]]
1 byte more but gives 1 instead
 
we can pick an element and split it however we want
 
If we have a single number n, and k splits, we turn it into n / (k + 1), right?
 
If you split n times you'll get n+1 sublists, which maximum do you want to minimize?
 
3:17 PM
in this case it's optimal to first split the 3 in 1 + 2
 
So it seems we can binary search on the answer
 
[1, 1, 2]
and then the 2 into another 1+ 1
[1, 1, 1, 1]
but this shows that splitting in half isn't always optimal
 
Ah you meant replace an element with a sum of two integers?
 
not integers
 
And see whether the number of splits required to get below x is greater than the amount we have.
 
3:17 PM
numbers
 
@muddyfish [[]<[[]]][[]<[]]<<[[]<[]][[]<[]] is shorter
 
So you can split 5 into 2.5, 2.5?
 
@user202729 yes
 
@feersum Binary search seems to be correct.
 
@feersum I believe so
let's say the length of the list is n, and the number of splits is k
we've solved k <= 1
and I believe that what you say is correct, solving n = 1
 
@feersum the difficulty is that you can have multiple 'barriers'
e.g. if the input is [1, 1, 1, 1, 5, 5, 5, 8, 12]
 
@orlp Just take the sum of the number of necessary split for each number?
 
What do you mean? Simply ask whether the amount of splits required to get the minimum below x is <= k.
 
now depending on k you can reach certain minima, but 1 and 5 are clearly 'barriers' that you need to break
 
@orlp I don't understand.
 
3:22 PM
So you start with the interval [0, 12]. Check can you get down to 6? then continue with next interval.
 
@feersum that makes sense but I'm not convinced that it's always optimal
effectively what you're saying is that there's some minimal value v we can reach with k
 
Of course there is a minimal value.
 
and that we just handle each number individually to get to v
 
@LuisMendo MWAHAHA, tied MATL for this challenge by abusing a bug hehe :-)
 
Yes, there is no interaction between the groups fissioned from different starting numbers.
 
3:29 PM
so if we have a certain conjectured minimal value v we need to check if sum(ceil(x/v - 1) for x in l) <= k
@feersum interestingly, since we're dealing with real numbers this process doesn't have to be finite
 
It is with one simple trick.
You update your binary search range with the number you actually found
Rather than the one you tested for.
 
what do you mean
the number you actually found?
oh I see
 
The actual min of x / ceil(x/v)
 
I have [[]<[[]]][[]<[]]<<[[]<[[]]][[]<[]], kinda late to the party. EDIT: This seems identical to feersum's.
 
@feersum don't you mean max?
 
3:36 PM
@orlp Right.
 
@muddyfish You know you can produce 1 with []<[[]] don't you?
 
@feersum this is not enough
you can only do that if sum(ceil(x/v - 1) for x in l) <= k holds
 
Oh you mean if the binary search condiiton has the same value every time?
 
def minmax(l, k):
    lo = 0
    hi = max(l)
    while abs(hi - lo) > 0.01:
        mid = (lo + hi) / 2
        needed = sum(math.ceil(x / mid) - 1 for x in l)
        actual = min(x / ceil(x / mid) for x in l)
        print(lo, hi, actual)
        if needed <= k:
            hi = actual
        else:
            lo = mid
    return lo
this is what I have at the moment
and you can see what it prints
>>> minmax([1, 3], 2)
0 3 1.0
0 1.0 0.5
0.5 1.0 0.5
0.75 1.0 0.5
0.875 1.0 0.5
0.9375 1.0 0.5
0.96875 1.0 0.5
0.984375 1.0 0.5
the 'actual' maximum it found is 0.5
 
Probably the actual code is bugged.
 
3:44 PM
@orlp Don't you mean max instead of min? :)
 
@feersum eh I had that just a second ago (was second guessing myself)
>>> minmax([1, 3], 2)
0 3 1.5
0 1.5 0.75
0.75 1.5 1.0
0.75 1.0 0.75
0.875 1.0 0.75
0.9375 1.0 0.75
0.96875 1.0 0.75
0.984375 1.0 0.75
 
No really, you made the exact same mistake as in my earlier message.
The line with actual = ...
 
yes
that's what I mean
I had max there
I was trying min because I was second guessing myself on the correction
the second output I posted is with max there
 
I guess you need to switch the if?
 
@user202729 no, the if order is correct
 
3:47 PM
If the number of split needed for mid is < the allowed number of split should you look for a number > mid (so lo = mid)?
 
How are you getting 0.75? That should be impossible.
 
@feersum it is impossible, that's my point
when needed > k we get impossible results
 
Oh, it always prints actual even if the test failed.
 
actual is just the best result you'd get if you could actually use needed amount of splits
 
So this is indeed a problem, adversarial examples where the test always fails.
 
3:50 PM
and that's why I have this
        if needed <= k:
            hi = actual
        else:
            lo = mid
if needed is permissible, sure we can use the actual value we calculated as you suggested
but if it's not we can get significantly better results (read: bogus)
 
Right, but it doesn't help if the else branch is taken every time.
 
@feersum actually
when needed == k we can just return actual
but I'm not convinced we'll always reach that spot
 
What if we just throw in a test of the upper endpoint
Alternatively, add a random number to the starting value of hi.
Then the probablity of getting stuck is 0.
 
-1
Q: How google determines the OS and CPU bit of user machine?

Shubham SarohaWhen downloading Google Chrome, website is able to determine the user's operating system and whether PC is running on 32 bit or 64 bit. How does it do that?

2
Q: An Array of Challenges #3: Moving Averages

FlipTackNote: This is #3 in a series of array-manipulation challenges. For the previous challenge, click here. Moving Average of a List The moving average of a list is a calculation resulting in a new, smoothed out list, created by averaging small overlapping sublists of the original. When creatin...

 
@feersum actually
the real issue here is the lo/hi assumption
by setting lo = 0 we've already allowed invalid solutions in our [lo, hi] range
hi will always be valid
 
3:58 PM
Doesn't matter, you will never actually test one of the endpoints.
 
Could you please vote to close this?
 
@feersum but suppose in the case where hi is the optimal solution
how do we detect this scenario?
 
I think either of my two solutions above could work.
 
it appears that checking needed == k works
actually that doesn't work
case in point: minmax([1, 3], 3)
because minmax([1, 3], 2) == minmax([1, 3], 3)
 
@Mr.Xcoder Is the comment below auto-generated?
 
4:01 PM
Checking needed == k would be correct, but hardly necessary.
 
@feersum what do you mean by this
 
At each step, check hi before checking mid. You'd also need the needed == k for this actually.
 
I guess it's not hard to check if hi is the optimal solution.
 
@user202729 Yeah, if you post a custom close message, it auto-converts it to a comment, and people who close with that reason auto-upvote the comment.
 
I like the random number solution more though.
 
4:04 PM
@user202729 Yes.
 
@feersum what exactly would you want to check hi with?
 
I guess the condition is, for all x in the list, $\lfloor \frac x {lo} \rfloor = \frac x {hi} $.
 
@orlp Same thing you check with mid.
 
@NewMainPosts ಠ_ಠ I spent 5 minutes working on that before remembering the sublists builtin in Jelly
 
actually
nevermind...
@feersum but we already know that hi is always valid, that is the needed check for hi always passes
 
4:07 PM
@orlp That's why you need the needed == k exit condition.
 
@user202729 I'm not really sure, unless it was being used informally, or if level means something else in context. And I don't see the example you're referring to
 
@EricTressler Ok no problem I've got help on mathematics chat room.
 
@feersum but for minmax([1, 3], 3) we never reach this
for mid = 1 and [1, 3] we get needed = 2
 
@orlp hi is 1 which would give needed == 2 == k.
 
for ANY mid < 1 we get needed >= 4
there is never a needed = 3
so when k = 3
 
4:09 PM
@Mr.Xcoder that's only True
 
we can never get needed == k
 
@user202729 I think it should be $\lfloor \frac x {lo} \rfloor = \lfloor \frac x {hi} \rfloor$ instead.
 
Sorry, I thought k was 2.
 
@feersum it was earlier, but then I came up with this counterexample against the needed == k check :)
 
Meh, how about the random number solution then?
 
4:10 PM
@feersum doesn't really feel like a solution to me ^^
 
How not?
 
Do you think my solution (the condition) is correct?
 
just feels like it's circumventing the issue, I feel like there's a proper solution
 
@muddyfish Oh yeah (ಠ_ಠ Mr. Xcoder)
 
@user202729 again, that will never happen in the minmax([1, 3], 3) case
at some point we have hi = 1 (which is optimal)
 
4:11 PM
Are we running this algorithm on a realistic computer or a magical real number machine?
 
@feersum Realistic computer can have infinite precision real.
 
@feersum realistic I guess although even better if it was magical
@user202729 and lo will just get exponentially closer to hi, but never reach it
I guess there's a discrete formulation of the same problem
 
I know.
 
we just write down what values we can reach for each element by spending k splits on them, for all k
 
What happens for that case? (I can't run the code)
(is that Python?)
Ok no problem import math resolved it.
But I guess it will terminate? What's the problem?
 
4:15 PM
@user202729 you guess?
we need proofs, and not only that it terminates, but also always terminates on the optimal value :)
 
I'm not good enough at Python to implement it.
So does it correct for that case? And now you are saying that it is correct and you need a proof, or it's incorrect?
 
def minmax(l, k):
    x = l[0]
    if len(l) == 1: return x / (k + 1)
    return min(max(x / (j + 1), minmax(l[1:], k - j)) for j in range(k + 1))
@feersum this always terminates and is correct
@user202729 I'm saying that I'm not convinced it works at all
and just testing it for one case doesn't mean anything
 
@orlp But it grows linearly (or more) with k...
 
@feersum At least it's provably correct.
 
@user202729 the binary search is also provably correct, it just needs time to improve precision
 
4:19 PM
I'm just not comprehending the hate for random here.
 
You're not convinced that my algorithm works, doesn't means it doesn't work. It just means that I didn't prove it.
 
@user202729 can you at least explain why flooring?
I can understand ceil(x/mid)
@feersum The problem reworded is finding the smallest value v such that ceil(x1/v) + ceil(x2/v) + ceil(x3/v) + ... + ceil(xn/v) - n <= k
we can terminate the binary search by finding what the 'breakpoints' of all those ceilings are
and if there is no such breakpoint in (lo, hi) we can terminate
so if for all x ceil(x/lo) = ceil(x/hi) we can terminate, I guess that's what @user202729 meant but I got thrown off by the floor
actually that's not entirely correct
because I said (lo, hi), not [lo, hi]
the bounds are exclusive
and that's the issue with hi = 1 and lo < 1approaching it, because for any integer n ceil(n/1) = n but ceil(n/lo) > n
 
 
1 hour later…
5:45 PM
@Mr.Xcoder It's specially rewarding to reduce code length by abusing a bug :-D
 
Isn't it? :D
 
6:38 PM
@HyperNeutrino It looks like you may have to save OEIS again :/
 
7:27 PM
@cairdcoinheringaahing lolWAT noooooo
I don't understand the sequence yet.
It looks semi brute-forceable
 
What does rule violations mean (about SE suspensions)?
 
I just realized why my computer is lagging so much - I'm running multiple copies of Minecraft at the same time ;-;
 
I "love" the fact that s on mother meta are ignored by SE (hoping nobody notices :P)
 
7:44 PM
@Mr.Xcoder lots of se stuff got recently laid off
 
@EriktheOutgolfer Really why?
Are they low on money :D?
 
dunno tbf
 
@Mr.Xcoder We can't talk about that D:D
@HyperNeutrino Yep, 2 days to go (I think)
 
@cairdcoinheringaahing No, I am asking what this means in general. Does it include fraud or just any other violation of the rules?
 
@Mr.Xcoder it's purposefully vague
 
7:47 PM
@Mr.Xcoder I think its violations that aren't rude behaviour or vote fraud
 
Ok then
Q: If I write a language with overloading rather than vectorization, what should + (kind of addition / concatenation) do on a string and an integer?
 
Concatenate
"Test"+5 => "Test5"
 
@cairdcoinheringaahing Like "abc"5+ would result in "abc5"?
Lol
Also @cairdcoinheringaahing did you see my message in JHT?
 
@Mr.Xcoder Just seen it now :P
 
8:09 PM
@ASCII-only do you prefer delegates or lambda?
 
8:51 PM
@Mr.Xcoder Or add n to the code points. E.g. "abc"+5 => "fgh"
 
Okx
@cairdcoinheringaahing i think that's too much like vectorization
 
00:00 - 21:0021:00 - 00:00

« first day (2472 days earlier)      last day (2375 days later) »