« first day (3769 days earlier)      last day (1072 days later) » 

3:00 PM
@WheatWizard Can you do where f::Int->a to save a few bytes?
 
No. Pure functions with the signature Int->a are impossible to create.
 
:(
 
Wzl
@WheatWizard you can take input as a list, pretty sure that's the standard way for Haskell to take variadic arguments (or as Maybes)
 
That reads as a function that takes an Int and outputs whatever you want it to.
 
oh, Haskell...
 
3:01 PM
@Wzl It's boring though.
 
Wzl
f a (Just b) = a + b
f a None = a + a
 
ngn
@WheatWizard "I believe there are 15 747 724 136 275 002 577 605 653 961 181 555 468 044 717 914 527 116 709 366 231 425 076 185 631 031 296 protons in the universe and the same number of electrons" --some physicist :)
 
I love the fact that computer science papers just assume everybody uses Haskell and don't ever mention what language they're using
 
Wzl
> Some prior exposure to functional programming would be helpful in reading this
article, but special features of Gofer (Jones, 1995b) — our implementation language
— are explained as they are used.
 
Gofer is a implementation of Haskell.
 
Wzl
3:06 PM
they mention it, but later
 
oh ok
 
Wzl
@pxeger true, but still it's a pretty reasonable assumption IMO
or at least it's reasonable to assume the readers will understand haskell
 
ngn
@ngn others suggest a much lower estimate
 
Haskell is basically pseudo-code after all.
 
Wzl
@WheatWizard VTC as "I disagree" :P
 
3:11 PM
— nobody, ever
ninja'd!
 
haskell is more pseudocode than most imperative languages
 
Very basic Haskell mkight look like pseudocode, but all those .s and <$> get very difficult to read
 
Wzl
@rak1507 true but I still had to make my joke
 
@user true
 
@rak1507 Depends on what kind of pseudocode you write, I guess
 
3:13 PM
I think the notion that any language is basically pseudo-code is pretty absurd. I hear it commonly about python, which I think is quite false.
 
yeah
 
yeah I don't agree with python being pseudocode-like lol
 
It's certainly simpler than languages such as Java, but it ain't pseudocode either
Not that looking like pseudocode is necessarily a great thing
 
Yeah, I'd prefer my programming language to look like real code!
 
Brain-flak is pretty close to pseudocode, very intuitive syntax.
 
3:15 PM
^
 
ngn
if pseudocode could be evaluated, we would be calling it code
 
someone just needs to make a pseudo-interpreter then
 
AP computer science pseudocode is probably the worst pseudocode I've ever seen
 
I think pseudo-code is undecidable.
 
3:18 PM
It [AP CSP pseudocode] has the aesthetics of SQL, and the functionality of TI-BASIC
 
for Turing machine T with n states
  print 1 if T halts 0 otherwise
2
 
was TI-BASIC anyone else's first experience programming here?
 
I guess it suposed to look like natural language, which is undecidable itself
 
i mean if there were a formal standard for pseudocode it'd just be code. everyone has different ideas of what pseudocode should look like which is kinda the point :p
 
I programmed in TI-BASIC pretty early on, but it wasn't my first.
 
ngn
3:20 PM
@RedwolfPrograms mine was basic, but not "ti-"
 
@RedwolfPrograms If you count making a program to let me cheat on a mah test, then yes :P
 
i've never actually used TI-BASIC
 
My first was Z80 assembler.
 
I made some pretty cool stuff with it [TI-BASIC]
 
@WheatWizard It's that easy to pick up?
 
3:21 PM
I'm afraid to say my first language was Python
 
That explains a lot
 
Assemblers are a lot more tolerable when you don't know what normal languages look like. I learned to program thinking that all programming looked like programming in assembly.
 
I'm kind of excited to order my new laptop, I'll have a windows 10 partition so I can upload programs to my TI-83+
Not that I'll ever use it again
 
Wzl
my first was C, except all I did was pasting from SO and some other source I forgot. Still, that may be a valid way to learn
 
Duct tape coding
 
3:22 PM
My first was Python, I actually found the book I used the other day when my parents were clearing out some old books
 
Python was the first language I used that didn't have goto, and it was very hard for me to understand how I could program without goto.
 
@WheatWizard lol
 
Same here actually, but with JS
 
I eventually figured out how to define functions and figured out I could more or less do goto using recursion.
 
lol
 
3:23 PM
I actually asked a stack overflow question about that
And the answer was basically "stop being stupid and use functions"
 
Wzl
@WheatWizard was thinking this, but with pointers
 
Did anyone else here start out with logo?
 
Wzl
@user not me but logo is a pretty good language
 
Pointers are fun. I loved using pointers in C++.
 
i touched python for a bit earlier, but I think the first language I actually started using and learning was JS
 
3:25 PM
TI-BASIC then JS then HTML/CSS then PHP for me
 
@Wzl I don't remember much of it, but yeah, it was pretty nice (rather basic though)
CMQ: Which languages did you learn first?
 
Wzl
I looked at python first because a friend was making pygame games, but I didn't understand it
 
I remember when I had just started prorgamming, being on a plane and using my legally obtained copy of a C++ book and reading the section on pointers about 8 times over before I understood them
 
@Wzl Wait really? I found Python pretty easy to get started with (although I never did anything complex at first)
 
I actually didn't use Z80 assembler, I used a similar assembler for the gameboy that doesn't have a name that I know of.
 
Wzl
3:27 PM
@user yeah (I didn't understand programming at all except that you do this then that then another thing)
 
for fastest code you run it with time on linux?
and then include the "real" time?
 
yep there's no reason that wouldn't work I think
 
and then I say what processor and compiler I used?
 
Wzl
reading The C Programming Language (ANSI C) was when I first "understood" programming
 
Imagine reading a book to learn programming
@Onir Not the processor, but the compiler, I think
 
3:32 PM
I tried to learn C++ from a book at least three times
 
Wzl
@Onir you don't have to, only if you rely on compiler-specific things (which happens fairly often for code-golf)
 
oh neverming
some problems give a special scoring system right?
like this one explicitly states how to score
7
Q: Patterns in Permutations

Peter KageyThis fastest-code challenge is based partly on this MSE question and exists to extend some OEIS sequences, and create others. If I extend or create sequences based on this challenge, I'll link to this challenge so that folks can see where the values come from. If you'd like direct credit, include...

 
Wzl
yes, when they have or a different criterion like , or
 
no, you probably should specify the processor for fastest-code, so people know how comparable your result's gonna be
And for fastest-code, typically the challenge author will test all the submissions on their own hardware to make it fair
 
@pxeger I thought for fastest code, the OP uses their own computer, so you can't select the processor
 
3:34 PM
no, but including your own results is a good idea so you don't need to wait until the OP times it
 
oh ok so most of the times the op is going to run the code for the answerer?
 
Wait what...you can get 4K on a 13.3" screen?
 
In order to ensure fairness, the official score is given by someone (usually the OP) running the code on a specific machine so everyone is tested on the same environment
 
@RedwolfPrograms totally not worth it though
13.3" is far too small for it to be appreciable
 
That would be awful, yeah
Everything's too small even with FHD
 
3:38 PM
why not get a bigger laptop?
 
I like 13.3"
 
but you just complained that everything is too small to read
 
@pxeger Ah, makes sense
 
Oh nice, just realized I can still get the MX450 if I get an i5 and 8GB of RAM (saves like $170 since I have no need for 16 GB)
@pxeger Well not unpleasantly small
Anything with a reasonably good DPI will be like that
I'd rather just zoom in a bit than have everything be all pixel-y
 
Even on my 27" 1808p monitors nothing is noticeably pixel-y
 
3:40 PM
Maybe I'm better at noticing pixel-y-ness then :p
The only problem I've had with 13.3" is that it's a bit small for more powerful CPU/GPUs, so it heats up a lot
But that's easy to fix I think
 
3:54 PM
Nice, the i5-1135G7 has a max frequency of 4.20 GHz
I think we should stop trying to make faster CPUs. We have reached the perfect speed.
 
we could go up to 6.90 GHz
 
Good point
 
4:21 PM
@RedwolfPrograms Are you still planning on rewriting the Plumber interpreter? Because at this rate, Plumber's going to be LotM in less than a week, so you're probably going to want to do that before then.
 
I've started on rewriting it, probably shouldn't take me too long
 
is there a tag for finding extremal combinatorics?
find some discrete structure that does this well
 
I don't think so, codegolf.stackexchange.com/tags/math/info has a good list of math related tags here
 
CMC: where on SE can you see users' unabbreviated reputation? I want every page that displays it
 
@RedwolfPrograms I've bought a 1 To Crucial MX500 one month ago to replace a dying HDD. This is my first Crucial drive. I'm happy with it so far, but 1 month is obviously too short to reach a final opinion.
 
4:32 PM
"1 To" - now we know the enigmatic Arnauld is probably French (if it wasn't obvious already from his name and picture)
 
@RedwolfPrograms As a matter of fact, the other drive in my laptop is a Samsung SSD which has been working fine for several years.
 
Sounds like they're both probably good options then. Thanks!
 
Do you need to make a backup of the old drive on the new one?
 
No, it completely failed :/
Luckily I'd copied over a few important things a day or two before
 
I know exactly that feeling. :-/
 
4:36 PM
0
Q: set of exams that guarantee at least one good score

OnirAssume a standardized test has \$15\$ multiple choice questions, with $3$ options each. A school has some students and wishes for at least one of the students to get \$10\$ correct answers. Since no one in the school knows any math they are going to cheat and tell each student which answers he ha...

 
how would this be scored?
code-challenge is the goto non-standard but it's not really a code challenge is it
 
@pxeger Any page that has the abbreviated rep; if you hover over it then you can see the full rep.
 
A list of every page that displays rep seems like a pretty niche thing to be looking for, and I'd imagine there are way too many to count
 
@AaronMiller huh, I didn't know that. But where can you see it to start with (besides for your own user in the header)
 
Users page
 
4:40 PM
@RedwolfPrograms Well I don't actually want/need a complete list, I just want to see how many people can come up with
 
Under any answer or question
 
no?
 
It shows rep there right?
 
i think if you hover their pfp it shows
not sure
 
Anyone else arrange their pinned tabs by the main hue of their icons?
 
Wzl
4:43 PM
imagine pinning tabs (which is a good thing to do, I just always forget that pinning exists)
 
Wzl
also the one tab I would pin would be the TNB, but then I can't see the (1)
 
i arrange them based on some random consistent order
 
Imagine having enough tabs to pin
This post made by post a tab as soon as you think you're done with it and then regrent closing it too early gang
 
Half of my pinned tabs I don't even need anymore, but if I close them something feels off
 
4:47 PM
i have discord, gmail, gmail, outlook, review queues, MSE, SO, and meta CGCC pinned
 
Wzl
@RedwolfPrograms if you see a color in a context does it ever make you think of a word (that's not a color)
 
No
It's not a reversible function :p
 
My pinned tabs
 
How do you have a green background? Is that a custom theme?
 
Windows accent color
 
4:50 PM
Oh ok
 
You can set custom chrome colors too
 
Are you talking about an extension or a userChrome.css?
 
@RedwolfPrograms You don't need to pin your tabs if you just don't ever close chrome or reboot your computer.
 
@user Neither
Go to the new tab page and there's a little edit icon in the bottom right
 
Wzl
my pinned tabs
 
4:52 PM
Oh nice
 
@AaronMiller I don't pin them to keep them around, I pin them to make them take up less space :p
 
true, true
 
same lol
i have 17 tabs rn
 
:o
 
I have like 20 tabs spread across 3 windows
 
Wzl
4:54 PM
I have tab groups that I just use as a poor replacement for bookmarks, so I always have too many extra tabs
nineteen tabs rn in this window, then another window for viewing images with one other tab (r7rs spec)
 
@RedwolfPrograms i'm tempted to try and report it to SE if that's possible. i can access everyone's IP already anyway (logged, of course) but if this is possible that is.... a rather significant security issue
 
0
A: Sandbox for Proposed Challenges

OnirAssume a standardized test has \$15\$ multiple choice questions, with \$3\$ options each. A school has some students and wishes for at least one of the students to get \$10\$ correct answers. Since no one in the school knows any math they are going to cheat and tell each student which answers he ...

 
5:13 PM
29 messages moved to Trashcan
I am hiding these messages because if it is actually possible, it's best nobody finds out about it until I can confirm it works and report it.
 
"-̥̊(-̥̊(" this is cursed
 
@Wezl Firefox shows a blue blob instead of the (1) if the tab is pinned.
 
5:29 PM
@Wezl How so?
 
My pinned tabs:
 
Also, congratulations on getting your old name back
@Adám You really need to check your mail :P
 
or click mark all as read
 
Gmail (for both private and company email), Gvoice, The APL Orchard, Company calendar, APLcart, Kids schedule on Gsheets, Slack for Array Cast, TNB.
@user @Onir No, I use mark-as-unread to keep track of things that need positive action from me. Currently at 147.
 
Oh ok
 
5:33 PM
I just thought of a way to golf the Vyxal truth-machine from 4 bytes to 3 bytes, went to add it in a comment, and saw that I had already golfed it to 3 bytes with a completely different method. :p
 
Suffering from success :P
You can always add the other method too if it's interesting
 
True. I think I'll do that.
 
which will also bump it for a reasonable reason => upvotes
 
Well, it's not my answer, so I just left it as a comment.
 
5:54 PM
Biweekly Mini Golf is two days from now
 
has it really only been two weeks?
 
May 19 at 14:21, by user
Feb 28 at 1:17, by caird coinheringaahing
idk the physics behind it, but time has been on some hardcore drugs for the past 18 months
 
well as they say time flies when you're having fun
 
Hopefully I don't get put on some sort of watchlist for searching "hardcore drugs" in SE chat lol
 
5:59 PM
Oh nice, got a 50/50 on that state biology test I finished in 21 minutes
state biology and human geography sound like they'd be the opposite of each other lol
 
only 50/50 and not 100/100? smh :p
 
Currently in a hallway where if I walk two feet in one direction I lose wifi
And I walk in circles
 
just teleport to the next point with wifi
 
So I lose wifi every circle
 
so, my server just got a bunch of requests that are very obviously an automatic hack attempt ಠ_ಠ
 
6:06 PM
Happens quite often
 
unfortunately for them I do not use any standard/sane environment/setup so automatic attempts won't get you anywhere :D
 
I used to actually try to stop them, but there's not really any point
 
it's weird tho cuz i haven't seen this too much (i think my server blocks a lot of them before they get to my flask app) and i just got this after recently posting my site to three locations - one in a private SE room, one on a private discord server, and one in a semi-private discord server
 
Might've been scraped
 
and i don't think anyone in any of those three locations have the intent/ability to launch an attack against me, so it must just be a really massive coincidence :P
@RedwolfPrograms well my site is on my SE profile so that wouldn't surprise me
i'm not concerned :P it's just very odd and coincidental timing
our server actually got hacked once because we forgot to install sshguard but fortunately the host service detected weird stuff and just automatically shut it down lol
 
6:09 PM
I've got private keys required for mine
 
i'm not sure if we still have username/password ssh for our server; I think i've switched everything to private keys
 
Passwords are for people who don't take the time to memorize their RSA keys
 
Honestly passwords are probably fine for otherwise secure SSH as long as you don't use a weak password
 
i mean with sshguard it's fine
i've actually gotten locked out of my own server by sshguard cuz i mistyped my password like twice or thrice, lol
 
6:24 PM
Considering forking Text so I can change the syntax highlighting and theme
I wish Atom ran fast enough to be viable as a text editor on Chrome
ugh
there is something under my desk
c'mon why do people put gum there
import { CodeMirror } from "./edit/main.js"

export default CodeMirror
What is the point of this JS file
Why do people do this to themselves
Just write code like a normal person
And then there's a 10k line file right after that
 
6:41 PM
@RedwolfPrograms so the previous security exploit is already on public meta so it's w/e to talk about it. this has been known for almost 11 years and nothing has been done about it
not only can you grab IPs, you can also freeze people's browsers and such
 
You can also potentially use it to get badges like announcer, not sure if chat is considered an SE origin
Oh never mind
That requirement was removed
So yeah, I think you can get announcer without a single person clicking the link
Just sticking the link in a few popular chat rooms with #.jpg appended is probably enough
I kind of want to test it, but I can't think of a way to do it without falsely getting a badge (maybe a sockpuppet?)
 
...or is that how the badge is meant to be grabbed :?
 
Plus it'd involve posting basically spam in enough rooms to have 25 unique people see it
Which would only be two or three if you did it right, but...
Not something they should really allow
I'm also worried it could be used to get ad revenue in some manner
TIL there's a "Not a Robot" badge on SO
 
in any case, allowing people to cause other users to involuntarily make a request to a random URL is... bad just in general
 
6:49 PM
might be worth a userscript to block showing images not from imgur?
 
I'll immediately get to work on that
 
it's been around for 11 years without many issues but... granted, if my IP's been getting grabbed this whole time, i wouldn't even know
that's the concerning part - you can't tell if a non-imgur hosted image is logging your IPs even
 
luckily, I've already grabbed your IP from when you visited ato.pxeger.com
 
I have text file where some of the lines end ^M" Is that a special code?
 
That's a carriage return
Windows newlines
 
6:55 PM
I can see it with cat -A in Linux
@RedwolfPrograms with the " too?
 
Looks like you've accidentally run into a windows user. Don't worry; if you don't look them in the eyes they won't hurt you.
Hm, not sure what the " is
 
Me neither!
 
@Anush probably some weird Windows encoding jank. You have 2 solutions: try to fix it with iconv and other wizardry, or never use Windows again
 
If anyone knows about weird windows encoding jank I would love to know :)
 
I suspect nobody, not even anyone at Microsoft, knows about weird Windows encoding jank
 
6:57 PM
I haven't used iconv
It's very hard to Google
 
It's a coreutil to convert text encodings
 
I mean ^M" is
 
oh
 
:O I'm locked out of my email. Not good. (I forgot my password after changing it)
 
Just get them to send you a recovery em...oh wait
 
7:00 PM
Stop using email!!
 
wait, just realized I had a backup irl *phew*
 
Nothing good comes of it
 
thank goodness I'm not that stupid
 
That is good news
 
*proves himself wrong*
 
7:03 PM
Okay, now to test my new userscript
 
@Wezl I accidentally locked myself out of online banking once by changing the password without updating a password manager, had to phone them up and admit to being an idiot
 
can undelete the private chat room :p
are you still on school network?
 
Have we had a challenge about weighted probability sampling?
 
> can undeleted the private chat room
???
 
7:06 PM
oops
undeleted the chat room, if you ever want to hop in there to test. i suppose there isn't a problem keeping it undeleted since it's private anyway
 
i removed the URL endpoint to the image tho oops
but it still seems to be fine in chat; caching i guess
 
Right now I'm trying to figure out how to intercept the image before the src is even added, since instantly removing it from the DOM still sends the request
 
I am tempted to ask a question about it
Or a CMC
CMC given an array of non negative weights, sample an index randomly proportional to its weight .
 
7:19 PM
@Wezl which I spelled wrong
 
@Wezl ripperoonioes
 
@pxeger oh thanks, that's working
:D hi Gold Farmer Sprow, nice to see you again
 
I am a piece of clothing you wear on your feet.
(I'm a sock of red)
 
red?
 
7:24 PM
Me!
 
@GoldFarmerSprow ikr I feel the same way sometimes
 
oh
 
I really want to test that announcer exploit now, but I'm not sure if it'd be unethical
 
7:50 PM
hmm i have input if 1/2 else raw_input in prod code
this is probably a bad idea
 
I posted a question and was suggested to first pass it through the sandbox
I should let it simmer for 72 hours?
 
Typically you'd leave it until there's plenty of feedback and you feel it's ready
 
so if I don't get any positive feedback it's probably not good to go?
 
Either that or it just hasn't been noticed.
 
after a while (like once a day maybe) you can place it in this room or The Guild of Reviewers if you feel like it needs more feedback or upvotes (which indicate it is a fine challenge and close to be ready to be posted)
 
7:55 PM
^
 
oh ok thank you very much !
I'll do that tomorrow :)
 
@hyper-neutrino for the love of all that is holy eliminate Python 3 support
 
@hyper-neutrino I was going to say "so this means you have raw_input defined even if it's python 3?" but nope I guess that doesn't matter
 
0
Q: Permute the bits of a byte

rain1For this code golf challenge permute the bits of a byte according to the rule 01234567 -> 30421657 for example 11110000 would be permuted to 11011000. and 10101010 would be permuted to 01110100.

 
^ I think that's a dupe
 
8:09 PM
I second that
if I/O must be an integer, then this is pretty much a dupe
there isn't much new; we could make 40320 challenges by just using a different permutation
 
Is that the real number?
 
It is lol
 
anyway, I am using my hammer
 
And if we include ones where bits are skipped or duplicated, 16777216
 
8:11 PM
oh it wasn't tagged correctly
do you have a hammer?
 
you do not
either way it wasn't actually tagged right anyway :P
 
I'm not even halfway to my silver code golf badge lol
No hammer yet :p
 
oh lol
 
8:12 PM
Ash would've been a free reputation machine but...oops
Turns out it bad
 
wait how do i have silver code golf
oh it's specifically for answers
 
If questions were included I'd have a platinum tag badge signed by the president of code golf
I have as many of those as I do answers
Actually I have less than 150 total :|
 
ngn
8:29 PM
@Anush can we assume the weights are non-negative ints?
 
@ngn yes
 
ngn
@Anush *1?&:
 
8:45 PM
Wow!
I guess that's built in
I wonder what you can do in C
 
@Anush lol no K does not have builtins in the sense of mathematica
 
ngn
@Anush there's no primitive for "weighted average". i'm using "where" - it tells you the positions of truthy elements in a boolean list: &1 0 0 1 1 -> 0 3 4, and it's extended to allow elements greater than 1 in the input - in that case it replicates the index multiple times: &2 0 0 5 1 -> 0 0 3 3 3 3 3 4. then *1? just picks one uniformly at random.
 
@Anush Just be aware that this solution is potentially very wasteful. It generates a temporary list with as many elements as the sum of the weights.
 
JxµX in Jelly
with the same issue Adam brought up about the K answer
 
@ngn fascinating. So if they were floats it wouldn't work?
@Adám thanks
If anyone can try it in C I would love to see a solution
 
8:58 PM
JxµX chains as J (1), x (2), X (1) since µ is the monadic chain separator, so it generates the indices for the list, repeats each by the corresponding number, and then randomly selects an element from that. so, basically what ngn's solution does
 
@hyper-neutrino how about for float weights?
 
does not work
i don't think jelly actually has a float random built-in, i think it only works on integer randrange
 
Let's change the CMC to have floats
 
ngn
@Anush that's why i asked first :)
 
@ngn :)
 

« first day (3769 days earlier)      last day (1072 days later) »