« first day (2718 days earlier)      last day (2129 days later) » 

12:00 AM
@Pavel ... that's only python2, right?
 
Because if you do this it becomes next to impossible to figure out what the fuck your code actually does. Is FromContinuedFraction . ContinuedFraction equivalent to id? This is super easy to answer if the creators of the language put any time into designing a type system.
 
@CatWizard It's equal to id iff the argument is an algebraic number.
 
@CatWizard Types must exist: even if everything is one type :p
 
@Zacharý That's my point.
 
@CatWizard If everything is one type, say object, no matter what you do, you're gonna get an object
 
12:02 AM
@Pavel No it depends on the type signatures of the individual functions.
 
Well, literally everything is just a boolean[] in memory, so why fret about this?
 
@CatWizard The individual functions have type Symbol -> Symbol.
Where everything is a Symbol.
 
Yes, this is a bad thing.
 
But, it is guaranteed that ContinuedFraction will return a list given an algebraic value, and FromContinuedFraction will return an algebraic value given a well-formatted list.
 
12:16 AM
yawns
Tired.
 
12:33 AM
Who here uses lodash?
 
12:45 AM
@Pavel @CatWizard If it errors on invalid arguments: it's like / then, 'cause you can't divide by 0
 
That's a good way of looking at it.
 
1:30 AM
0
A: Sandbox for Proposed Challenges

l4m2Merge two Brainfuck code Given code A and code B in brainfuck, output a code C in brainfuck that output what B output when feeding B the output from A. You can assume both A and B halt. Shortest code win.

 
 
2 hours later…
3:55 AM
@LuisMendo Your plea has been answered. I changed it.
 
... it's even close to a cat tho'
2
 
It isn't meant to be a cat.
 
4:45 AM
But you're Cat Wizard: a LOT of your past avatars have been cats.
 
5:14 AM
Fair enough. I like my new avi though.
 
Or maybe HEAT WIZARD
 
 
2 hours later…
7:19 AM
@Mr.Xcoder god why am I still playing (well, as much as you "play" an idle-ish game) that
 
7:36 AM
Maybe Cat Wizard should be Heat Wizard, as that's another word that can be achieved via removal of letters from Wheat.
Or Wat Wizard would ork
 
 
2 hours later…
9:23 AM
0
Q: Pocket Pokemon Type Evaluator

VoileYes, I know there are already three pokemon type questions, but almost all submissions hardcode the whole chart in one way or other. I think it'd be nice to change the requirement a bit to encourage more shortcut-taking typically seen in decision problems. Objective Write a program/function/wha...

 
 
2 hours later…
11:45 AM
@CatWizard \o/
 
This is a plea for unlimited pleas
 
@Zacharý Wet Wizard?
 
12:22 PM
0
Q: Randomizing until 0

Luis felipe De jesus MunozChallenge Sandbox post Given a positive integer (K) Output a uniformly-random integer (Y) between [0, K). If Y > 0 Assume K = Y and repeat the process until Y = 0. Rules Input must be printed at first Output format as you wish Your program must finish. 0 must be the final output, Optionall...

 
1:03 PM
@NewMainPosts so...I'm reluctant to answer that, since there is something in the comments that most haven't noticed
@Adám because 2+ runs of your program with the same input must not return the same output — Luis felipe De jesus Munoz 38 mins ago
 
@EriktheOutgolfer Can you explain how this invalidates all answers?
 
> 2+ runs of your program with the same input must not return the same output
that means that, if you run your solution multiple times, the outputs must be different
@Adám ...
 
1:18 PM
Hey, do any of you know a page with local development ? I used one page some time ago but I do not remember anymore. (for coding challenges)
 
1:37 PM
@EriktheOutgolfer I think it's just the OP not saying properly what they had in mind
I also don't understand why @Adám asked it as a comment because the specs clearly say "Output a uniformly-random integer" which excludes deterministic behavior
 
BMO
1:52 PM
@FreezePhoenix: I didn't think about this before but having read that comment, I think it would make sense to adjust the rules accordingly (there would be no answer invalidated by it, so there wouldn't be any problem in doing that).. What do you think?
 
@Neil that's just ew
@BMO What comment is this a reply to?
 
BMO
@Zacharý Just a ping, no reply.
 
2:11 PM
Ah
 
BMO
I mean the whole point of the challenge is not to determine a winner but to create a polyglot as large as possible (in terms of # of langs) and that rule seems to do pretty well in preventing that, so it would only make sense to adjust them.
At first I thought I'd open a meta about it, but I guess it would be wrong to do so without asking the OP first..
 
What rule are we talking about?
 
BMO
That you can't add two consecutive answers.
The part about the winning criterion is true too, but I don't care about that too much.. it's just a green checkmark ^^
 
2:27 PM
Maybe we can make it like the other challenge, where after the challenge ends, people can go all out.
Or maybe @user202729's comment would work.
 
@BMO "the last poster wins" is even better at preventing it.
 
^ that one
 
@BMO For the other challenges, it's important to have a winning criteria, otherwise it's boeing.
For this, I'm not sure
 
BMO
@user202729 I didn't think people actually care for winning that challenge, but if so then yeah.
If the rules will be changed the new ones should probably say "If this question goes for 20 days without activity, ...". Because if X really wants to win it, they could look that it ends up in a scenario with answers like this: X,Y,X where Y would win and then just before the challenge ends delete the last answer..
 
@BMO You can't really delete it, right...
Atleast for Stack Overflow.
 
BMO
2:40 PM
@user202729 ?
 
3:00 PM
0
Q: A Lazy Bag of Bread

OnLinedPaperI work at a bakery that serves Wheat, Rye, Barley, Grain, and French bread, but the baker's a little weird - he stacks the loaves in random order, and sometimes just leaves some shelves at the end empty. Each day, the same customer comes in and asks for one of each loaf of bread, but the tricky ...

 
0
A: Sandbox for Proposed Challenges

mdahmouneCompute the Cross-Ratio Given four points A, B, C and D on a line, with coordinates a < b < c < d, their cross ratio is defined as: ((c-a)*(d-b))/((c-b)*(d-a)). Input four different integer values in any order Output The cross ratio: ((c-a)*(d-b))/((c-b)*(d-a)). Example 10,18,12,19 -->...

 
@user202729 You can delete your own answer (singular) whenever you want. That said, if someone deletes a valid answer to cheat at a challenge, I'd be inclined to undelete it.
 
3:16 PM
I was just idly looking at crash-stats.mozilla.com/report/index/… and wondered how the null crash could be in a line whose one job is a null-check
 
4:07 PM
0
Q: Last digit large number

ScathFor a given list of number [x1, x2, x3, ..., xn] find the last digit of x1 ^ (x2 ^ (x3 ^ (... ^ xn))) Example: [3, 4, 2]=== 1 Because 3 ^ (4 ^ 2) = 3 ^ 16 = 43046721. Assume that 0 ^ 0 = 1 and that an empty list equals to 1. Saw on code wars.

 
Java question: Should I name a class the same as a java built-in class? If not what should I do instead?
(for example Color or Panel)
In that particular file I don't import Color or Panel, so I'm fine, but it may cause confusion.
 
4:45 PM
I'm currently trying to invoke a .NET Core method from Python through ctypes and I'm wondering how I found myself in this position.
 
5:26 PM
._.
 
@JonathanFrech ...and if not print eval('**'.join(map(str,input())))%10 should be acceptable.
 
he didn't get pinged
 
@EriktheOutgolfer hmm why?
 
he hasn't been in the room for the past 7 days?
 
5:53 PM
@JonathanAllan lol that was exactly the approach I was thinking of
about the latter...it would need to get the integers as strings
 
6:04 PM
I think I just figured out why I can't seem to get into Haskell. I looked at the project I'm working on and realized 95% of the lines do IO or some impure calculation.
I don't actually write a lot of pure algorithms while coding.
 
6:16 PM
0
A: Sandbox for Proposed Challenges

BeefsterSlaps Roof of Car code-golf meme The Car Salesman meme has been pretty hot lately, so I thought I'd make a dumb little code golf challenge for it. Your program should take 2 strings as input and output text in the following format X salesman: *Slaps roof of X* This bad boy can fit so much f...

 
@NewSandboxedPosts no pls
 
@BMO sigh what comment
 
slaps roof of PPCG this bad boy can fit so many meme challenges
11
 
slapping the roof of PPCG is actually a good thing, if done from below
 
6:51 PM
@Riker official sock puppet snek
 
7:13 PM
@flawr is adorb
 
@flawr shiny
 
@Pavel the purpose of having purity vs impurity is to make impure things easier and safer, not harder
 
@quartata If everything is an io action anyway, what's the point?
 
Structure
 
¯\_(ツ)_/¯
I'd rather use F#
 
7:25 PM
Monads are a very convenient way of thinking about synchronous I/O
 
Maybe
 
haha
 
All I've been doing the past year is gluing processes and APIs together, really.
 
@Pavel That's all they all do
 
from pexpect import *
ModuleNotFoundError: No module named 'termios'
pexpect no y u do this
 
7:42 PM
LOL
import * from pexpect
 
@FreezePhoenix That's not how python works ._.
>>> import pexpect
>>> pexpect.spawn('echo hi')
AttributeError: module 'pexpect' has no attribute 'spawn'
 
import all_the_things
 
from * import *
 
pexpect.spawn is literally the first example in the help document
 
I assume you're on Windows
which does not have termios
or literally everything Expect needs
 
7:45 PM
LOL
 
just use subprocess
 
You're right, but pexpect still works with a slightly different method, namely pexpect.popen_spawn.PopenSpawn
 
^ Maybe... it uses 0 builtins?
 
@Pavel you won't get any TTY features though
which is what expect is good for
it uses a virtual TTY
 
@quartata I literally only need send() and expect()
 
7:51 PM
Which depend on how many things?
 
@Riker very much sssso
 
8:09 PM
google why
 
I haven,t tweeted in 3 days because i want The Website to be my 200th tweet and as a result half of modern civilization here has collapsed
the followers are committing heinous acts in an attempt to guilt me into tweeting
 
@Riker Now listen closely ...
 
instead im just trying to make the perfect fragment shader while sippcing single malt herbal mango tea
it has to be perfect because i only get one shot
 
8:31 PM
@AdmBorkBork please no
 
@Riker Now ignore me while I blab on about music...
(Please don't I won't torture you or say another word about music)
 
@quartata What's The Website going to be about?
 
the wsbsite is an ancient artifact im using to make contact with other worlds
it will be, about me, of course
Jun 28 at 17:42, by quartata
one of the more revolutionary features of my incoming wsbsite, which is being lovingly crafted in hand made C by Oompa Loompas in the tarpits of hell.., is that there is a "random tweet' button which can be used as a more consumer-friendly way to enjoy my tweets...
 
Is it going to be open source because I'm kinda intrested in what making a site in C looks like
 
yes
 
8:45 PM
awesome
 
I made a really small site in C once.
It was... interesting
 
Full stack?
No JS here, it's C all the way down
 
Oh, I didn't do that
 
I clicked on the repo list for Quartata's GitHub and chrome instantly crashed
 
what
that doesn't seem right
 
8:46 PM
@quartata hey... can you post a link to it?
 
It closed and I got a "Something went wrong" notification
 
@Pavel lol
 
@FreezePhoenix its not ready!!
 
@Pavel can you post it :P
 
i know, i know, the UN is kicking down my door over this
 
8:47 PM
0
A: Sandbox for Proposed Challenges

ElPedroOtput Toays Date Sounds easy? Not quite so. Your program/function must be totally symetrical. alert(new Date())//(()etaD wen)trela would probably work in Javascript but is not very interesting and would probably not get many upvotes. Let's try and me a bit more creative. Standard rules apply....

 
No it's gone
@quartata What's your FOSS license of choice?
 
@Pavel check your browser history
 
@FreezePhoenix Oh the page? You can just go to quartata's profile
 
yes, the page
@quartata What's not ready?
 
@Pavel normally I,d use MIT but for this theres some properiatary tech i stole from italy so the license might be more complicated
depends on how talkative im feeling
 
8:51 PM
llvm
Forked from llvm-mirror/llvm
Mirror of official llvm git repository located at llvm.org/git/llvm. Updated every five minutes.
 LLVM  1,507 Updated on 30 Jul 2017
@quartata I believe that's yours ^
 
?
 
One of your repos
 
what about it
it's just a fork
 
And... It's not updated every 5 minutes
 
thats from the upstream..
because its mirrored from the official llvm git
 
9:38 PM
What's a decent name for a function that turns a string into an atom (like f("+") => Add)
 
Atomize, toNativeOperation
 
@Zacharý I don't understand. How did it come up with "Add"?
 
@FreezePhoenix toNativeOperation works, thanks!
@Adám switch statement... a MASSIVE switch statement
 
@Zacharý ⍨
 
Can't tell if that's APL or a reaction...
 
9:44 PM
It's written in D.
 
 
@DJMcMayhem Both!
 
@DJMcMayhem Adám tends to use ⍨ (iirc APL FUNCTIONAL SYMBOL TILDE DIAERESES) like :/
 
@DJMcMayhem I prefer proper APL functions as emoticons. E.g. ⍨ and ○/ and ∘.○
 
@Adám is a monadic operator!
The "It's written in D" refers to Adám's reply to it being a massive switch statement.
 
9:52 PM
@Zacharý OK, take functions loosely. There are also ⍤ and ⍥, both of which are dyadic operators…
 
@Adám Has been added in any version that's unavailable to the public? If I recall, that was one of the symbols on the keyboard that doesn't get used.
 
@Zacharý Not in Dyalog, no. My housemate is confident we'll have it in 18.0, but for now 18.0 is almost identical to 17.0, other than being way faster.
 
@ConorO'Brien, is there a way to avoid variable ... has scoped destruction, cannot build closure erros in D?
 
@Zacharý erm... can you TIO some code? MWE perhaps?
 
user image
2
such beautiful kerning
this is real and I just saw it when I tried to install unity
> c o n n e c t i o n w i t h o u r w e b s i t e, a c c e s s i b l e
 
@ConorO'Brien Here's a MWE
 
justified alignment fail
 
10:41 PM
ikr
 
@Zacharý it seems to be a problem with using Variant afaict. Try it online!
 
@Riker It is really hard to do right programmatically.
 
@ConorO'Brien Thanks, guess I'll find a way around it.
 
@Zacharý Are you rewriting RAD in D?
 
0
A: Sandbox for Proposed Challenges

Luis felipe De jesus MunozMissing number in my sequence Given a sequence of numbers, output the missing number. Example: Input 1 2 3 4 # 6 7 8 Output 5 Asume sequence pattern will be repeated at least twice Asume hidden number wont be neither the first or the last number of the sequence Input format can be an array or...

 
10:47 PM
@Zacharý "eval" or "atomFrom" or "toAtom"
 
@Adám I'm attempting to
 
you shouldn't be using variant IMO, a tagged union is probably better-suited
 
Yeah, I probably should do that.
 
11:41 PM
@ConorO'Brien what's the difference?
 

« first day (2718 days earlier)      last day (2129 days later) »