« first day (2439 days earlier)      last day (2402 days later) » 

7:00 PM
@Mr.Xcoder MATL, 8 bytes: to3*Q2/*
 
@DJMcMayhem Wow nice.
 
n=>from i in n
select i%2<0?i/2:i*2
C#
 
@Mr.Xcoder Husk, 6 bytes: m?D½%2
 
@Mr.Xcoder PowerShell, 38 bytes -- $args[0]|%{([int]($_/2),(2*$_))[$_%2]} Try it online!
 
@Pavel ==0 => <1
@H.PWiz Same solution here :-)
m?%d2yd/d2
Pyth
 
7:03 PM
Also C#: n=>n.Select(i=>i%2<1?i/2:i*2)
 
@Pavel Now you have <0 ಠ_ಠ
 
No I don't
Now I have n=>n.Select(i=>i%2<1?i/2:i*2)
 
Mine looks like a bunch of garbage and a couple 2s tossed in for good measure.
 
@AdmBorkBork Lol, that's a perfect description :-)
 
Python: lambda l:[i*(i%2*1.5+.5)for i in l]
Proton: l=>[i*(i%2*1.5+.5)for i in l]
 
7:08 PM
Jelly: ḤHḂ?€
 
n=>n.Select(i=>i*(i%2*1.5+.5))
Can't tell if shorter than ternary and too lazy to count
 
@Pavel 28 bytes using that (clever) approach -- $args[0]|%{$_*($_%2*1.5+.5)}
 
The same byte count, Python: lambda l:[[x/2,x*2][x%2]for x in l]
@Pavel That is not valid I am afraid
Should be l=>[i*(i%2*1.5+.5)for i:l]
 
CMC: Given a list of integers, output the even elements if the list length is even, otherwise output the odd elements. Example: [4, 5, 7, 4, 6, 8] -> [4, 4, 6, 8]
 
Same byte count too: lambda l:[x*(x%2*2.or.5)for x in l]
@AdmBorkBork Pyth, 10 bytes: fq%T2%lQ2Q
I think I can do better though
Way too long, 8 bytes (Jelly)
 
7:18 PM
Yeah, that seems long, because I can hit 32 in PowerShell -- param($a)$a|?{$_%2-eq$a.count%2}
 
What's the average ratio Powershell:Jelly?
 
Ruby: ->a{a.select{|e|e%2==a.size%2}}
 
@Mr.Xcoder Usually seems pretty dang close to 10:1 for a CMC
 
@Mr.Xcoder Dyalog APL, 10 bytes: ⊢÷2*¯1*2∘|
 
@AdmBorkBork Ouch... I cannot do it in 3 bytes
@Adám APL is also tacit?
 
@Mr.Xcoder Dyalog has three modes, traditional, direct, and tacit.
 
:o wow
 
@AdmBorkBork Dyalog APL, 12 bytes: ⊢(/⍨)2∘|=2|≢
@Mr.Xcoder Seriously, you should learn it (APL, not Seriously).
 
@Adám Although your opinion is heavily biased, I agree.
 
Noo, learn PowerShell :p
 
7:24 PM
@Adám I've heard something about an APL course or something? :P looks around - I'd like to learn it.
And BTW gtg o/
 
@Mr.Xcoder Well, if you like dense code, but want a real-life language, you basically have to choose between APL, J and K — all of which are APLs.
 
@Adám I'll ping you in the APL chat room when I decide to start learning it.
 
@Mr.Xcoder Yeah, I'll get around to holding more formal classes in the APL chat soon (TM).
@Mr.Xcoder OK. G'nite.
 
7:37 PM
oh yay more ordered comparison errors
 
At this point, just use clang 3
 
I honestly don't know how to get Xcode to do that
VPC emits Xcode projects on OS X instead of a Makefile like on Linux which is the only reason I'm bothering with any of this
luckily there aren't that many
it's a quick fix
> reinterpret_cast<uintptr_t>(GetLocalTeam()) > 0
zomg modern C++
 
8
A: How do I make Xcode use an alternative version of clang?

hagiThe easiest option (also the easiest to reverse) is to add the CC build flag. Go to your project's or target's build settings, and choose Editor --> Add Build Setting --> Add User-Defined Setting from the menu. Name the flag CC, and set the value to the path to your Clang binary. You can c...

Seems pretty straight forward.
 
ah yes
they have that set up to point to a wrapper for CCache
I can probably change the wrapper itself to use GCC instead though
 
@quartata No CMake output? Boo...
 
7:42 PM
pretty sure it predates CMake
I think they use it to build goldsrc too
 
CMake is 17 years old.
 
yeah
 
Odd
 
although it looks like HL1 just uses regular VS solutions
So I guess that dates VPC at 2003 not 1998
 
@AdmBorkBork I'll learn it when I can use it with grep.
Until then, I'll stick to mingw bash
 
7:59 PM
@Pavel That defeats the entire purpose of the pipeline
 
8:15 PM
@icrieverytim ಠ_ಠ that reply was like several weeks late xD
 
while(solvingProblems)
{
//TODO: fix infinite loop
}
 
lol
I wonder when I'll be able to get a chance to bounty Tetris GoL :P
 
Save your bounty for Pong
otherwise El'endia will hit 10k before me
 
what's pong
 
I kinda wonder how long Tetris will stay up on the featured tab
@HyperNeutrino we're making pong in GoL next
 
8:24 PM
:o
is that already a question or has that not been asked yet?
 
I think the plan is we're going to ask it as a question after we finish upgrading our stuff but before we actually write it
Not entirely sure
 
ah ok
 
Is it normal to let the decision of list-based vs entry-index-based output to the golfer in a standard sequence challenge?
 
@SEJPM Can you give an example of what you mean by entry-index-based?
 
@AdmBorkBork "given n output the n-th entry of $sequence"
vs "given n output the first n entries of $sequence"
 
8:37 PM
Ah, as opposed to "output the first n"?
Personally, I allow for either, as output formatting isn't (usually) the interesting part of the challenge.
 
@MartinEnder Hello Martin, I have seen your Vector Racing Grand Prix contest. I used to play the game a lot and I am wondering if anyone could be interested in this variant with high branching factor: jsfiddle.net/qud9zm2t/17. Might be too complex for a codegolf entry.
 
@AdmBorkBork ok, thanks :)
 
8:57 PM
@Pavel No idea, I think it just plays notes.
@orlp well yes, but there are heavy books about GF and extracting goefficients:)
 
0
A: Sandbox for Proposed Challenges

SEJPMGolf the "fake-primes"! code-golfmathsequence Introduction / Background In a recent discussion in the crypto chat I was challenged to discuss / help with the Fermat primality test and Carmichael numbers. This test is based on the premise that a^(p-1) mod p==1 will always hold for primes p, b...

 
@orlp I think you're looking for "discrete" b-splines:
(x^b - 1)/ (x-1) = x^(b-1)+x^(b-2)+...+1
or as vector of coefficients: (1,1,1,1,1,1,...,1)
if you take a=2 you calculate the discrete convolution of (1,1,1,...,1) with itself
and for a general a it is just the discrete convolution of (1,1,1,...,1) with itself (a-1) times
When calculating b-spline basis function you have the piecewise linear spline by using a rectangle function, for the piecewise linear function you convolve the rectangle function with itself generating a triangle function e.t.c.
to calculate the repeated (a times) discrete convolution more efficiently you need to do a large enough padding, then FFT it, take it to the a-th power and IFFT it
 
9:15 PM
0
A: Sandbox for Proposed Challenges

AdámIs my Sukkah Kosher? Do not rely on this text for questions of Jewish law! You will be given a floor plan of a sukkah as follows: A rectangular 2D text (in any reasonable format). The first and last rows and columns will consist of printable ASCII (32-126). All interior characters will be...

 
@NewSandboxedPosts @Adám Isn't it spelled Acceptable, not Acceptible? (Or is that a regional thing?)
 
@DJMcMayhem Both are accept?ble, but changed. Thanks.
 
Accept[ai]ble
 
Acceptaible?
 
@flawr it's only [ai] not [ai]+ :p
 
9:38 PM
@flawr No, [ai] only matches a single char.
 
Pronounced Accep-table
 
ah that is supposed to be a regex:)
 
I used wildcards.
@DJMcMayhem Any other comments? About the content maybe?
 
I didn't actually read the challenge because the typo(?) stood out so that's all I noticed :P
 
@quartata you available for C help?
nethack w/ menucolors isn't compiling well
unix doesn't like posix
 
9:41 PM
@DJMcMayhem I'm so sorry for disturbing your fine sense of spelling.
 
Sorry, that's not what I meant
More just that it was a quick glance-over
 
Anonymous
@Riker Why not take your question to U&L?
 
@FunkyComputerMan Changed your name, I see.
 
calculators supporting TI-basic have a built-in byte counter
 
@orlp
 
9:54 PM
from home screen: mem -> 2 -> 7
 
I used tomato sauce instead of pesto
my chicken was tasteless :c
every meat that I cook is tasteless
 
the number to the right of the program name is total file size in RAM
appears to be 9+name length+contents of program
I think this observation is good progress towards resolving the TI-basic byte counting conundrum
the debate at this point is as follows: should the header and filename be included in the total byte count, or should we subtract these from the displayed value
(also, interestingly, the TI-basic encoding seems to be variable-length, a few tokens seem to use 2 bytes)
 
@LeakyNun Meat doesn't really have much taste. If you want to taste it, taste it as it is.
 
@Adám but it tastes great when I eat it from elsewhere
 
@LeakyNun It probably isn't the meat you're tasting, but everything else.
 
10:08 PM
@Adám hmm
or do I need more time in order for the sauce to soak into the meat
 
@LeakyNun Fool-proof (?) chicken: Spread it in a pan. Sprinkle it with onion powder, as much as will stick. Put it in the oven for 1-1.5 hours at 175°C. Serve.
 
interesting
 
I prefer Eggwash, Crumb, fry until golden brown.
Add Tomato Paste, ham, and cheese, grill until the cheese melts.
 
@ATaco I can imagine a whole host of things that can go wrong there.
 
Chicken Parmigiana.
Probably, but it's something you get the hang of doing.
 
10:13 PM
@ATaco A lot of people cannot cook even basic food. Recipes make way too many assumptions for them.
Fool-proof (!) steak: Serve. (Well, I like it like that.)
 
Good point, there's a reason I'm no tutor :P
 
10:33 PM
Oh god, is another cooking lesson going on?
 
@cairdcoinheringaahing I need to cook
it costs like ten times less than if I go out
every food in uk costs me an arm and a leg
 
@LeakyNun Wait, you're in the UK?
 
@Adám yes
 
@LeakyNun You could come over to me for dinner…
 
@Adám where are you?
 
10:35 PM
@LeakyNun Not if you live with your parents :P
 
@LeakyNun London.
 
@Adám how do you plan to give me your address
presumably not here?
 
@LeakyNun Are you anywhere close?
 
@Adám yes
[London is big, but]
 
:O Taking code golf outside of PPCG and into IRL!? Shocking
I feel like I'm interrupting a conversation between you two. I'll slink back into the shadows :(
 
10:37 PM
@LeakyNun Based on my avatar, you should be able to deduce that I'm in N16 or E5.
 
@Adám how can I do so based on your avatar
 
A friendship born in codegolf~
 
Stamford Hill is an area in north-east London, England, located about 5.5 miles north-east of Charing Cross. The area is known for its Hasidic community, the largest concentration of Haredi Jews in Europe. Due to their high fertility, the area has one of highest birthrates in the UK, with a crude birth rate of more than 25 per 1,000 of the population, twice the UK average. Stamford Hill is also the name of a section of the A10 road running through the area from Stoke Newington High Street to the start of Tottenham High Road. == Boundaries == === Informal boundaries === The more usual, and loose,...
 
CMC: Given a picture, determine Adám's postcode
 
@Adám hmm, I live in North Acton
 
10:40 PM
1
Q: Like a path-segment; touched for the very first time

Digital TraumaGiven an ordered list of 2 or more 2D cartesian points, output a truthy value if either the path touches itself or self-intersects; otherwise output a falsy value if it does not touch itself or self-intersect. You may assume that consecutive points in the list are distinct. Examples: (0,0), (1...

 
I wish I could visit London/UK. Bunch of internet people I admire live there. Tom Scott, Brady Haran, Geoff Marshall.
 
@LeakyNun W3? Hm, yeah that's quite the opposite side. But I'm home all of next week if you want to stop by and get an APL lesson…
 
@Adám LOL
how am I going to get your address then
 
@LeakyNun You can email me: adam@
 
dyalog.com?
 
10:42 PM
@LeakyNun what else?
 
how do I know
sent
 
I love how VSCode has full built in Git support.
 
@ATaco That is nice. So does JetBrains stuff, e.g. Android Studio
 
@LeakyNun If you search the APL chat room, you can also find my mobile number (but don't call now as my family is sleeping – speaking of which…)
@HelkaHomba I change trains in the town where Jon Skeet lives on my way home from work.
Anyway, sleep tight everyone. I'll be back next week.
 
@LeakyNun Also a good food thermometer helps to make sure meat is not over/undercooked. Overcooked chicken is dry and bland and tough.
 
10:53 PM
@HelkaHomba hmm
 
(Now I really want some chicken)
 
@AdmBorkBork RProgN 2, 14 bytes ]L2%x={2%xe¬}-
 
@LeakyNun And America's Test Kitchen/Cook's Illustrated (run by same people) is a great place for food + kitchen equipment reviews. e.g. cooksillustrated.com/articles/… (some of their reviews are blocked until you join but you can usually find mention of the stuff elsewhere)
 
@HelkaHomba thanks
 
@ATaco what are friends /s
 
@Pavel Remember that Apple thought having a "right click" was too confusing until about 2010
And now the iPhone is losing buttons...
 
soon it will just be a sheet of glass with images
 
Until we perfect the brain-tech interface
 
@Mego it's specifically about nethack, and it's easier to ping him that to write up a question
plus, I'm not sure what i should include in the question, as it's kinda a giant project w/ like 4 files linked to this error
 
11:32 PM
@Mr.Xcoder Lua, 27 bytes require"equa"t=a*b*sin(t)/2 Takes degrees in radians.
 
@Riker what up
 
@ATaco 0/10 taking input as variables in source code
 
But I'm not
Read the code again.
 
@HyperNeutrino require"equa"
 
oh
wait what exactly is require
 
11:34 PM
Runs a module.
 
hm so like python import?
 
Essentially, yes.
 
But equa does a lot of things that makes golfing easier.
 
ooh cool
 
11:35 PM
Like making sqrt(a^2+b^2) a perfectly fine definition of a function which calculates the hypotanuse of a triangle.
 
hm ok cool
 
@HyperNeutrino not like I had a choice :P
 
hm wait were you suspended? (<-- technically breaking rules here lol)
 
@cairdcoinheringaahing a little bit of profile editing can't hurt :P
@HyperNeutrino yeah lol
 
oh ok :P
 
11:46 PM
@quartata tl;dr: menucolors hates me
include/color.h:64:30: error: field has incomplete type 'struct
      re_pattern_buffer'
    struct re_pattern_buffer match;
                             ^
include/color.h:64:12: note: forward declaration of 'struct re_pattern_buffer'
    struct re_pattern_buffer match;
and:
include/decl.h:596:2: error: unknown type name 'regex_t'
        regex_t match;
        ^
include/decl.h:651:5: error: unknown type name 'regex_t'
    regex_t match;
 
Compiler?
 
shudders clang
this is the error from make install
 
Also I'm very mad that I wasn't in chat when Tetris in gol happened >:U
 
rip
I wonder when I'll get a chance to bounty :P the bounty crossover always overnight for me :( :P
 
@Riker second error is most definitely it somehow missing POSIX regex so I'd try GCC
 
11:49 PM
But hey at least I got my bounty on it
 
@quartata fixed hte first error, the regex_t one is somethign though
@quartata how the heck do I do that though >_<
gcc runs clang
 
You get actual GCC
 
I need to get better at C.
 
@HyperNeutrino yeah I didn't catch it the first few times, but I'm currently in a completely different time zone lol
 
Working with anything but the basics scares me.
 
11:50 PM
@icrieverytim ah ok :P
 
Homebrew won't give you OpenMP by default, it's trash
Use those binaries
 
ah cool
 
CMC, inspired by a recent SO question I just answered: Given a multiple line string, replace every space at the beginning of a line with an equal number of periods.
int main()
    {
  std::cout << "hello world";
        return 0;
}
int main()
....{
..std::cout << "hello world";
........return 0;
}
There's a test case
 
question link?
 
11:53 PM
0
A: Sandbox for Proposed Challenges

GryphonHow Many Unique Primes? One way to represent a natural number is by multiplying exponents of prime numbers. For example, 6 can be represented by 2^1*3^1, and 50 can be represented by 2^1*5^2 (where ^ indicates exponention). The number of primes in this representation can help determine whether...

 
(I was tempted to answer in V, but I figured that would not be entirely appreciated :P)
 
holy crap that worked @quartata
thank you so much
 
today on "covfefify a string" stats:
"Build a working game of Tetris in Game of Life" is the first challenge to beat covfefify in votes and has moved up to the first place and will also probably hit 1k votes
 
@Riker it's funny how all problems go away once you stop using Clang
last few days have definitely reminded me of that
 
Definitely not the best solution, just my first thought.
 
11:56 PM
@DJMcMayhem Real programmers hate golfers but really real programmers are golfers.
 
Two V solutions: òí^ *“ /. (9) or Î^hviwr. (8)
 
Real Programmers use Butterflies.
 
Low key XKCD reference :P
 
@quartata yes
except for my current nethack problems: mind flayer + paralysis = "help I forgot literally everything"
 
@icrieverytim what was that ping earlier about
 
11:59 PM
Click the reply button :P
 
@DJMcMayhem :c I'm trying a v solution
 
Anyone have the link to Desmos programming docs?
I can't find -_-
 

« first day (2439 days earlier)      last day (2402 days later) »