« first day (2257 days earlier)      last day (959 days later) » 
00:00 - 18:0018:00 - 00:00

12:19 AM
have been waiting 6 days of my 4-5 day newegg delivery
 
Ow that sucks
 
12:45 AM
I think I'm the only one here that plays Battlejack
 
@Qwerp-Derp sounds dirty
 
It's Blackjack but an RPG
 
Oh
 
@ETHproductions I made my first creation using your tokenizer--it's transforms the code from something like 3 + 4 to (3).__add__(4).
C:\Users\Conor O'Brien\Documents\Programming\exten.js
λ node exten.js "3 - 2 ** 3"
Number.prototype.__pow__ = function(y){ return Math.pow(this, y); };
Number.prototype.__mul__ = function(y){ return this * y; };
Number.prototype.__div__ = function(y){ return this / y; };
Number.prototype.__mod__ = function(y){ return this % y; };
Number.prototype.__add__ = function(y){ return this + y; };
Number.prototype.__sub__ = function(y){ return this - y; };
(3).__sub__((2).__pow__(3))
Result> -5
 
Cool! I'm writing a parser in the golfer repo that will transform the tokens to an AST (though right now all the code I have is //)
One of the hardest parts will be detecting syntax errors and displaying useful messages
 
1:00 AM
yeah, definitely. IMO I'd do that last, but keep it in mind while writing your code. I hate when I want to add something 60% through a project and it requires slogging through the code to update everything to the new feature :p
 
I'm planning to have some sort of indicator over the textarea that highlights syntax errors and potential golfs in various colors, so I'm not sure what format would work best for throwing an error that also specifies exactly where the error happens
"I wish I could format the text in textareas" moment #1452
@ConorO'Brien yeah, true
Right now I'm busy building a big pixel-art headshot of Boba Fett on pxls.space
 
xD that's a good task
 
it wasn't my idea, but I wanted to join a project after first the PPCG logo and then the emoticon I was helping with got deleted
 
@ConorO'Brien are you using Object.defineProperty? Otherwise you'll have some weird side effects
 
@Downgoat No, I'm not. The code produced is eval'd. Why?
 
1:16 AM
> for (i in 1) console.log(i);
< undefined
> Number.prototype.__add__ = function(a, b) { return a + b }
< function (a, b) { return a + b }
> for (i in 1) console.log(i);
[Log] __add__
< undefined
 
why are you using for...in loops ಠ_ಠ
but point taken
 
I think it'll show up in Object.keys as well
 
@ETH why write a js parser when there are already plenty though?
 
1) I already have a tokenizer, 2) I don't want to deal with learning one (I guess that's just lazy on my part), 3) for the fun of it, and for experience
 
e.g. recast or jQuery's esprima
 
1:31 AM
babel is most appropriate for conor's use :P
 
@Downgoat ಠ_ಠ can babel add operators to JS?
can babel overload the existing operators as defined by the user?
 
@ConorO'Brien Yes, I did it the other day
 
o_O
what does that look like?
 
lemme find a link
That just does a + b -> Overloads.add(a, b) though. I had another version with all binary operators replaced like that, but it was written for babel 5 I think
 
oh, cool
much too complicated, however. mine'll be simpler
 
1:42 AM
This one does all binary operators (or most, at least, perhaps I forgot some): astexplorer.net/#/gist/41ada9f23b58e0022c1921205c9c08f6/…
@ASCII-only Also, when I started this project it was all going to be in one big file that did all the work (tokenizing, parsing, finding potential golfs, etc.) but I've decided to split it up (with some prodding from Conor)
 
1:59 AM
@ETHproductions TIL yield*
 
I don't think this conversation is problematic at all (yet), but I can imagine it requiring a lot of messages
So I made this:

 Pxls Space

For discussion of pxls.space and coordinating PPCG-related art...
 
@ConorO'Brien Yeah, that comes in handy sometimes
 
I was about to suggest something like that
 
2:54 AM
Question: do you read "Codesign" as "co-design" or "code-sign"
 
When I look at it, code-sign pops into my head first
 
I found a fun word game in the puzzling chats
do you guys want to play it there?
(note: I haven't actually played it)
anyone?
 
@Downgoat code-design
:P
 
it's all about the twenty-first byte
 
please?
am I gonna have to ping you guys?
 
3:06 AM
0
A: Sandbox for Proposed Challenges

DJMcMayhemPrepends or Appends? Depends code-golf brain-flak string balanced-string classification Brain-flak is an esoteric language I wrote where all of the commands are brackets and all of the brackets must be fully matched. To borrow my own definition: For the purpose of this challenge, a "bracket...

 
Daaaang that was fast
 
3:26 AM
Hello, does challenges needs to be code challenges ? What about challenges that are just about common binary data formats ?
 
0
A: Sandbox for Proposed Challenges

user2284570Shortest code to generate a large executable section inside an elf file. Your challenge is to create the shortest code in your language of choice or the tools of your choice (like objcopy) that will create an elf file with a the executable section as large as possible. I mean that if I extract t...

 
4:21 AM
@ConorO'Brien do you have suggestion on how to golf this ES5 code: (Array.prototype.find.call(document.getElementsByTagName('link'),function(elem)‌​{return elem.rel==='canonical'})||{}).href
 
@Downgoat ES6
 
it's supposed to still be ES5
 
4:40 AM
This is a slightly modified final /r/place screengrab that I saved with JS [warning: text may be NSFW]
 
My secondary monitor doesn't like the r/greenLattice
 
@JanDvorak What does it do
 
0
A: Sandbox for Proposed Challenges

HyperNeutrinoFind the Least Conforming Word Given a list of words, find which word is the least like "normal distribution" For each distinct word w in this list, we know the following two properties of w in this list: Its frequency in the list (that is, the number of occurrences of it divided by the numbe...

 
5:00 AM
@DJMcMayhem does your vimrc map <tab>?
 
5:17 AM
@Downgoat No. Although I do have a bunch of indent settings, so tabs are expanded to spaces
Does yours?
 
Well I am using your vimrc and everytime I do tab it calls :call Alt()
 
o_O
Uhhhhh, I have no idea what that is
How recent is your version of my vimrc?
@Downgoat Wait, I might know what that is. Do you have this anywhere?
in Vim-golf, Mar 16 at 17:32, by DJMcMayhem
gist: 058d5cdf846fec42bf6b1ffeb8c0cfdd, 2016-12-10 16:22:29Z
function! Alt()
  let c = nr2char(getchar() + 128)
  exec 'normal gi'.c
endfunction

inoremap <C-i> <C-o>:call Alt()<cr>
 
yes I do
brb verifying
 
@Downgoat And I assume you're using terminal vim?
 
yes
 
5:26 AM
So <C-i> == <tab> unless you're using gvim
 
5:38 AM
@DJMcMayhem pretty sure that was updated last year
> A new footnote was added either on October 4th or on October 5th, 2016.
From explainxkcd.com
 
I only just saw it today
 
Then welcome to today's 10000 people?
 
 
1 hour later…
6:49 AM
hi
 
Heyy
 
7:28 AM
It's beautiful > i.imgur.com/Catv5Ua.png
 
2
Q: Print a 5 pointed star out of 5 pointed stars

user67715NB: This was partially taken from this challenge You have to output the exact text below while taking no input. ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆☆☆☆ ☆☆☆☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ Obviously this is...

 
Same here (chrome, mobile)
 
 
1 hour later…
8:42 AM
hi all
 
Protip: Don't download too much if you do not want to see the fact there are 11.3GB of data you downloaded
Goddammit its delete speed is 0.35 files per sec
 
?? What is deleting that slowly?
 
0
Q: Never odd or even

Dead PossumDid you notice, that this is a palindrome? Input Number or string representing it Output 4 possible outputs, representing two properties of number: is it palindrome tricky #2 Tricky #2 property If number is not palindrome, this property answers the question "Do first and last digits of num...

 
idk
 
I always wonder what causes the delay in questions appearing here
 
8:49 AM
@Lembik The delay in the API
 
0
A: Sandbox for Proposed Challenges

LembikYou had me at hello Task Read in a text stream of file, outputting its contents until the word "hello" appears. At this point your code should quit immediately. It should not wait for a new line for example. Example input stream I once had a horse called hellopina. Output: I once had a hors...

 
that's mine :)
please suggest improvements if you can
 
O sh*t why did I put NOOBS in the download folder
After I cleaned up the downloads folder my laptop happily lets me use it better
The delete speed jumped up to 0.35 -> 70
yay
Now that was why my laptop was laggy
 
9:09 AM
0
Q: What happens if I get upvoted but have already reached the daily limit?

This GuyThe title says it all. I reached my daily limit today and noticed that one of my questions was upvoted after I reached the daily limit. What happens to the reputation? Do I get it tomorrow or is it lost into the ether?

 
9:35 AM

 Pxls Space

For discussion of pxls.space and coordinating PPCG-related art...
We're building the PPCG logo there
 
@wizzwizz4 No
 
@Downgoat I hope you realize I was quoting an obvious astroturfer off of a comment page
 
9:58 AM
I'd downvote myself on this one if I could...
 
@LuisMendo why?
So according to the website MEGA the password ThatFastHorse1% is very weak
 
Hallo
 
10:31 AM
@DownChristopher Your user icon is confusing.
I keep thinking that you're a goat.
 
It looks like one :P
I have to go Cya
 
10:43 AM
I need to make an answer to that x^2.5 challenge
no-one will ever crack in Turtlèd!
unless they do, in which case I win because someone is using Turtlèd
 
@DestructibleLemon Win-win! >:-)
 
11:15 AM
@Downgoat Does GitGoat have a splash screen? If so, pls ping with screenshot + any images needed to recreate?
 
 
1 hour later…
12:16 PM
0
Q: You had me at hello

LembikTask Read in a possibly infinite text stream or file, outputting its contents until the word "hello" appears. At this point your code should quit immediately. It should not wait for a newline for example. This is a case sensitive challenge. "hello" != "Hello". Your code can't expect that the ...

 
I added test cases to this now, any more comments before I post it?
3
A: Sandbox for Proposed Challenges

Martin EnderTriangular Manhattan Distance code-golfhexagonal-gridgeometry The Manhattan distance on a regular grid is the number of orthogonal steps one needs to take to reach one cell from another. Orthogonal steps are those that go through the edges of the grid cells (as opposed to the corners, which wou...

 
12:34 PM
hi @MartinEnder
could you give me a hand with fəˈnɛtɪk 's question please
 
I don't really understand it.
 
@Lembik So in javascript you have the prompt command
If I have a while(prompt()) it will keep asking the user for more input
 
oh I see... writing questions is hard :)
is the input line by line?
I mean what if you have an infinitely long line with no newlines?
 
prompt() will create a new popup and ask the user for the next input :P
 
so you input one character at a time?
 
12:40 PM
one string of any length at a time
 
so I still don't get what happens if that string is infinitely long
 
@Lembik It dies due to memory issues
 
does your code have to wait for some "enter key" or mouse click before it starts processing it
ok so that's no good then
 
@Lembik I'm mobile and can't test if it really works without pressing enter, can you test it for me :)
 
test what?
 
12:44 PM
prompt() requires enter to be pressed
 
Bash answer on hello question
 
or for the user to click a button
 
@betseg oh that! I sadly can't for a few hours. But it looks great to me
 
@betseg it doesn't
 
:(
 
12:45 PM
Removing till I fix it
 
@betseg I meant it doesnt need enter
 
the answers are disappearing in front of my eyes!
 
Sorry about that
 
Lol
Wording
 
@Lembik can you please get into a habit of editing clarifications into your challenges?
 
12:48 PM
@MartinEnder When you're describing movement from 3,1, I think it would be good to indicate you can't move to 3,0 across the "point" of the triangle as well. That's implied in your test cases, but it was a question I had while reading until I read the comments.
 
@MartinEnder yes. And I just did
 
and why do you always add stuff at the bottom, instead of with the rest of the spec, where people expect all the rules to be?
 
@MartinEnder ah...
fixed that
I add stuff at the bottom so people notice the change
 
@AdmBorkBork ehm, "(as opposed to the corners, which would give us the Chebyshev distance)" and that sentence contains "1,2" which would be the same kind of move, but I'll include it.
 
Ah, see, that was in parens, so I guess my brain filtered it out. lol
 
12:50 PM
15
A: Things to avoid when writing challenges

xnorTacked-on fixes If you clarify or modify your challenge after posting, don't just tack on a note to the end or to a list of bullet points. Edit in the change. It's confusing when the body of the challenge says one thing but a later part says another. Of course, it would be ideal not to change ...

 
Maybe it'd be more clear to say So you can move from 3,1 to 2,1, 4,1 or 3,2, but not to any other triangle, since those would be crossing points rather than edges.
 
yes thank you
 
1:12 PM
I've updated the sandbox post with a harder follow-up challenge, although whether I'll post it will depend on the participation in the first one:
4
A: Sandbox for Proposed Challenges

Martin EnderPart I: Triangular Manhattan Distance Part II: Triangular Chebyshev Distance code-golfhexagonal-gridgeometry The Chebyshev distance on a regular grid is the number of orthogonal or diagonal steps one needs to take to reach one cell from another. That is, we can move either through the edge of ...

 
2
Q: Triangular Manhattan Distance

Martin EnderThe Manhattan distance on a regular grid is the number of orthogonal steps one needs to take to reach one cell from another. Orthogonal steps are those that go through the edges of the grid cells (as opposed to the corners, which would give us the Chebyshev distance). We can define a similar dis...

 
0
A: Sandbox for Proposed Challenges

Kevin CruijssenBinary Puzzle Solver code-golfgamebinary The game binary is very simple, and has only a few rules: Since the name of the game is binary it's pretty obvious, but you can only fill in a 0 or a 1. No more than two of the same digit can be vertically or horizontally adjacent to each other Each ro...

 
2:05 PM
1. There are bitmaps in C++
2. There are strings in C++
3. Hence we can create BigNumber in C++
 
@MartinEnder are you planning on moving the meta bloat post forward?
 
yes, I'll probably put up another meta post and/or create a chatroom this week to discuss which policies will make it into the final post.
 
2:22 PM
0
A: Sandbox for Proposed Challenges

Roman GräfLock the Language! This is a cops-and-robbers challenge. Cop's Thread: Challenge: Write a program that given two arbitrary integers adds those and prints them to STDOUT In this Thread you post the fully working solution including language The robbers will try to find any other language where...

 
I am impressed by the number of incorrect answers!
my challenge clearly wasn't too trivial which is a relief :)
@betseg I hope your bash answer comes back!
 
@ASCII-only how far are you with the Android app? Is the a GH?
 
0
A: Sandbox for Proposed Challenges

This GuyPlay a game of Dice Cricket random code-golf game Dice Cricket is a game I was introduced to as a child and have used as a way to pass time for years since. I couldn't find a Wikipedia page so I'll explain the rules below Dice Cricket Rules Premise Dice Cricket is a game similar to scoring a ...

 
There doesn't appear to be an r/ppcg should I make one?
 
2:39 PM
I'd join reddit just to join r/ppcg, haha
Does reddit typically host subreddits for other online communities?
 
There's subreddits for literally anything, anyone can make one for any reason.
 
Alright then, I don't see any problem with it
 
there are seriously unsensible subreddits!
there is zero chance this will be the least sensible
 
What would we post there though? Just the sort of things we post in TNB, or just things closely related to the site?
 
It could be a better place to find code golf resources, since stuff tends to get buried in TNB
 
2:44 PM
Very true, even if stuff is starred it disappears rather quickly
 
brb signing up for a reddit account
 
Already subscribed
 
if you have a multiset, how would you describe it when it has no duplicates?
do you just say a multiset with no duplicates?
 
Is that not just a normal set?
 
2:48 PM
Yeah, isn't the idea of a multiset to have duplicate elements?
 
right but I want to say that this particular one doesn't
I could say it is duplicate free?
 
I suppose. Also I guess there is a difference, programmatically speaking, between a normal Set and a duplicate-free MultiSet.
 
yes
 
@DownChristopher Because the scrambled code had a mistake (now corrected) that may have confused the potential robbers
 
0
A: Sandbox for Proposed Challenges

Marcos MCode - Decode Cops: Your task is to write a program or functon wich otuputs encrypted alphabetic input. The same program or function has to be used to encrypt and decrypt messages as the case of ROT13 You have to post in your answer: Languaje and length of your program The encrypted output o...

 
3:07 PM
0
Q: Line up for golf!

SparklePonyAlice, Bob, Carol, Dave, and Eve are going out for a nice game of golf and need your help to decide in what order they will play. Your program will input some statements, which are defined as a condition, and then one or more optional logical boolean operators followed by another condition. (Tha...

 
@LuisMendo ah makes sense
 
Hey is anyone here familiar with Python or the Jelly codebase? (since Dennis seems to be offline)
 
Sorta why?
 
So I'm trying to implement proper vectorization in github.com/MiningPotatoes/Ohm for the fifth time, and I decided to use Jelly as an example. However, translation from Python to Ruby can be kind of hard sometimes, and I'm having difficulty understanding how the "flatness" and such in this method github.com/DennisMitchell/jelly/blob/master/jelly.py#L484 works.
 
3:22 PM
Ideas for r/ppcg subreddit CSS?
 
Make it a challange
 
I was actually just looking at themes
 
@NickClifford Sorry can't help. That went wayyy over my head in python
 
@DownChristopher It's all good :)
 
@PhiNotPi Perhaps similar to the design userscript?
 
3:23 PM
If nothing else, there's always the nice and minimalist theme that places like /r/AppleWatch use
 
@PhiNotPi Have a CSS style that will have minor "side effects" to parts of the background when stuff is hovered over.
 
@wizzwizz4 Is that even possible with pure CSS?
 
@ETHproductions Yes.
Give me a few minutes; I'll mock something up.
Whilst you're waiting, you might be interested to know that CSS can simulate Rule 110 by showing and hiding checkboxes.
 
Only one step at a time though, iirc
 
3:29 PM
(Tab, space, tab, space, etc...)
 
@PhiNotPi Ensure to put the word "Beta" at the end of the page header until the site graduates.
 
Technically we have "graduated", though it's gonna be 6-8 years before we actually look the part
5
 
Sorry, meaning until the Reddit site graduates. ;-)
 
Sorry, I'm unfamiliar with reddit :P
 
So am I. But I am familiar with poorly-formulated humor, so that's what I went with.
 
3:34 PM
I suspect that's a joke though
Aha. Sometimes I miss jokes that aren't super-obvious, sorry :P
Maybe we should post something on r/ppcg so it's not so... empty
 
@ETHproductions Obviously it's asking for a "Hello, World!" post
 
Idea: we write a polyglot that prints "Hello, World!" when run in each of 100 different languages
 
print("Hello, World!") gets us about halfway
 
0
Q: Languages with locale-specific functions

pajonkThe only such language I can think of now is Excel. It has different function names in different language versions. Some submissions can be made shorter by changing the language from the language default on this site, namely English. This may also be used in obfuscation challenges (although in m...

 
3:39 PM
That does the job on HQ9+ too
 
And Foo
 
ninja'd :P
Idea: we write a polyglot that prints "Hello, World!" in a different (spoken) language when run in each of 100 different (programming) languages
 
That would be had
 
That sounds... hard
 
ok, maybe lower the limit to around 5
 
3:43 PM
puts "こんにちは,世界!" (get it because Ruby is Japanese)
 
JS gurus: Is let the only reserved word that was actually introduced in ES6? const, import, etc. all error out in ES5 as well (testing in IE8, anyway)
 
@ETHproductions Test in IE11. It's the best, most modern proprietary popular ES5 browser that there is.
 
@ETHproductions there are also export import etc.
 
@Downgoat var export; causes an error in IE8
whereas var let; does not
Hmm, maybe import and export were added in ES6 after all
 
I'm looking for a 1920x970 px image to use as a header image for the subreddit.
current style: reddit.com/r/ppcg
 
3:55 PM
According to W3Schools, await, class, enum, export, extends, import, let, and super were all added in ES6
While abstract, boolean, byte, char, etc. were all removed
Wait, according to this page, class, const, enum, export, extends, import, and super were all reserved in ES5
 
@wizzwizz4 Nah use DOS Houdini network browser program instead :P
 
@ETHproductions you're right, it's await let and yield
 
Everything I've found lists debugger as a reserved word, but it doesn't seem reserved nevermind, I must have missed something. var debugger errors in Firefox and Chrome
 
Mozilla is God
God=Mozilla
Godzilla
o_O
 
@SIGSEGV citation needed
 
4:08 PM
kek
 
That's GIMP'd.
... Isn't it...?
 
maybe
 
Interesting... var let is a syntax error, but 1 + let is a reference error
 
Mozilla was the mascot of the now disbanded Netscape Communications Corporation and subsequently the Mozilla Foundation. Mozilla took the form of a green and purple cartoon lizard. Programmer Jamie Zawinski came up with the name during a meeting while working at the company. Mozilla was designed by Dave Titus in 1994. The name "Mozilla" was already in use at Netscape as the codename for Netscape Navigator 1.0. The name stood for "Mosaic killer", as the company's goal was to displace NCSA Mosaic as the world's number one web browser. Initially the mascot took various forms, including that of...
> the eventual choice of a Godzilla-like lizard which went well with the theme of crushing the competition, especially because of the similarity between the names. (See above wikipedia post)
 
Nevermind... let is a perfectly valid variable name
 
hahaha, that's great
 
Vsauce is becoming such a meme nowadays
 
0
A: Sandbox for Proposed Challenges

Wheat WizardSame code different characters Note: This challenge only allows answers in compiled languages Task Your task is pretty simple, make two different programs that when compiled result in the same output. Scoring Here is where the fun comes in. Your score will be the number bytes present in exa...

 
4:30 PM
in pxls space, 4 mins ago, by ETHproductions
https://www.reddit.com/r/ppcg/
We have teh reddit.
 
:D
 
2 hours ago, by PhiNotPi
https://www.reddit.com/r/ppcg/
 
4:44 PM
Oh hey, there's a section in the ECMAScript standard detailing ASI. Maybe if I read it I'll finally understand its mystery
 
4:55 PM
OK, so a semicolon is automatically inserted if:
1. The code cannot be parsed without a semicolon and
- there's a line break,
- the last token is a `}`, or
- the last token is the last `)` of a do-while statement.
2. The end of the source code is reached and the code can't be parsed without a semicolon at the end.
3. The code can be parsed with or without the semicolon, and the expression is not
- ++ or --;
- continue, break, return, throw, or yield;
- the arguments of an arrow function.
 
In the Google Code Jam (which starts in less than a week), does it matter when you complete it, beginning of the event vs end of the event? I know that the time you take to submit the output file after downloading the input file matters, but does the when matter?
 
Hey @PhiNotPi, how long is it after something is posted in r/ppcg before its score is shown?
 
There shouldn't be any delay other than reddit's own vote-fuzzing algorithm.
 
Which is like an hour, iirc?
 
I thought the default hide time was 0.
 
5:07 PM
Hmm, maybe it's a new user thing
 
My Reddit account was created 2 days ago, and I can't see the vote-count
 
I can see the score if I open the post though
 
I can't
 
Over to the right
> 2 points (100% upvoted)
 
5:10 PM
I can't see the score for the post but I can see the score for the comments
 
Scratch w3schools.com and even MDN, I'm just gonna go hardcore and use the official ECMAScript specification to do my research
 
0
A: Sandbox for Proposed Challenges

AntonHDice Roller Since I have played a lot of tabletop role playing games, I am looking for an easy to use dice roller. But also being lazy, I would like to have the shortest possible solution, making this code-golf. Input You will receive as input 2 or 4 variables. In the case of 2 parameters, bo...

 
@ETHproductions what research?
 
Just some research into the nitty-gritty details of JS. I'm writing a parser
 
oh right, the golfer
 
5:15 PM
if it is a golfer, might I suggest writing a babili plugin
 
"chatgaot"
 
@Downgoat It's basically a linter that focuses on length
 
@KritixiLithos ?
 
Wait, babili?
 
5:17 PM
Oh cool, that's sorta similar to what I'm doing
 
@KritixiLithos aaaahhhhh sheeps D:
 
Why do the serious comment has more upvoats than the not serious
 
What serious comment?
 
Since when is /r/ppcg a thing?
 
Two hours ago or so
 
5:29 PM
@ETHproductions closer to 3 hours now
 
Who's alienpirate? (on reddit)
 
Me
 
Should we have a post where people put their username on PPCG on our new reddit site?
 
Yeah, some sort of "Introduce yourself!"
 
So maybe use the Who am I post @Alt-F4 just posted?
Or it might work better to have a link to a google docs or something like that.
 
5:40 PM
:36492723 I was kinda hoping you would. :)
 
great!
I am always amazed by how many incorrect answers one gets. I know it's because I design my questions carefully to be not quite trivial but still
 
You also design your questions so that they contradict a lot of the standard rules. Then people assume standard rules and give an invalid answer
 
Oh, huh, you can upvote your own posts on reddit? (And they're upvoted by default)
 
@fəˈnɛtɪk yep
I am a sinner :)
@ETHproductions nothing on reddit makes sense :)
 
@ETHproductions that's the way KA computer programs work too
 
5:45 PM
@KritixiLithos Ah, now I get it
 
@Dennis I can't stop telling people about your nice pro tip :)
 
At first I thought that the 1 upvote came from whoever reviewed the program
But then I realized that my private programs each had 1 upvote as well
(This was a while ago, of course)
 
@Lembik What always amazes me is that the invalid answers keep amassing upvotes, even after a comment pointed out that they're invalid.
 
@Dennis A very good point
there is clearly a lot of love in the world :)
 
That's one way of looking at it. ;)
 
5:50 PM
@Dennis there is also this "Completely skipped the 'Read in a possibly infinite text stream or file'... Will clarify on the answer but will not delete unless brutally downvoted due the extreme quality of my reply... and self-confidence"
 
what do you expect this to do?
yes | tr -d \\n | IFS=;while read -n1 a;do b+=$a;echo -n "$a";[ ${b: -5} = hello ]&&exit;done
 
There is no downside to deleting your answer as soon as you realize it is invalid. This is what I do. It gives you time to fix it at your own pace, it won't be able to accumulate downvotes, and you can undelete it yourself as soon as it's fixed.
 
it doesn't seem to be filling up memory or crashing
my bash isn't great.. am I just using it wrong?
that is does it in fact not read from stdin?
 
You're piping the input to the command IFS=, not the while loop.
 
ah.. so what is the IFS for?
 
5:54 PM
@flawr might have already sent this but: reddit.com/r/PrequelMemes/comments/5wnynb/…
 
@betseg hi.. what is the IFS= for in your answer?
 
@Lembik The obvious purpose is so that you can't pipe anything into the program
 
that seems like a bad purpose
unless I have misunderstood
 
@Lembik It's the internal field separator. It makes sure read will be able to read whitespace properly. Without it, it wouldn't be able to read newlines.
You can test the program either by saving it into a file or by doing yes | tr -d \\n | { IFS=;while read -n1 a;do b+=$a;echo -n "$a";[ ${b: -5} = hello ]&&exit;done; }
 
brilliant.. so it seems to work!
 
5:58 PM
Still doesn't handle newlines though.
 
Sorry, i was trying to add support for infinite inputs
 
ah ok
 
@Dennis huh?
 
@betseg it works with yes | tr -d \\n which is infinite
 
5:59 PM
@Lembik still the variable b can exceed available memory
 
You need -N, not -n.
 
00:00 - 18:0018:00 - 00:00

« first day (2257 days earlier)      last day (959 days later) »