« first day (2144 days earlier)      last day (2994 days later) » 

16:00
I thought so. Thanks for the link
@ArtOfCode Oh I know but it was really bothering me that it was sticking around
well it ain't now it's been eleven'd
0
Q: C++ program for reading grades into array

user6508615Write a program that reads grades from the keyboard into an array. The program should read up to fifty grades or stop asking when the user enters a negative value. After all grades have been input, the program should display the total number of grades along with the average, and the grades shou...

um... yeah
Heh. If only this wasn't the exact text of my latest university assignment. — ArtOfCode 18 secs ago
@ArtOfCode is it actually, though?
16:07
@PhiNotPi yep
well
@ArtOfCode lol
incredible
It's the exact text of one of the latest assignments. It's not actually mine, but one of my friends got that one.
I'm on the Python/Java stream, he's on the C++ stream
@DJMcMayhem ok thanks any help tho ?? — user6508615 17 secs ago
Does that mean they are in the same class? It's kinda creepy when a real-life connection shows up on the internet.
^ I love those comments. "Okay yes this is totally off-topic I'm sorry. But help me anyway plorz"
@PhiNotPi entirely possible, yes
Quite a lot of people are on SE from my course
16:09
@ArtOfCode wow. "No, we're not gonna help you". "K,thx but plz send the codex anyway?" "..... No."
I take great pleasure in accidentally leaving a page full of moderator tools up and making 'em all jealous of my mod powahs
@ArtOfCode have you done it ?? — user6508615 28 secs ago
...this guy is getting trolled.
Or trolling
oh my god
Definitively getting trolled
no as in I'm gonna troll him. "Yes, I've done it. No, I'm not going to help you."
16:12
"have you done it??" "yes, i have" "ok good for you"
i don't understand how people find ppcg before stackoverflow
Because these things are 'puzzles'
or why they think a "programming puzzles and code golf" site is appropriate for a homework assignment
So 'Programming Puzzles and Code Golf' sounds ok for a homework
Not worth my time to respond
Gotta remind myself that before I get sucked in
16:14
@Poke BTW he has had a SO account 5 months before he made the PPCG account today.
Actually, I think the site's name lacks the word "challenge"
@ErikGolferエリックゴルファー that only makes it more ridiculous
So maybe they thinks it's ok to post puzzles that aren't challenge
@Tux I wouldn't tell him SO is where to go if I were you
he'll just re-post verbatim and get shut down
ik, but if he want a help platform he should look at SO
Not here
@GabrielBenamy 😆thanks — user6508615 1 min ago
ok he use emojis
16:15
At least have the question closed as "unclear what you're asking" there too.
@TuxCopter >in which I get thanked for linking someone to Let Me Google That For You
@quartata Great to hear, but I didn't do anything to non-dev that should have solved this problem. Now I'm worried.
I think we should stop humoring him now
That's a 404.
> [At]ArtOfCode ok thanks 👍🏾 so can you give me a screenshot of your assignment 😊😊
lmao
This user needs 31 more reputation to view that link
@TuxCopter that's pretty funny
Thanks for deleting it
16:20
Better now before this got out of hand.
aw I was going to respond to that
:)
You're saying what we saw wasn't out of hand?
That's what I was afraid of. :P
@ArtOfCode With the code?
:P
hm why do he used an emoji modifier with the hand
16:21
@Dennis damn :)
@DJMcMayhem no, with something else
hadn't figured out what yet
entirely possibly a link to a screenshot of never gonna give you up
Anonymous
@NewMainPosts The comments on this "question" make me lose faith in humanity
Their comments or ours?
Anonymous
A little of both, though mainly the OP's :P
@ArtOfCode the entire Bee Movie script
@GabrielBenamy it's gotta be an image, he asked for a screenshot
16:24
@GabrielBenamy Translated in Dutch
In phonetic
I could give him a solution in assembly
Anonymous
@ArtOfCode Type the question into Word verbatim and screenshot it
since I know for a fact that the C++ stream haven't covered assembly yet
I could try and write something up in COW
@ArtOfCode Wait, that's your university assignment? You need some harder classes. ;)
Anonymous
16:26
@DJMcMayhem Could just be an intro class
yeah, this is first year, first term
I mean the Python assignment was harder than that, but maybe the C++ folks are just... behind.
No, it's just that everything is harder in C++
Write a new keyboard driver that hooks into and listens for voltage changes on the PS/2 port.
Jelly, 3 bytes: ʍäʈ
@TuxCopter Pronunciation: meat
Anonymous
16:31
@DJMcMayhem You're not wrong. The program would be easy in C++, but mindless in Python.
@TimmyD Python, 2 bytes: no
@KritixiLithos Nope. It's /ʍäʈ/ (They are all IPA letters)
It's more pronunced like wat than meat
Anonymous
@ArtOfCode A++
Why do universities teach C++? It's totally inappropriate for clueless newbies...
@Mego I know, I was totally serious. I'd guess that for short programs, C++ tends to be about 5x as many LOC
Once you get into longer programs, it becomes less noticeable
Anonymous
16:34
@feersum Old habits, Hans Gruber
@feersum weed out the weak?
My uni stopped teaching C++ and does Java now
I have a mathematics degree, I only took programming in high school
Old habits can't explain all as there are ones switching to C++ even now.
I'm positive I'm missing out on like, every programming nuance out there
C would be a more educational choice and weed out the weak better too.
16:38
@GabrielBenamy read up on big O for five minutes, and learn how to implement like 2-3 sorting algorithms and you'll be good. :)
Anonymous
@feersum With the 2011 and 2014 standards, C++ is almost a modern programming language. It's certainly not the worst choice for an intro language (that honor goes to assembly, Malbolge, and Javascript).
bubble sort, insertion sort, and pancake sort
i'm set
> Assembly
But assembly is easy
The only problem with Javascript is that there's absolutely no way to know what everything does
Anonymous
16:39
@GabrielBenamy Bubble Sort, Bozosort, and SOrt
Even with old C++ you can scrape by an intro class by never using pointers, iterators, or references, but why not use a languages that catches out of bounds errors.
Anonymous
@feersum You have to teach the aspiring programmers that the world is an unforgiving place.
I still think C does it better.
My first language was Visual BASIC .NET
My first 'language' was Minecraft command blocks, real language Java
Anonymous
16:42
@feersum But with C, there's a whole lot less potential for screwups. Sure, it's easy to accidentally invalidate a pointer or forget to free memory, but C++ gives you so many new ways to shoot yourself in the foot.
Anonymous
@GabrielBenamy That's about the same level as MS Paint :P
@Mego Wrong: If you do anything bad in C, you get the mighty Segmentation fault
My first language was python
Not counting Batch, my first language was GW-BASIC.
@Mego My biggest problem with VB was when I tried to write a chess program during my first year, and I wanted to add a property to the PictureBox object to know whether or not a piece had been captured, so I ended up creating a new object called PictureBoxProperty that inherited PictureBox and just had a single extra property. Well, VB decided every few days to revert all of my PBP objects back to regular PictureBox objects and all of my code broke until I fixed it.
16:45
@GabrielBenamy I've never heard of pancake sort before, but after googling it I don't think that counts since reversing an array is extremely inefficient
Although it's an interesting problem
My first language was BASIC, on a Commodore VIC-20.
Anonymous
@GabrielBenamy VB is a nasty, nasty language. It's often much better to use Visual C#
I also had absolutely no clue what I was doing.
The first language I used was vb6
but the first one i officially learned was c++
the first language I learned was Fortran
16:50
I stopped coding in anything but Mathematica for a while because I wasn't taking any programming classes, but I picked up Perl when some hacker got into the mail server at my old job and installed a LiteCoin miner, and I installed Perl to try and figure out what some file was doing to see if we could trace it.
Anonymous
My first was C++
Anonymous
(un)fortunately all of my old code died in a horrible, totally unexpected drive malfunction
Fortran, aside from trying to print things to screen, actually wasn't too bad
Anonymous
@Xanderhall See your mistake was trying to print something to the screen. Everyone knows that output in Fortran is done via summoning a demon and asking it to tell you the result.
16:54
Mmm ... pancakes ...
The first language I learnt is Processing
hi could anyone help me in exporting my pinterest pins pls?
17:11
what is Pinterest?
what is a Pinterest pin?
@user35276 you might get better help here
Man, Java does not have a nice way to get the smallest value in a list.
why are there users with names like "user#####" and you can't click on their profiles?
@Xanderhall Collections.min
Do you guys recommend other programming communities where I can answer programming questions and puzzles? something less golfy since I'm fairly new to programming.
17:20
ProjectEuler might be a good place to start
@GabrielBenamy Thanks, I will check that out.
though it's very heavy on the math, so idk if that's your area of expertise
Yeah, I credit Project Euler with much of my initial programming knowledge and experience.
@obarakon Note that your answers on PPCG don't have to be good golfings, just the best you can do..
Anonymous
@Xanderhall Sure it does! System.exec(String.format("python3 -c 'print(min(%s))'", String.join(",", Stream.of(elements).map(x->x.toString()).toArray(String[]::new))))
17:21
@Mego ;)
@GabrielBenamy I don't mind math. I just find that with codegolf, I end up writing out a full sized program then golfing it as an afterthought. I don't really have golfing in mind when I start (if that makes sense)
@Mego Which is precisely why I left the room. :P
Anonymous
There are other tags than , you know :P
Anonymous
Granted, a lot of us tend to forget that also
@Mego One of the few times where Java 8 makes things more complicated
17:22
@Mego Really?! I haven't seen any!
Mego is lying, the questions that aren't tagged with almost invariably get closed
haha
@GabrielBenamy That is absolutely not true
Anonymous
@GabrielBenamy I close a lot of stuff that is tagged too :P
click on one of those to take a look
17:22
Questions that aren't tagged golf tend to be harder, though.
@quartata I didn't say real questions. You should see how many bad questions get closed that just happen to not be tagged
@quartata Nice, thank you
Why the heck is this starred? Could someone clear it please?
@obarakon There are more but those three are the most common non golf
Hope you're joking Grabiel? It just happens to be easier to make a challenge "codegolf" than to find another winning criterion
Anonymous
17:23
@DJMcMayhem Because people don't use stars properly
I am joking, don't worry
I think Mego figured out what my joke was, too :P
@El'endiaStarman ^^^^^^
Anonymous
@Dada It's not because it's easier - it's because the challenge is often written with code golf in mind, because it's the most popular type of challenge on this site.
Oh whoops, Nevermind it already got cleared.
Anonymous
And code golf is often the most natual choice for a challenge
17:24
Thanks anonymous mod/RO
Anonymous
It's easy to score and easy to impose objectivity conditions
Anonymous
Fastest code can be fun, but scoring it is a lot harder
@quartata Yeah these look interesting. That's what I'm looking for
Can you use recursion in JavaScript? The following code is throwing a call stack exception f=n=>n==3?true:f(n++) calling f(1). Also, let me know if this is not the place to ask.
You should be using ++n
Try f(++n) instead since when you call f(n++) the original value of n(1) is passed to f and then n is incremented
17:37
n++ evaluates to n and increment n
semi-ninja'd
@KritixiLithos Half-ninja'd?
ninja sandwich
Ninja'd
Re-ninja'd
double-semi-ninja'd
17:38
super-ninja ronpa 2: goodbye ninjas
Ha, nice. Thanks, that worked
*kills all the ninjas*
Argh, why does the R-core come with a full texlive distribution?
TIL mods can edit posts after the 2-minute limit -- yep. --waffles. --pancakes
11
17:55
Mods can edit all the things.
I posted my message 6 minutes ago, can you edit it now?
that would be a yes
For mods, it can be edited until 11 minutes have passed.
I would star my message if I could :P
@KritixiLithos mods can do that, too
18:01
Wow, there really is a lot to learn about the mod-verse
@KritixiLithos I'm tempted to add "-- both are good with syrup"
@ArtOfCode That's really a RO thing though.
@Dennis true
@El'endiaStarman Why don't you? :)
Kinda verging on mod abuse at this point... :P
18:08
@KritixiLithos I guess that's mod abuse 22
Co-worker just shared this: hyper.is
Anyone here an expert on functional programming?
I'm trying to learn it, but it is hard to switch from OOP.
@Hosch250 I never really learned what functional programming is
@GabrielBenamy That's kind of what I'm trying to find out.
I'm building a Checkers AI in F# as part of an Individual Studies class.
@Hosch250 What are your questions?
18:11
I'm trying to decide whether each piece should track its position or not.
Or should my Board track the piece's positions.
Each piece is immutable, BTW.
As is the board. Everything gets created new each time something changes.
Should I store the pieces in an 8x8 array, or in a list (only an option if the pieces track their own positions)?
Or do something else?
I think F# has sparse matrices of some form
Now I need to look those up.
Some form of matrix seems the most intuitive
I'm not sure if the pieces really need to store their positions. There's no logic specific to any one piece since they're all the same so most of your functions will probably be operating on the whole board or some submatrix of it
Yeah.
In OOP, I'd just use a 2d array and loops for iteration.
I know FP uses recursion instead.
I don't know if it uses the 2d array, though.
I'm looking up matrices now.
So, I'd store it as a sort of Dictionary<coord, piece>?
Looks like F# PowerPack has a sparse matrix somewhere.
@Dennis This keeps getting better and better. Pari/GP wants to install ModemManager, and mathjax.
18:21
@Dennis What's wrong with it wanting to manage your modem for you? Sounds conventient
I would do four 32-bit integers.
For red pieces, red kings, black pieces, black kings.
@Xanderhall Then they should label it computer algebra system and modem manager.
Pari uses electrical noise in coax cables to generate random numbers for probabilistic primality testing, so it needs modem access.
Wait, people do functional programming in Java?
Ah yes, of course.
18:28
@Xanderhall If you do functional programming in Java, wait, why are you using Java in the first place?
@TuxCopter Why not
Because Java
What's wrong with Java
@feersum That's an idea. I have this:
type Piece(player:Player, pieceType:PieceType) =
    member this.Player = player
    member this.PieceType = pieceType

    member this.Promote() =
        new Piece(player, PieceType.King)
18:30
@Tux I'm one of the few who actually likes Java
1
Q: Plotting the Cornu spiral

AdriaanThe Cornu Spiral can be calculated using Feynman's method for path integrals of light propagation. We will approximate this integral using the following discretisation. Consider a mirror as in this image, where S is the light source and P the point where we collect light. We assume the light bou...

0
Q: Replay previous console text

cascading-styleCreate a script that, when run from a console, will display the text already in the console, prior to running. Challenge How will the winner of the challenge will be determined? The golf with the shortest length (in bytes) will win. Example Input and Output Input: (Shown is Windows) ...

@Xanderhall I tought the few people remaining has gone extinct after the coming of Python
@Xanderhall Everyone actually likes java secretly
Let them go and tell you they don't
Java is easier to use than Python
Must be one heck of a secret if I didn't even tell myself.
18:39
but know that deep down they really get giddy at home with that public static void main(String[] args)
@Dennis I'm just happy I found out
Java was way too strict and verbose for my tastes
you know you can't stay away from the verbosity
Same here. I decided to learn Java, googled a Hello World program, and reversed my decision.
some day you'll admit it
Like, I understand why I need to declare a function's data type, and I think I understood the difference between static vs dynamic but seriously, "public static void main" and "public static boolean isEmpty" or "private dynamic integer whatever" is just too damn annoying
18:42
I first learnt Processing, and then learnt actual Java. The verbosity was easier that way
and that's without having done anything in the language
If I want to make a TIO link which version should I be using? @Dennis
At this point, Nexus.
Or the old ones, which will redirect to Nexus when v1 retires.
@GabrielBenamy And it's not like that's enough. You have to wrap it in a class as well.
Certain languages are way too strict on datatypes. I tend to dislike them.
last week at work, I "fixed" a thing by dicking around the entire day and somehow it fixed itself. apparently it's also not working somewhere else, and now my boss wants that fixed, too
18:59
0
A: Sandbox for Proposed Challenges

Mistah FigginsSpringify a String code-golf string Create a function or program that "Springifies" a string. Input will be a String in Stdin, or closest alternative Input will only contain printable ASCII Output will be to Stdout, or closest alternative A trailing newline is acceptable How to springify a ...

It has also since stopped working.
Maybe you can automate this. Create a bot that simulates clicking on everything all day.
me: deletes a link to a dead library
ckeditor: "ahh yes that fixed it, thanks"
???????????????????????????????????
@GabrielBenamy A lot of modern languages do type inference which gives all the benefits of strict typing minus having to type long signatures
Java, to its credit, is starting to do this with lambdas
I'm hoping we see something like C++11's auto soon though
Matrix is a particularly mathematical type for working with numbers. - it is not true. See another answers. Matrix is generic and can be used for working with any type. — Yauheni Sivukha Jun 12 '11 at 14:45
CMC: Print a keyboard.
`  1  2  3  4  5  6  7  8  9  0  -  =
 q  w  e  r  t  y  u  i  o  p  [  ]  \
  a  s  d  f  g  h  j  k  l  ;  '
   z  x  c  v  b  n  m  ,  .  /
19:06
i`  1  2  3  4  5  6  7  8  9  0  -  =
 q  w  e  r  t  y  u  i  o  p  [  ]  \
  a  s  d  f  g  h  j  k  l  ;  '
   z  x  c  v  b  n  m  ,  .  /
Vim, ... bytes
my boss just thanked me for fixing it but I have no clue why that did anything
because the script I deleted a link to returned a 404 error instead of actually loading any javascript
@KritixiLithos This is almost twice as golfy: v.tryitonline.net/…
It also takes my entire lifespan to run
@DJMcMayhem In V can't you do something like Í for regex?
I made a 2D array. I'll be posting it up on CR once I get it working a bit more, if you guys are interested in critiquing it.
Options are interesting.
19:10
@KritixiLithos Yeah, but that's a vim compatible answer
This is the best I can do in V: v.tryitonline.net/…
@DJMcMayhem That prints a trailing 9
What does the & do?
@KritixiLithos Looks like it's the $& equivalent from Perl, printing out the text that was matched in the regex
It's the whole matched pattern. The same as \0
@GabrielBenamy Try this:tio.run/nexus/…
19:13
that one works
No, that has a leading colon
oh right
I think I know what the problem is. You can fix it by adding <ESC>A after the 9, but you shouldn't need to
@DJMcMayhem PowerShell, 114 bytes
"``#$(1..9-join'#')#0#-#=
 q#w#e#r#t#y#u#i#o#p#[#]#\
#a#s#d#f#g#h#j#k#l#;#'
# z#x#c#v#b#n#m#,#.#/"-replace'#','  '
jinkies
why don't you just print the spaces and do away with the #s
Cause that would be like 150 bytes
@GabrielBenamy Because it's shorter to replace a double-space with a hash and then use -replace
I don't get the purpose of ÍÓ. Why do you need both of them?
ohhhhhhh okay
@KritixiLithos It's not both of them. The Ó is part of the search, not it's own search command. In a search command it translates to \S, which is a non-whitespace character
19:17
It might be shorter yet if I can -split on ever character and then -join them with double space. I'm checking.
No, wait, that won't work because I'll miss out on the double-backtick
Hmm
@DJMcMayhem Oh, I don't think that is on the wiki
It sorta is.
Under "magicness"
0
A: Sandbox for Proposed Challenges

JordanAre we then yet? code-golfdatetimedate I'm a time traveler, and I'm obsessed with the passage of time. I particularly love the moments when the clock hands pass 12, or when 23:59 becomes 00:00, or when I get to flip to the next page of my calendar. Please write for me a program that will show ...

\S is equivalent to <M-s>
Does that make sense?
M-s = ß for me
19:24
That's right, silly OS X
On Windows and Linux, alt just adds 128 to the ASCII value, but I have no idea what it does on osx
Alt-Shift+H = Ó for me
Oh duh, I meant <M-S> instead. Sorry about that
Hot Network Questions, here we come... — Nzall 4 hours ago
Alt-S = Í
AltGr+'+O = Ó
19:29
@KritixiLithos really? That's alt-shift-m for me
I have the american keyboard, so I don't have Alt-Gr
@DJMcMayhem One word: Macs.
You should just use that vimscript function I gave you. It'll keep everything simpler
I use a compose key emulator and it works well ʈó ʈÿπə ʍəıŗɖ ɭɘʈτéɹʂ
Oh yes, it works in vim, thanks :)
@TimmyD At least it got a good answer
19:32
Lol
@Geobits lmao
> flag > NAA
It's totally an answer. Maybe the person has been awake for 72+ hours playing FFXV
@DJMcMayhem already done
I need another 31 rep to reach 2k. I'm also doing absolutely nothing to get there.
19:38
You are lucky Geobits is not here
ahem
yes geobits
downvote me until my rep has a net increase of 31 points please
RepUnderflow
@Sherlock9 That should be fixed.
19:46
cmc: compute, by experimentation, how many downvotes it takes someone to reach integer underflow reputation on code golf dot stack exchange dot com
is there a name for this operation over f: foo(f) = (a, b) -> map(a, x -> map(b, y -> f(x, y)))
e.g. x -> foo(*)(x, x) is a multiplication table using x. I thought this might be called "table"
@Dennis works for me, thanks!
@ConorO'Brien can you explain that better? I'm confused
19:54
@ConorO'Brien table, outer product
^ That's what the Mathematica builtins are called, anyway.
CMC: Given a letter input [a-z], output the English alphabet starting with that letter, wrapping z to a, and finishing with the prior letter. Example: input f output fghijklmnopqrstuvwxyzabcde
@TimmyD Where's the e?
In the ellipsis, of course.
Can't spell ellipsis without e.
19:56
@MartinEnder ahhh that's right.
If x and y are numeric lists, then x */ y  is their multiplication table. Thus:
   1 2 3 */ 4 5 6 7
 4  5  6  7
 8 10 12 14
12 15 18 21
@KritixiLithos It is actually in it.
@GabrielBenamy
@feersum In fact this means input f output f... is an accepted solution and that'll simplify the code considerably.
Why the f? ... should do.

« first day (2144 days earlier)      last day (2994 days later) »