« first day (2224 days earlier)      last day (2626 days later) » 

12:08 PM
@ASCII-only is there away to cast to int using operators only?
 
 
2 hours later…
1:49 PM
0
A: Sandbox for Proposed Challenges

Kevin CruijssenDisplay the up-and-down loops code-golfnumberstring Related to my Loop up and down, up and down challenge. Input: Two integers (one negative, and one positive). Output: On the first line output lowest to highest; on the second line we inverses the positive and negatives and go from highest-...

 
hi all
what's the right stackexchange for anyone system problems with OS X? In case anyone knows
 
2:17 PM
@JanDvorak thanks
@KritixiLithos Thank you. I worry that might not have enough footfall, as it were
basically you need to find an excuse to post any question on stackoverflow :) Hard in my case
 
In this question if you use echo "string" | to fill stdin, can you abuse the fact that echo provides the \n or does it come with a penalty?
 
It could as well be echo -n in which case there would be no newline oh wait, I misinterpreted the question
 
@DuctrTape I think that is probably fine.
 
@DuctrTape The code doesn't contain \n, so I would say that's fine.
 
But still it kind of feels like cheating.
 
2:28 PM
But it doesn't contain the literal \n
 
True.
 
A bunch of other answers use the newline that comes from their print function.
 
@MartinEnder yep, I was just checking how close you were to dennis
 
Does "\n" in the question mean \n (as in the characters) or a newline?
 
and vice versa
very NSFW
>_>
 
2:34 PM
@Riker you mean how much ground I've already lost :P
 
yes :(
 
at least I win by average score ;) (just barely though)
 
yep
and you're still the king of esolangs
and also your profile pic still doesn't show up for me
 
Dennis has exactly 128K (decimal) rep
 
no, he's 3072 rep short of that
 
2:38 PM
?
 
Binary
 
128kb, not 128kib
 
2:51 PM
@HyperNeutrino why did you delete your sandbox post?
 
-.- gj @TuxCopter
 
allowing the \n in turn allows for quite a nice ><> golf
 
3:09 PM
@TuxCopter ok, or are both correct?
 
user165474
@NathanMerrill I think the challenge is too obscure to fix. The game's concept is okay IMHO, but the way it's put and the exact specs of it are really confusing, and every time I fix a flaw two more appear, kinda like a Hydra, so I VTC'd the post as well.
 
oh, I added a vote, I just thought that you were going to try and refine it :)
well, if you want to do a KoTH challenge, I've got plenty of ideas, and a java framework to make it easier to write :)
 
user165474
Okay:) I'm thinking of KoTH challenges right now; the minesweeper one was inspired by a minesweeper golf challenge, but no, I don't want to spend time refining it because the code is really messy as well because I didn't design it for extendability or maintainability.
 
user image
5
congrats on 42k @LuisMendo!
(I was going to upvote a question of yours and then downvote 2 others, but I decided not to. :p)
 
3:32 PM
Roses are roses
Violets are violets
Don't complain, its true
btw, How can I host a website for free?
 
so.. how can you choose a random int between 0 and n in a way that is guaranteed to terminate?
it must surely be possible
hi @MartinEnder
 
CMC: What is the longest English word that only contains two vowels?
Scratched and lightning are both 9 letters long, but I'm sure you could do better then that
 
0
A: Sandbox for Proposed Challenges

SztupYYou should log out code-golf In the programming language of your choice, log off the currently logged in user. Rules and clarifications: After running the program the user should be taken to the login screen of the appropriate operating system You can assume that no programs are running tha...

 
@DJMcMayhem Any repeats?
 
@DJMcMayhem Scratchless
 
3:46 PM
spendthrift
latchstring
I think 11 is the max
 
@Lembik What do you mean?
 
are you allowed to repeat a vowel. That is have 5 'a's?
 
otherwise the ones I gave are the longest I believe
11 letters
 
Rhythmically
If you think y is a consonant
 
3:48 PM
nice
 
Ehhh, that's kinda pushing it haha
 
Now we just have to work out what latchstring means
 
Well scratching is trivially longer than scratched
 
why are we still discussing words with fewer than 11 letters? :)
three vowels?
 
@Lembik well... use intmax! and modulo :P
 
3:51 PM
spendthrift and latchstring is 11
 
@MartinEnder :) How do libraries for crypto do it?
@MatthewRoh those were my words!
:)
 
@Lembik are you sure they need perfect uniformity?
 
Cwtching, with only one vowel
 
umm
 
3:52 PM
@MartinEnder I know they are very keen on not allowing weak randomness to be a way to be able to guess keys more efficiently
the point being that if your keyspace is 2^64 but they are not all uniformly chosen, on average you can do better than random guessing
 
@Riker Thanks!!
 
@Lembik btw, those were not yours but greps
 
@MatthewRoh me and grep are best friends
 
@Lembik you can easily get an error of 1 in 2^64 or however large you wish. I'm not sure that qualifies as weak randomness...
 
@MartinEnder A classic example is sampling from the full integer range and taking mod n.
that is though to be very bad in the crypto world
 
3:55 PM
does dashes count
 
@Lembik can't you make that arbitrarily accurate by increasing your "full integer range"?
 
@MartinEnder yes.. but how do you even sample from the full range uniformly?
 
what do we assume we can do? sample uniformly from 2^64?
 
sorry I changed the question a little to something more basic. How do you sample random ints at all over any range?
can you get random bits from /dev/urandom?
if you can then it seems fairly simple using rejection sampling
and efficient potentially
 
I don't see why you couldn't.
 
3:59 PM
ok then this seems like a sensible route for sampling from 0 to n too
 
isnt /dev/urandom psuedo-random?
 
maybe I should make a challenge where you can only read from /dev/random
@MatthewRoh yes.. I meant /dev/random
 
okay then
 
hmm... so if the challenge only allows you to get your randomness by reading /dev/random is that interesting as a code-golf challenge?
you have you output a random int from 0 to n
clearly annoying to anyone who doesn't have /dev/random
 
Anonymous
@MatthewRoh No, /dev/urandom is a cryptographically-secure source of random bits
 
4:03 PM
(btw /dev/random is psuedo-random too, the only difference is blocking/non-blocking)
 
@Mego I think that no is a yes :)
 
Anonymous
Windows has a similar system function
 
(or is it)
 
If /dev/random is pseudo random how do you read bits from the "entropy pool"
 
Anonymous
/dev/random is a PRNG. /dev/urandom is a CSRNG.
 
4:04 PM
ok so.. see question above
 
Anonymous
Wait I just learned something new
 
Anonymous
9
Q: When to use /dev/random vs /dev/urandom

Tom HaleShould I use /dev/random or /dev/urandom? In which situations would I prefer one over the other?

 
@LuisMendo :D I noticed when stalking matlab golds on SO, saw you there
 
but in any case.. how about the challenge idea?
 
wha'ts the idea?
 
4:08 PM
sample a random int from 0 to n where your only source of randomness is /dev/random
code-golf
so terrible that it's not worth mentioning? :)
 
@DJMcMayhem strengthless for 12
 
is that a word?
 
@Riker Just wait, @LuisMendo still first actually has to earn 42k, and you don't know if that is ever going to happen.
 
Anonymous
@Lembik The bot will post it here soon, so that's not really necessary
 
@Lembik added my only thought
 
@AdmBorkBork Ooh, new record!
 
first-class
high-strung
latchstring
spendthrift all for 11
 
@Mego Do I work with you? I was literally just going over this this morning with a coworker
>.>
 
4:24 PM
@ChristopherPeart thanks
 
Anonymous
@Poke Considering I'm self-employed, I'm going to go with "no"
 
haha didn't think so
 
Anonymous
cryptography also works for 12
 
but the coincidence was there
 
@Mego y is a vowel is it not?
 
Anonymous
4:25 PM
No...
 
So "my" is not a word?
 
cryptography uses y as a vowel
@ChristopherPeart nth is a word. There being a vowel is not a requirement for something to be a word
 
Anonymous
@ChristopherPeart There is no requirement that a word must have vowels. It must only have vowel sounds, which may or may not be represented by vowels in the written form.
 
I was lied to as a child
 
Anonymous
Mr. Mxyzptlk doesn't have a single vowel in his name
 
4:27 PM
Proper nouns are not real words :P
Cuz I can win this challenge right now if they are
 
y is considered both a vowel and consonant though.
 
imo y is sometimes a vowel in that it modifies the sound of consonants similar to the way vowels do
 
@LliwTelracs It is a semi vowel
Yesterday TNB became Haiku land
Today vowel land
 
0
A: Sandbox for Proposed Challenges

LembikTask Given a positive integer n less than 2^64 specified as input in any way you choose, your code should output a random integer between 0 and n, inclusive. The number you generate should be chosen uniformly at random. That is each value from 0 to n must occur with equal probability (see Rule...

 
Tomorrow? Who knows
 
Anonymous
4:28 PM
y can represent a vowel sound or a consonant sound, but it is not a vowel
 
That moment when you try to be _dramatic with italics but you forget to add the other underscore
 
Anonymous
Also I'm claiming the lead with psychophysics for 13
 
Y is a semivowel
CMC: Find a word besides bookkeeper that has 3 or more sets of repeating letters
 
But they don't have to be consecutive like in bookkeeper?
Because afaik bookkeeper is the only one
 
Leekkeeper, obviously
 
Anonymous
4:32 PM
@Fatalize That's two sets
 
Anonymous
"ee" twice doesn't count twice
 
@BusinessCat no
They do not have to be in a row
 
committee, addressee
 
meta.codegolf.stackexchange.com/questions/273/… anyone have more feedback that hasn't been posted. I have not gotten much
I don't want to post it as it is -1 right now
 
If it is -1, that could mean that people just aren't interested in the idea.
 
4:42 PM
I had some edits that I made that fixed (I think) the reason for the downvote
 
@ChristopherPeart accommodativeness
 
@LliwTelracs Impressive
 
@ChristopherPeart that link is to a meta post on interactive answers not to sandbox
 
O_O opps
-1
A: Sandbox for Proposed Challenges

Christopher PeartA chaining quine (because quines are too mainstream) So one day I had a idea to make users groan. A quine was not too bad. Anser chaining was a pain. But it was not enough. We needed more. I used science, TIO, and even JQuery, and John Skeet essence. After years of work the end result was the Th...

 
0
Q: How do manditory flags in new languages get counted

Christopher PeartThis is different then this I am writing a new code-golf language and am thinking about making two modes. One would be stack and other tatic. However you would have to specify what one you want to use. If I require one flag or another would it still be counted in the byte count? If so I may just...

 
4:47 PM
@Mego rhythmlessness for 14
cc @DJMcMayhem
 
@ChristopherPeart Usually it's best to only post answers you agree with, rather than trying to make a poll.
 
And what does Even if it is mandatory then you will be posting snippets without it mean? I'm not sure if I understand you there
 
Even if the flag was mandatory you would just be postings snippets if you did not have the flag
I finished voting to close. I noticed the answer I needed in the linked post.
At least I made it easy to find the dupe
 
But snippets that require flags still require flags
 
4:56 PM
Yes
 
@MatthewRoh github.io?
 
5:55 PM
@flawr :-P
 
CMC: given a 2D int array, return an array with the same dimensions and containing the same ints but shuffled such that every subarray has the same sum, or a falsey value/exception/whatever if this is not possible.
 
@HyperNeutrino For your Minesweeper challenge in the Sandbox, can you edit it to reduce the vertical screen real estate, please?
 
That sounds pretty hard for a CMC
 
TIL the subset sum problem is a mini-challenge
 
Should I post on main?
 
6:08 PM
I've come to the conclusion that this challenge will never end
 
@Pavel Check if it's a dupe first
 
TY
 
@MistahFiggins we will run out of langs
 
We will make more langs and go on to make noncompeting answers
 
@Poke You are making me wanting to switch back to Google ಠ_ಠ
 
6:14 PM
blog.google is blocked, and it makes me cry.
@TuxCopter What did you switch off of Google to?
 
DuckDuckGo
 
Ok, 'cause for a moment there I thought you meant Bing, and was a bit confused. I forgot DDG is a thing.
 
@Pavel wat
 
;-;
Anything mindblowing in that post I should know about?
 
Not really. Just that Google will be a little better at finding relavent programming info
 
6:17 PM
Cool
(I use Bing, meh)
 
@LuisMendo Congrats to the "Schnappszahl" (liquor number) 42024!
 
@Pavel you use bing... willingly?
 
Well, not willingly, but I wouldn't switch if I could.
 
that sounds willing
 
google is borked, it always gives 0 search results.
So I use Bing now
And I like Bing
 
6:21 PM
@Pavel Try DuckDuckGo
 
11 secs ago, by Pavel
And I like Bing
 
that sounds like you don't know how to use a search engine >.>
@Pavel that sounds like you're a robot
 
It kind of does XD
 
are you a robot
 
Clearly
 
6:22 PM
case closed
 
I also use Bing. (There's a surprise!)
 
Bing, with a better interface: ecosia.org . And if you enable ads for this site, the revenue is used to plant trees.
 
6:38 PM
@mınxomaτ Cool!
 
i use bing for bing rewards
that's about it
 
Bing Rewards are not available for me :(
 
@flawr Haha. So many consonants
 
Anyway to use p in ><> as a value push, rather than a push as character?
 
Not quite sure what you mean...
 
6:50 PM
I want to push the length of the initial stack to another cell for later comparisons.
 
you can use get (g) or quotes to get the value again
But don't try to execute the cell where the value is
 
ah, thanks :)
I was trying something very stupid
 
Same applies for the Befunges
 
@LuisMendo I somehow have a feeling that most non-german speakers are really afraid of them XD
 
hi.. some expert advice please. Is it going to be possible to write code that always terminates that satisfies meta.codegolf.stackexchange.com/a/11683/9206 ?
 
6:59 PM
/dev/random is blocking so it might have some execution time under certain conditions but i don't see why it wouldn't terminate at all
 
7:15 PM
@Poke I meant more that how would you get a random int between 0 and n without rejection sampling
 
n! % (random) maybe?
 
@AdmBorkBork the limits must be constant
 
n! % random gives you a number between 0 and random
 
Right, right
 
which is not what the question asks for
 
7:31 PM
@flawr Only when there are more than four in a row! :-P
 
I don't see what the actual code is, but it's been figured out
 
@AdmBorkBork ok but what is it ? :)
@JanDvorak Hi. Are you here?
 
@flawr what, are you going full geobits?
 
No.
 
it's a bit late now :p
@LuisMendo your rep is now a palindrome!
 
7:38 PM
@JanDvorak I was trying to understand your comment
 
except for commas nobody likes commas
 
@JanDvorak is this a windows problem?
 
Windows doesn't have /dev/random
 
@JanDvorak I mean, is it hard to read CryptGenRandom in windows?
 
Never heard of it before, and I think neither did Ruby
 
7:39 PM
@crypt_gen_random = Win32API.new("advapi32", "CryptGenRandom", 'LIP', 'L')
 
well, could be worse I guess. But I still think it's more complex than necessary - and unportable
 
it's definitely not portable
 
SecureRandom is
 
what does it give you?
I mean what precisely
 
As in, what return type?
 
7:41 PM
yes
 
I think it can only dumps me long hex strings, but I'll check
 
ok..I am not sure how to ask a question that allows a different random source per programming language
so this seems tricky at the moment
 
@Riker That is a "Schnapszahl" in german=)
 
even a different one per OS is quite a lot
 
7:43 PM
what is the win32 option?
 
It offers hex strings, base64, ascii-8bit or UUIDs
 
none of them seem to be CryptGenRandom
 
> It supports the following secure random number generators:

openssl

/dev/urandom

Win32
 
right
so what is this win32 option?
 
I suspect "win32" means CryptGenRandom
 
7:44 PM
ah ok.. so can you use that?
 
I don't think I can choose the source.
 
ok so you may be stuck with something like Win32API.new("advapi32", "CryptGenRandom", 'LIP', 'L') ?
 
the source suggests the randomness source decision is up to OpenSSL
 
not that I have any idea what some of those arguments are doing
 
Can I just downvote the challenge for being racist to Ruby? :-)
 
7:51 PM
Amazon AWS / S3 Reason For Outage. tl;dr someone punched in a bigger number than expected and removed systems from service.
 
Is anyone willing to look at a stack trace for me to help determine where i might be going wrong
 
Look at the innermost frame that is your code first
 
@flawr wait wat
 
I'm just trying to debug someone elses code, and I'm getting some stuff results
 
What language is it?
 
7:56 PM
I actually know what that means, but why "brandy/beer/alchohol number"
it's german, right @flawr?
 
sporadic "object reference not set to an instance of an object"
@KritixiLithos C#
 
We can't solve that from a stack trace
 
@Riker yep that's german. I don't know either why germans would relate anything to alcohol XD
 
lol
so is 42024 a liquor number, or does palindrome translate to "liquor number"
and apparently it's literally "liquor number", thanks gtranslate
 
@JanDvorak I figured as such I'm just trying to figure out why or where this query is failing
 
7:58 PM
@Riker palindromes and repdigits both are referred to as liquor numbers.
 
:o
 
at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source)
 
@flawr th'ats actually pretty cool
 
Probably because if you had just enough liquor you will see the samething multiple times.
 
But it's a few loops deep so I'm just still looking at it :)
 
7:58 PM
hahaha
 
Might be a bug in LINQ ... but most likely it isn't.
 
@Lembik not sure if this is what you're looking for or not grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/…
check the docstring
 
@Poke nah, that's just an LCG
not exactly a safe random
 
@Poke omg I've been wanting this for so long thanks google
 
8:07 PM
@JanDvorak hmm?
 
Linear congruential random number generators considered not cryptographically secure
 
the source of randomness is given by the next function which i'm not considering. if you assume truly random bits, then that function claims a perfectly uniform distribution
 
0
Q: Old Languages with new implementations

Wheat WizardI was hoping to answer a question using a particular cellular automaton that was defined 17 years ago (before the question was asked) but for which I am unable to find a free interpreter on the internet. If I made an implementation that followed the specifications formally laid out in the paper ...

 
Unfortunately this asker is mostly worried about that bit.
 
yes well SecureRandom has a better next function
which can source from /dev/random or /dev/urandom
i thought the question was given truly random data (/dev/random) how can you uniformly generate a number on the interval [0,n] without using rejection sampling
which is why i linked Random's nextInt rather than SecureRandom's next
 
8:21 PM
@MartinEnder Only 312? I figured we would've been higher than that by now.
 
That's a fair response.
 
As a side note this proposal would effectively also handle the worst cases that the non-competing rule is trying to deal with.
As would downvotes.
 
@Riker XD
 
ikr
thought about pinging you but got distracted
 
8:40 PM
@Riker Yup! And only 100 until the next one
 
:D
@Pavel why community wiki
 
Someone might want to make those arguments but just word them better.
I think that answers to meta questions should generally all be CWs for this reason.
Just my opinion tho
 
shrug
ok
 
@ATaco did you end up deciding to make that userscript for chat commands?
 
8:56 PM
 
Huh, that's kinda interesting. When on a site with a design, clicking the top-bar Achievements/Rep button to show the drop-down menu, the icons for the badges are from the current site's design rather than the site design from which the badge originated.
 
Yeah but with only 3 commands I've not done anything with them
 
9:19 PM
are there any size complexity challenges
 
most of the time when people talk about big o it refers to time complexity
i'm curious if there's a challenge relating to memory constraints
 
You can add a space complexity restriction
 
There are some. It's not a very common restriction.
 
well i was thinking about a challenge where the objective winning criteria would be execution memory rather than source code size
 
9:21 PM
There are several questions related to Tweeting (meaning the solution has to fit in a standard Twitter tweet).
 
not sure what i'd do
another category i might like to see more of is fastest code
not enough challenges force answers to be efficient
 
Here is an example, but it's algorithmic memory, not execution memory
lol, that's the only question we have
 
interesting
 
The O() hierarchy is mostly discrete and you often know the best bounds, so it doesn't make sense to ask for "the least memory" when "just any code that doesn't use extra memory is equally good and then you miss "secondary" criteria"
 
yeah i see what you're saying
 
9:27 PM
but you can make a question along the lines of "shortest linear-time longest common substring algorithm implementation"
 
Using execution memory as a restriction also makes a lot of interpreted languages unable to compete.
 
the solution to which, by the way, amounted to five hundred bytes of Python code.
 
unable to compete well*
 
you can also have trouble reasoning about how much memory the interpreter uses in certain scenarios.
 
No, unable to compete. If you say that the code can't use more than 1MiB of memory, for example, then PowerShell can't compete at all because just loading the shell is like 25MiB.
 
9:29 PM
gotcha
 
yeah, absolute bounds don't make much sense
 
9:43 PM
"your code must complete within a second" - "hold on, I'll grab some water cooling"
 
For some questions that would be more along the lines of hold on while I go steal a supercomputer optimized for this sort of problem
 
"Ah, well, time to grab a CUDA tutorial, I guess..."
 
Dang impressive
3
A: Build a digital clock in Conway's Game of Life

dim11,520 generations per clock count / 10,016 x 6,796 box / 244,596 pop count There you go... Was fun. Well, the design is certainly not optimal. Neither from the bounding box standpoint (those 7-segment digits are huge), nor from the initial population count (there are some useless stuff, and so...

8
"Your code must complete within a second." - "OK, but I can take 20 years to write it, yeah?"
That digital clock answer is also an early candidate for "Rookie of the Year - Answer"
 
I am at a point in the question Ruby on Rails where I need to study more graph theory
 
@flawr prolly already subbed to 3B1B, but this is an epic vid of his
 

« first day (2224 days earlier)      last day (2626 days later) »