« first day (4549 days earlier)      last day (591 days later) » 

00:35
What's the most cursed thing you've ever seen in a package.json? Because I unironically have this
"start": "node -e \"(e => e().use(e.static('.')).listen(3000))(require('express'))\""
00:59
@Bbrk24 why wouldn't you just move it to another file?
I just need a static file host for local testing some things
I literally don't use express for anything else
here's the full package.json if you want to look
python -m http.server 3000
01:15
I actually don't have python, I have python3.11. Thanks apt.
I did stick alias py=python3.11 in my bashrc so I don't have to type that out every time
 
1 hour later…
02:34
So I recently started spellchecking my code, and I've fixed most of it, but there's still two variables it's complaining about. I'm not sure what to rename them to
static std::default_random_engine reng((std::random_device())());
static std::uniform_int_distribution<int32_t> rdist(INT24_MIN, INT24_MAX);
03:19
re or engine / dist or distrib or uniform_int?
04:03
The only time I actually use them is in the call rdist(reng)
lol nice
could always just expland the r to random :P
04:24
the spellchecker accepts distr so I'm using that and engine
Also, I have realized that I don't have gcc but I do have two different clangs
05:01
clang.clone()
how many clangs in a cacophony?
0, because "cacophony".count("clang") == 0
 
3 hours later…
07:50
@Neil I stick a pen through it and use it as a pen holder (if I did have one)
 
1 hour later…
08:52
What's wrong here? It works, just like the other answers that use the same method, but somehow it has a downvote.
 
2 hours later…
10:33
@TheThonnu I'm guessing it's just because people are tired of seeing the same technique over and over again
10:44
@TheThonnu my answer got downvoted as well despite not using the same method @mousetail . It might be serial voting...
or maybe mine was just too long.
I'm thinking 65% chance it's the latter
10:58
0
Q: Maximum of number of elements in an array sum up to target

Mallikarjunaiah-Arjun Kgiven an array of numbers {2, 3, 5, 5} and a target say 10. we have to find the maximum number of elements that sum's up to a given target. return 0/-1 if not possible to get the target sum. we have to consider each element only once. I know the DP approach for the variation of this problem where...

11:15
0
A: Sandbox for Proposed Challenges

I am kind of a language devPython: *args or **kwargs? Is it a regular argument or a keyword argument? In Python, there are two types of specifying arguments to a function: Regular argument (arg): f("regular argument") Keyword argument (kwarg): f(keywordarg="keyword argument") Keyword arguments in Python always are in the ...

@NewPosts I accidentally flagged that
@SandboxPosts is 1 downvote in less than 1 minute normal for a sandbox post?
Why wouldn't it be?
11:37
my sandbox post was never downvoted
@SandboxPosts Regex, 29 bytes: ^[a-zA-Z][a-zA-Z0-9]* *=(?!=)
what about underscores? Also, if you allow underscores, it's shorter overall: ^[a-zA-Z_]\w* *=(?!=)
Oh nice
0
Q: Landmine Number V

Jacob CreutzfeldtBackground You have again x4 been given the task of calculating the number of landmines in a field. But this time, the field is not a number field... it's a field of letters. Our landmine letter operator is sick and requires you to cover for them. They left you the following note: Things work a l...

@mousetail looks exactly like the screenshot in the comment on Chrome Android (on mobile)
11:57
@Bbrk24 aren't underscores ascii?
They are
12:09
@Iamkindofalanguagedev they are, which is why I asked. Mousetail's answer didn't accept them.
12:45
@Bbrk24 ^(?!\d)\w+ *=(?!=) might work
Actually [^="']+=[^=] seems it would be enough since the input is guaranteed to be a valid expression
13:15
@SandboxPosts Python, 20 bytes: lambda*a,**k:a and k (takes the input as actual code not a string, outputs {} for args, () for kwargs)
Obviously not a real solution though
It won't work for the test case a=b since b is undefined
The challenge is poorly specified so it's probably as valid as anything
chuck it in an eval and it's almost valid :p
13:44
You could probably solve it with dis
I FLAVOUR ALL DUPLICATES WITH BUTTER
Tasty dupe :p
14:05
I have 2 questions on 2 separate sites on HNQ right now
I wonder what the record is, has anyone gotten HNQs on 5 separate sites simultaneously before?
I HAVE AN APTITUDE FOR BUTTER
Oh god, who gave lyxal a diamond? :P
(/jk congrats on the modship)
14:47
wait. so he now has chat mod powers everywhere?
Nope just on Stack Exchange
2
other chat exists?
Apperently
Not sure if it applies on SO since SO has it's own chat server
15:25
@Neil SO and MSE
15:57
0
Q: Diagonalize a vector

bigyihsuanDiagonalize a vector into a matrix. Input A vector, list, array, etc. of integers \$\mathbf{v}\$ of length \$n\$. Output A \$n \times n\$ matrix, 2D array, etc. \$A\$ such that for each element \$a_i \in \mathbf{v}\$, $$ A = \left( \begin{array}{ccc} a_1 & 0 & \cdots & 0 \\ 0 & a_2 & \cdots & ...

16:53
@Neil Yeah, moderators get mod powers across basically all chat rooms on the chat.SE server
But only if we associate our chat account with our mod parent account
17:07
1
A: Diagonalize a vector

Luis MendoMATL, 2 bytes Xd Try it online!

Xd
I think I recall at least one other MATL solution that was a smiley
X is a prefix for a lot of MATL's commands, so you can get stuff like X), XP and XD
I know X) is indexing, but I can't remember what XP and XD are. I think XD might be determinant?
now i'm just sad that there's nothing that :) and ;) are the shortest for in jelly :P
17:31
:) is a joint shortest way of mapping a list of numbers to a list of 1s
;), :` and 1€ all work
17:44
standalone, :) is just worse : and ;) is just worse ż
you'd need some specific use for the chaining effects
18:44
TIL: £ is not an ascii character
@cairdcoinheringaahing i think XD is the laugh command (XD)
@PlaceReporter99 you didnt know?
@Seggan-OnStrike correct
@mousetail in what way?
@PlaceReporter99 Americans only care about themselves :P
So they only included the dollar symbol
My phone keyboard has Chinese yuan ¥
Probably because it was made in china
My phone keyboard has £€¥$¢
Btw £ is in extended ASCII
18:58
@PlaceReporter99 Type import string; print(string.printable) in python so see every ASCII character
My phone keyboard has £€¥$¢₩₽
@mousetail but those are just all PRINTABLE ascii chars I think.
mine only has $€£¥
i don't think £ is an unprintable control character :P
@UnrelatedString press and hold the £ symbol and you might see more.
i tried
oh wait i do get more if i press $ actually
@PlaceReporter99 The unprintable are all extremely boring, and mostly not used anymore. Wei red control characters
19:01
₽¥€$¢£₩
• bullet point 1
• bullet point 2
ohhh, good points
@mousetail what about character 0x07? When echoed in the terminal, it makes a noise!
If a character is less than 0x80 it's ASCII
@mousetail or print([chr(x) for x in range(128)])
19:05
Yep
@TheThonnu lambda x:eval(f"(lambda *a,**k:a and k)({x})") same output, but takes the input in the required format: a string.
Still doesn't work if the variables are not defined
Would it be a valid argument then?
19:22
Yes of course
19:34
@SandboxPosts spec really needs to nail down just how deep it has to go/be self-contained with defining what kinds of inputs are well-formed
like, i assume that answers don't have to handle splats so they don't have to literally just evaluate python
and i also assume strings are a thing, versus just quotes being funny characters that can be in identifiers, but that isn't spelled out
(and you should actually spell that out on top of adding a test case like "a=b" -> arg)
what kinds of non-kwarg-assignment expressions containing equals signs are well-formed
presumably we have to recognize a==b is an arg and a=b==c is a kwarg but can answers assume we never get a==b=c
or a===b :P
 
3 hours later…
22:14
@cairdcoinheringaahing enough people decided it should be a thing that is a thing, they decided.

« first day (4549 days earlier)      last day (591 days later) »