« first day (4483 days earlier)      last day (658 days later) » 

 
4 hours later…
04:33
Why on earth is Git for Windows’ default text editor Notepad++
Like vim makes sense because it can exist in the same terminal window
because it is the default text editor on your Windows?
definitely not Git's fault
^
> If not configured, Git uses your system’s default editor
 
1 hour later…
05:45
@Bbrk24 git config --global core.editor nano
06:27
0
A: Sandbox for Proposed Challenges

Parcly TaxelMinkowski's ?(x) (with rational x) Here is Minkowski's question mark function: It is a strictly increasing and continuous function from the reals to themselves that, among other unusual properties, maps rational numbers to dyadic rationals (those with a power-of-two denominator). Specifically, s...

There are now 4321 answers on the Sandbox
07:16
@ParclyTaxel 9735 actually
It's just that you can't see the 5400 deleted answers :p
 
4 hours later…
11:36
@Bubbler No, the default is Notepad.exe. Installing Git for Windows will go out of its way to install Notepad++ if you don’t stop it
@mousetail No, I know how to change it. It’s just weird to me that it defaults to vim on other OS’s but then Notepad++ on Windows
It doesn't default to vim on other platforms, it uses the global config
On unbuntu that is nano
on macOS it’s vim at least
Here's an excerpt from a thing I wrote: GIT_EDITOR='sed -i 1!s/^pick/squash/'
11:58
In NixOS it's nano.
I know how to exit vim but still can't figure out how to actually type in it.

I used it in git for a long time (only for merge commits) when I always just accepted the default message. I don't know how to actually change the message though
You have to press i or a to enter “insert mode” where you can actually type
then you press escape to exit insert mode, and get back to the point where you can either :wq or :q!
The real challenge is exiting vim
obligatory
I do i but then I type like to characters then get into some other random mode and can't type anymore
12:04
real coders use their task manager to kill the vim process
I can quit no problem
real coders press Alt+SysRq+K to kill all processes in the current virtual terminal
12:16
What does the SysRq key actually do?
it's like Ctrl-Alt-Delete except more dangerous :p
My work is going to force me to switch to windows :cry:
@Bbrk24 you sure? the release notes suggest vim is the default it comes with
> Send the SIGKILL signal to all processes except init
jesus linux
guys whatever you do don't press Alt+SysRq+I (using a QWERTY keyboard), worst mistake of my life
heh, I wonder how systemd'd react to every single service just dying at the same time
12:22
Systemd would just restart most of them automatically right?
maybe?
depends on what they're configured to do
you'd probably end up with a dysfunctional system at best and a broken one at worst
It might just be a faster system restart
Since you are rebooting most everything but not the kernel or systemd which take the mos time to start up
Depends on if it starts them in the correct order though, it might not
I wouldn't advise it, especially since killing every running process is liable to leave a lot of things unclosed
it would probably also kill DBus, which would be an even bigger kerfuffle
It there a way to send a more gentle kill signal to every procss at once?
That gives them some time to close resources
yeah, Alt+SysRq+E SIGTERMs everything (except init)
but if you really want the nuclear option Alt+SysRq+B will force-reboot the system
12:26
That might be a more sane way to do a quick restart. You'd still get the ordering issue though
systemd is pretty good at starting tasks in the correct order
Yea after boot, but I don't know if it respects the requirements when rebooting services
IIRC it does
but as we all know there's only one real way to find out
Ok then I'm doing that when I need to reboot. I don't have a SysRq button on my keyboard though
it's sometimes aliased to PrtScn
> From user space programs (such as a command line shell), SysRq may be accessed by writing to /proc/sysrq-trigger (e.g., echo s > /proc/sysrq-trigger).
or you could do that, I guess
12:31
I'm not root so I guess it wouldn't even work with the button
I'm not sure you have to be root? I'll test this later
I assume so, this seems like a major security issue if anyone could do it
You can't just kill processes from other users
yeah I guess
huh, it works on Chromebooks too
but you have to use Volume Up instead of SysRq
@Ginger okay rydwolf
blech, don't you accuse me of using a Chromebook
12:36
I do as I please and please as I do
( ͡° ͜ʖ ͡°)
I don’t have a SysRq key but I do have an email key and a calculator key
I’m also on Windows so
ooh do you have one of those big Dell keyboards
Fun times: When I use the calculator button in linux it opens infinite calculators. I press it just once and it just infinitly keeps opening more till I had to force shutdown my computer
sounds like my kind of key
12:45
C A L C U L A T O R
13:01
@Ginger Logitech, actually
13:13
I also have both play/pause and pause/break
LDQ For error tracebacks: Filename and code on the same line or on separate lines?
LDQ Show traceback lines inside libraries by default?
@mousetail What I’ve most commonly seen is some variation on “funcName at file:line” (or file:line:column)
@mousetail Only if debug symbols are available. Too many times has Swift given me “error at <some random assembly address>” for me to encourage that
    Either:

    /file/path/abc.cd: print(x)

    Or:

    At /file/path.abc.cd:
        print(or)
13:18
also maybe have some kind of visible cutoff between the user code and library stack traces
There is not nececairly a single cutoff point though, it can switch back and forth as library code uses user code again via callback etc
mm true
because it can be useful to see the library stack trace but it's also a pain in the ass to find where you're fucking something up (outside the cases where there's something wrong in the library that you can and will fix there)
hmm
i'd say display the cutoff under the last piece of user code in the stack trace
I'll definatly have a command line option to show the full stack trace including library code, just wondering what the default should be
The amount of library code above the user code in the stack trace is often significantly more than what comes after it, and is even more rarely relevant for the actual error.
Most any web framework will add like 10-15 stack frames before any user code even begins, that is the main part I want to get rid of since it's extremly unlikely that that code will cause crashes
13:26
mmmm
I’ve seen things where I have 20 stack frames of random framework assembly (not even function names, just addresses) before anything I can do anything about
maybe have a fixed small window of library code by default? though i guess yeah it depends on the library whether or not that's adequate for finding something that is relevant :P
so maybe just not showing it at all by default would work
What if I just show the top and bottom stack in a sequence of library code?
or maybe like three lines and then a line with a bunch of ellipses telling you about the flag you can use to get all of it
that would be smart
Also LDQ Absolute paths in stack traces, or relative to the current working directory?
Or just filenames?
13:30
if there's a concept of project root or whatever, do relative within that and absolute outside
or elide the absolute path leading up to the project root if it's inside
13:48
Swift is in the process of changing from absolute paths to “ModuleName/FileName”
 
3 hours later…
17:03
0
Q: Calculate the Smith normal form of an integer matrix

Daniel ScheplerGiven an \$m \times n\$ matrix of integers A, there exist a \$m \times m\$ matrix P, an \$m \times n\$ matrix D, and an \$n \times n\$ matrix Q such that: \$A = P D Q\$. P and Q are unimodular matrices (i.e. matrices which are invertible and whose inverses are also integer matrices); D is diagon...

17:21
@mousetail The code should definitely go on its own line. It should be identical to the line of code as it appears in the file.
Ok to strip leading whitespace though?
I'd say no
But that's probably 50% my pickiness and 50% Pythonism, so make of that what you will
If your language has any kind of syntactially meaningful whitespace, though, definitely don't strip it
Even in python whitespace is only relavent relative to other lines, it has no meaning when showing just a single line
@mousetail Sort of, although it gives you some context about how deeply nested the statement is. Mainly, I'd want it so when I'm skimming through the code file, I can recognize the line more easily.
Should I just Ctrl-G to go to the exact line mentioned? Maybe. On the other hand, I have had instances where the line numbers didn't match up because the code that was erroring was an older version than the current version I was editing, so...
18:03
0
Q: Minkowski's ?(x) for rational x

Parcly TaxelHere is Minkowski's question mark function: It is a strictly increasing and continuous function from the reals to themselves that, among other unusual properties, maps rational numbers to dyadic rationals (those with a power-of-two denominator). Specifically, suppose the continued fraction repre...

18:18
Why is $ e^x $ faster to calculate than $ 2^x $?
Probably because there is a instruction for it
2^x is obviously way faster for integers
Why do you think it's faster?
I used timeit module in python for x=100 and found that e^x was between 2 and 3 times faster.
In [3]: timeit.timeit("e**10", setup="from math import e")
Out[3]: 0.043408332999995025

In [4]: timeit.timeit("2**10")
Out[4]: 0.009667582999995261
That's not what I'm getting
Wait, for x=100 it is actually quicker
In [5]: timeit.timeit("e**100", setup="from math import e")
Out[5]: 0.047165832999993995

In [6]: timeit.timeit("2**100")
Out[6]: 0.24668895800000712
I assume math.exp would be way faster than e**x
/math.exp2
In [7]: timeit.timeit("exp(100)", setup="from math import exp")
Out[7]: 0.05063174999997955
Nope
About the same
18:33
Strange
(I'm on 3.9.9 btw, don't know if it makes a difference)
You'd need to use C to get a accurate measurement
I was using IDLE
With exp or ** notation?
Instead of importing math, I did e=2.718281828459045
18:34
I guess ** might be more efficient for integers
That would make sense
Using ** notation
maybe it’s because of Taylor series?
No, because 2 is a integer
I was a uggesting why e^x is faster
* suggesting not a uggesting
I'm guessing for integers they use a simple loop
so it's much faster for small values but slower for large values of X
that would explan Thonnu's results
18:51
progress
(it took me 2 days to do this lol)
@Seggan Doing this using Tkinter in python would be much faster.
python shudders
the whole point of this was to make it lightweight anyway
those 2 days were spent trying to figure out how to make an input box in tui
and also im racing ginger who is already doing it in python
It looks really nice, impressive
TKinter looks butugly
I have just seen what I presume is a switch expression in C# for the first time and what
why is it foo switch instead of switch (foo)
I'm pretty sure C# uses normal switch syntax
19:06
^
it does for switch statements
this is a switch expression
... Huh
I have a secret version in pure TS
@Bbrk24 Maybe for the same reason that Python uses a if cond else b
@mousetail the race is on!
19:15
Maybe we should define what features we need to be considered done? I want a quick channel switcher and the starboard visible but then I'm doneish I think. Or is there anything else you are planning to add you feel is nececairy for the chat experience
im planning for discord style :emoji:, channel tabs, and there was smth else...
reactions
Reactions would be nice
I'm thinking some kind of syntax like ^^^:smile: to react a smile to the message 3 above. So it looks kinda ok to people who don't have a special app
ooh good idea
I'm gonna add that (once Rydwolf's servers are back up, that is :b)
@PlaceReporter99 blech, tk
the PDF of GUI libraries
also, for Pride Month (yes I know I'm early) I made a little webpage tool for adding transparent flag overlays to an image! I'm going to put it on Rydwolf's server once it's back up but for now yall can download the source here
(it also works for the Ukrainian flag)
20:28
bruh why an invalid and not even golfed answer get 4 upvotes....
codegolf.stackexchange.com/a/260756/96039 like bruh first of all it take variable input, i thought yall say thats invalid??? and also the tio link is in the header like bruh. and also theres no golfing at all, all the latex syntax isnt removed
only thing that was removed was \operatorname but thats about it
and also theres suppose to be newlines between every expression.... where is that here???
@AidenChow It seems like there are some problems with the answer that need to be pointed out, but we do want to be gentler with new users who probably don't know about rules like not taking input from variables.
And our standard for golfing is "makes some effort," not "golfed as well as an expert in Desmos golf could golf it." ;)
@DLosc bruh theres like no golfing effort lol, if i copy pasted each expression straight from desmos that would pretty much be what i would see, all the \left's and \right's are all there. as i mentioned before the only thing that seems to be removed is \operatorname but pretty much half of these other golfs can be seen in the tips for desmos golfing page
like at least 20 bytes can be removed from trivial removals like that
not even considering more "nitty gritty" golfs like restructuring the code or anything like that
20:44
@AidenChow So they haven't read the tips for golfing page. ¯\_(ツ)_/¯ What's trivial to you might be black magic to someone else. If so, view it as an opportunity to introduce someone to something really cool.
Here's an example of a good comment to a new user whose post had formatting and content issues.
@DLosc its common desmos knowledge to be able to remove the latex syntax that is copied out.... the \right's and left's for instance are only there to make the expression look better
@DLosc the link dont go anywhere??
its not showing any comment
@AidenChow Huh, works for me. Try this link (to the answer) instead?
@DLosc oh ye that works
bruuuh holy fuck i just scroll down and see this post, dude cmon is this guy even trying to golf: codegolf.stackexchange.com/a/260744/96039
@AidenChow Anything that's "common knowledge" is something everybody had to learn for the first time at some point. Why not post a comment saying, "You can save bytes by removing the \right's and left's--they're only there to make the expression look better"?
^
you had to learn all this stuff yourself, no?
20:59
@Simd Why are they not useful?
@AidenChow case in DLosc's point: you had to point that out to me too
damn dupe answer from mine, first time that happen to me lol: codegolf.stackexchange.com/questions/36260/make-an-error-quine/…
(my answer for reference: codegolf.stackexchange.com/a/253419/96039)
21:16
ooh 2023 SO survey is on
don't take it, you don't get a badge
and the reason for that is SE playing fast and loose with the data from the earlier ones and trying to cover their ass this year
didn't ya see the meta post?
-140
Q: (UPDATED 2023 May 8) - Changes to the Census badge

ZachAs we prepare to launch the 2023 Developer Survey in the coming days, we wanted to provide an update to the community regarding the Census badge. In case you're not familiar with the Census badge, this badge is awarded to users who complete the Developer Survey. Beginning this year, we will no lo...

@Ginger its fun to complete it, idc abt the badge
alright, go ahead I guess
21:24
^^
Although I didn't realize the full data set of results was made public
It's probably not a big deal for me--I didn't put much on the survey that you couldn't learn from my GitHub page :P
theres a whole AI section this year
indeed
they also dropped the "about you" section, probably because of ^^^^^^^^
nope, they havent
???
the questions about "what's your gender" and such were gone when I took it
ah such ones
i still get age, location, years coding, schooling
21:31
ah
@Neil Pip -p, 12 bytes: R:@YUW\,aFLy
Or 10 bytes by porting Unrelated String's Jelly answer: vE_*_SK\,a
@DLosc Hm, I also didn't realise this. Surely, I'm easily identifiable. I'd be the only Danish full-time APL-only programmer in my age bracket that has been programming since I was a child. I guess my salary was made public last year. For me, that's not a big deal, but I can definitely see why some people might not like this. Btw, in Sweden, everyone's salary is public info.
22:14
0
Q: Given 4 fence lengths, what's the largest rectangular yard you can make?

blaketyroHere's a very simple little problem that I don't believe has been asked before. Challenge Write a program or a function that takes in four positive integers that represents the lengths of movable but unbreakable and unbendable straight fences. Output the area of the largest rectangular yard that ...

 
1 hour later…
23:39
@Adám which begs the question: how many SE users are as easily identifiable as you are?
surely not many
why is working with callbacks so hard in rust

« first day (4483 days earlier)      last day (658 days later) »