« first day (2300 days earlier)      last day (1583 days later) » 

yeah you can download a deb and dpkg -i it
Microsoft is god
Don't need linux anymore
only windows
(And the creators update)
(That adds more linux)
Actually I run Windows 10, running VirtualBox within WSL, within which I have an OpenSUSE VM that has a Windows 10 VM inside, that's running WSL, which has a Windows 7 VM inside.
darn android
@Mayube too bad, windows 10 (creators update) already has OpenSUSE
9:24 AM
@SIGSEGV I just want my damn ubuntu 16_04 so i can actually get Java 8
14_04 doesn't have an official backport of 8, only 7
@Mayube What's wrong with running Win7 on the hardware?
@Adám not enough abstraction
there must be at least 3 layers of virtualization between the hardware and the OS I'm using
@Mayube Doesn't it run slow?
A: Sandbox for Proposed Challenges

ArtyerI <3 conditionals You end up having a lot of very long, boring-looking conditionals in your code: if flag == 1: while have != needed: if type == 7: These can be transformed into their much more lovable <3 conditionals counterparts: if abs(flag - 1) + 2 <3: while 3 - abs(have - needed) <...

9:39 AM
@Adám you realise I don't actually do that, right?
is a lambda a valid answer for C#, when the challenge simply says "write a program..."
@Mayube No, I didn't.
@Adám I run windows 10 at work, using WSL as an all-in-one replacement for Git Bash and Putty, and I use Win7 with a Debian VM at home
Q: If without if statements

SteveFestOh no! Your boss asked you to write a program or a function to detect if an input is a specific string, but the I and F buttons are broken, that means a nightmare: no if statements. Rules: Determine if the input is length 4, or begins with a "t", whichever condition results in a shorter pro...

10:01 AM
@WheatWizard (sorry for another ping) I have another user who has seen my answer and have proof/timestamp. I am locked in. Whenever you finish just ping me with your answer or the byte count. I will respond ASAP.
How long should I leave a challenge in the sandbox for before posting it? Does no votes and no comments imply that it's good to go?
@Mayube XKCD I think made that joke
@Shaggy I'd leave it a week, some say 3 days. But either way if you get no feedback it may just mean no one's seen it yet, so after a few days link to it in here to find out
@Shaggy Not really. Who long was it in? I have some that have been in for a few weeks and will not be posted. Yet others I can turn around in a short time. Just post the link in here and you should get more feedbck
Thank, @trichoplax. It's my first challenge so I'll give it the week to maximise time for feedback.
10:05 AM
@Shaggy If you don't get feedback just post the url in chat and then wait a little bit
@Shaggy Wow - only posted 19 hours ago but already 12 more posted above it (if sorted by active, which is what most sandbox reviewers do). This is why saying a fixed number of days doesn't really help. When it's really busy people might not see your post at all, so posting in here after a few days is the only way to make sure it hasn't been overlooked.
OK, thanks, @trichoplax
This is it, if anyone would care to throw an eye over it: codegolf.meta.stackexchange.com/a/12419/58974
@Christopher probably, xkcd's made every joke
@Mayube can't you use msysgit instead of git bash and putty
@ASCII-only Why bother. More fun to use VM cuz installing viruses is great
10:17 AM
WSL isn't a VM
@Christopher installing viruses?
@ASCII-only Yes! All of them. You can download games like AoM (Age of Mythology) of a sketchy site using torrent (you already own it but disks are too much work) and test if everything goes down!
@Mayube Opps. I was dumb
@Christopher if you actually bother checking torrent contents your chance to get a virus goes down by like 99.9%
@ASCII-only Well yeah. But still. You can always miss something and testing on a VM is the way to go.
@Christopher well how often would you need to download from shady sites for work
10:23 AM
TIO downloads from shady sites on a daisy basis
@JanDvorak TIO?
@JanDvorak wat how
well, technically not sites, but shady nevertheless
@JanDvorak example?
10:25 AM
Let's say someone wants TIO to test their Ruby code, `rm -rf *`. It shouldn't prevent everyone else from doing the same.
Thanks for your feedback, @trichoplax, appreciate it :)
@JanDvorak um how does that count as a download
From the server's point of view, it's a download
@Shaggy No problem. Thanks for seeking feedback before posting - it makes everything go much more smoothly :)
@trichoplax I may be new but I've already seen enough bad challenges to know the value of the Sandbox!
10:34 AM
A: Sandbox for Proposed Challenges

ChristopherFill an array with all the numbers from 0-n You must fill an array with every number from 0-n inclusive. No numbers should repeat. However they must be in a random order. Rules All standard code-golf rules and standard loopholes are banned The array must be generated pseudo-randomly as it is ...

10:56 AM
If you onebox instead of pasting an image, we'll be able to see the hovertext too
pls link to the actual comic, it oneboxes ninja'd
oh cool
oh it's big
Yeah I think the narrower ones do that
10:59 AM
My internet provider blocks hackertyper.com for "crime"
slow clap
@Okx hahaha
Shame there isn't a way to control the size of oneboxes with a suffix, like "s" for small like you can with imgur images on main
goes on to commit some "crime"
Ah, it's this thing. Not interested then.
11:01 AM
So typing the Linux kernel is now a crime
linus torvalds is a criminal mastermind
@Okx micro$oft?
Micro$oft? Providing internet? Please no...
Hey Emigna's here, I wonder if he has a feed of XKCD posts to TNB
The latest XKCD is still onscreen when he appears
@Okx So I guess they also have to block the regular groups.c?
11:07 AM
@LegionMammal978 That's not crime as it doesn't contain "hacker".
But... what...
Is the site of NetHack blocked too?
I'll never be able to understand some ISPs
grab a different roguelike in that case
but nethack is the best roguelike
11:09 AM
hi. is this the right place to ask a question about python & regex pattern?
And you want to parse it with regex? ಠ__ಠ
but cannot get what I need. <\S+Name>(\S+)</\S+Name><\S+Title>
@TuxCopter Although I agree, you might want to explain your disapproval...
11:11 AM
@cempro Why the \S+ before Name and Title
@TuxCopter I created a French verb conjugator that parses html with regex to get the conjugations >_>
same pattern works for the layer <name> tags ecbsservis.csb.gov.tr/arcgis/services/WFS_TEST/YALOVABINA3D/…
because tag may be either <wms:Name> or <Name> depending on service specs.
11:12 AM
@TuxCopter disagreed. Have you played hyperrogue?
@cempro Why is the Title part needed?
because we use two types of services WMS and WFS both suppy an xml
@cempro oh ok
@cempro Use BeautifulSoup or something like that to parse xmls
there is name tag is so common but I need the ones only before Title tag
11:14 AM
@cempro For Name and Title use \S* not \S+ so it will match <Name> etc
@Okx What's your ISP?
@TuxCopter The NSA (jk)
just to clear. here is the xml content <Layer queryable="1"><Name>1</Name><Title>İl Sınırı</Title> and I just need the "1" netween name tags
@cempro Yeah your problem is the \S+ before Name and Title
wait still doesn't work
Although it's lots of fun parsing html with regex, in python you can just use the provided html parser
11:16 AM
You also need \s+ between the closing tag of Name and the opening tag of Title
@trichoplax In this case it's too overkill
@cempro <\S*Name>(\S+)</\S*Name>\s+<\S*Title>
let me give a try
@ASCII-only Is it possible to make a regex that matches balanced brackets?
@Qwerp-Derp Depends what flavor
I doubt it, but you never know
@ASCII-only Python flavour?
Also flavour* (I thought you were Aussie, but the spelling gave it away, imposter!!!111!!eleven!)
@Qwerp-Derp I am Aussie but TNB is mostly US so I use American spelling on TNB
11:22 AM
But American spelling < "normal spelling"...
jingoism kicks in
@Qwerp-Derp .NET flavour matching balanced parentheses: chat.stackexchange.com/transcript/message/36891967#36891967
actually scroll a bit up from that message
grrr... string = '<Name>(.+?)</Name>' pattern works but works for all name tags (which is more than I need) I just need layer name/number. By the way \S<Name>(.+?)<(\/[^</Name>]+)> pattern did not work. Maybe is there a multine issue or smthg?
@Qwerp-Derp ok brb it isn't hard
@cempro wait why did you change it?
@cempro <Layer.*?>\s*<\S*Name>(\d+)
ahh sorry mistyped
@MartinEnder huh? you deleted my comment before it was obsoleted? and yes I had a point...
basically the first 1-byte answer must be accepted nevertheless, since there can't be any shorter answer than that, ever
11:28 AM
Does anyone here have access to Mathmatica?
@EriktheOutgolfer There's some languages that can have half-bytes
(Ie 4-bit MPUs)
@TuxCopter "half bytes" still get padded to 1 I think
If so, what does FileExtension output when inputted .bashrc?
@Qwerp-Derp wait it isn't possible without custom regex engine in Python
So I found a good way to deal with circular import errors in Python.
11:29 AM
@programmer5000 well you can use Mathics on TIO
@feersum Put them in the same file :P
Doesn't Mathematica have a free trial?
If I have foo.py and bar.py that both import each other, then I delete the import from bar.py.
Mathematica has a free online version too IIRC
And in foo, I do import bar; bar.foo = <the current module>.
@programmer5000 Buy an RPi :P
11:31 AM
while ''<Name>(.+?)</Name>' works '<\SName>(\S+)</\SName>\s+<\S*Title>' does not work. interesting... Can it be an encoding or multiline related problem? (title tag is on a new line)
@cempro btw you can format your code using backticks
so that the asterisk won't italicise text
ahh star charç. does not appear here
11:32 AM
@cempro use ` not '
@cempro hmm maybe, try adding \n before \s+?
using python, it needs ' or " for string pattern afaik
@cempro you're using r"pattern here" right?
as in r"<\S*Name>(\S+)</\S*Name>\s+<\S*Title>", not just "<\S*Name>(\S+)</\S*Name>\s+<\S*Title>"
@ASCII-only Is that what mathematica uses?
For some reason, it fails in mathics / TIO
@programmer5000 well wolfram alpha uses a mathematica backend for the majority of its computation so i'd say so (they would probably use a mathematica feature rather than reimplement it)
Ok, tks.
11:38 AM
Q: Output with the same length as the code

Martin EnderIn this challenge, you should write a program or function which takes no input and prints or returns a string with the same number of bytes as the program itself. There are a few rules: You may only output bytes in the printable ASCII range (0x20 to 0x7E, inclusive), or newlines (0x0A or 0x0D)....

@NewMainPosts too late
this challenge has been already won
@EriktheOutgolfer there are other delete reasons for comments, like not constructive. for a start, no I don't need to accept any answer, and even if I did I wouldn't do it 5 minutes after posting the challenge, regardless of whether an optimal solution has been found.
it was a bit unclear whether that was a catalog though...
@programmer5000 BTW if you can spare the money just get an RPi for Mathematica testing :P
@MartinEnder your call, but I'd recommend accepting as soon as you can in such a situation
11:41 AM
because if a valid solution is as optimal as it can be then you don't have to wait for a week or something to determine which solution to accept
so why not put the check right in after the 12m delay? the user will be awarded the 15 rep more quickly and that's also good
@EriktheOutgolfer But there are already optimal solutions in six languages (and like >60 just in Jelly :P)
but it will discourage some users from answering the challenge in other languages
@ASCII-only Nothing seems to work except for this: string = r"<Name>(\S+)</Name>" as soon as I insert a char. at the end nothing is found. e.g. nor r"<Name>(\S+)</Name>\n" neither r"<Name>(\S+)</Name>\s+" works. I think I do something wrong or there is something different for the xml file. Cos similar pattern works for another xml file. Do not want to take your time but I may provide link for these two xml files.
plus, I'm not planning to accept any answer.
11:47 AM
then it's a catalog right?
I think you want to explicitly specify that
@cempro If you're on Windows, try \r\n instead of \n
Scientists have recently discovered that catalogs are in fact exactly identical to regular code golf challenges.
no luck string = r"<\SName>(\S+)</\SName>\r\n\s+<\S*Title>"
@EriktheOutgolfer no I don't. there's no obligation for anyone to accept an answer to any challenge. and I believe that the accepted answer feature is useless on PPCG so I stopped using it.
just to clear. string = u'<\SName>(\S+)</\SName>\s+<\S*Title>' works for this file ecbsservis.csb.gov.tr/arcgis/services/WFS_TEST/YALOVABINA3D/…
11:51 AM
@feersum this. thank you.
but string = u"<\S * Name>(\S+)</\S * Name>\s+<\S * Title>" not for this file tucbs-public-api.csb.gov.tr/…
@MartinEnder oh... well, the accept feature can be used to reward the winner, but you decide anyways
A: Sandbox for Proposed Challenges

NeilMake some arrays A recent post on The Daily WTF concerned the creation of four two-dimensional arrays of height n. Please write a function to create these arrays for me. Here is an example for n=4: [[1] [[1 0 0] [[0] [[0 0 0] [0] [0 1 0] [0] [1 0 0] [0] [0 0 1] [0] [0 1 0] [0]] [0 0 0]...

@cempro weird, works for me, can you post your search code?
I think I cannot search for the next tag which is on the new line. I am on windows. (already tried \r\n)
11:56 AM
@cempro Python 2 or 3?
plugin dev. with Python + PyQGIS + QGIS
maybe I should first try it outside QGIS dev. environment. On IDLE.
@cempro still works for me, weird, you're using re.search with no other options right?
layer = re.search(str(string), word )
@cempro what is in word?
her is the python code
same issue
import urllib2, re

file = urllib2.urlopen("https://tucbs-public-api.csb.gov.tr/trk_hgk_idari_sinir_wms?request=GetCapabilities&service=WMS")
data = file.read()
#string = '<\S*Name>(\S+)</\S*Name>\r\n\s+<\S*Title>'
string = '<Name>(.+?)</Name>'

for word in data.split():
layer = re.search(str(string), word)

if layer is not None:
name = layer.group(1)
print name
result <![CDATA[WMS]]>
I just need 0 1 2 3 4
12:08 PM
@cempro You can format your code by indenting it with four spaces
Or the button "format code" or something
Btw wtf 3rd Turkish person in this room
@cempro oh, your problem is the data.split(), it breaks up lines so there are never any newlines
@betseg is there a problem?
@cempro no, I'm Turkish too
Oh ok sorry. I got it wrong.
Ohh ok and since the 2nd xml is multine I get nothing :)
12:13 PM
@cempro Use re.findall(str(string), data)
userscripts aren't working :c
then how can I access desired pattern for findall action instead of layer.group(1)
slowly but surely creeping towards 1k rep
@cempro it returns an array of string matches of .group(1) (['<![CDATA[WMS]]>', '0', 'default', '1', 'default', '2', 'default', '3', 'default', '4', 'default']), or an array of tuples of matches if there is more than one group (e.g. [('a', 'b', 'c'), ('d', 'e', 'f')])
hmmm :S a python list object then. But the point is I can only identify required values either default or 1 is needed, as long as they are resided in name tags which become before title tag
BTW, @ASCII-only you are so helpful. At least I got what the problem is.
12:25 PM
oh nice you get rep if you propose an edit and it gets accepted?
@cempro huh?
@cempro what exactly do you want to extract from the data

Only need 1
still nothing return with the below string
import urllib2, re

file = urllib2.urlopen("https://tucbs-public-api.csb.gov.tr/trk_hgk_idari_sinir_wms?request=GetCapabilities&service=WMS")
data = file.read()
#string = '<Name>(\S+)</Name>\n<Title>'
string = '<\S*Name>(\S+)</\S*Name>\r\n\s+<\S*Title>'
layer = re.findall(string, data)
print layer
@cempro you need r before the string, and you don't need \r\n
now it works.
['<![CDATA[WMS]]>', '0', 'default', '1', 'default', '2', 'default', '3', 'default', '4', 'default']
but more than what I need :)
@cempro oh btw why do you only need the names? what do you want them for?
@cempro so you don't want the first one and the defaults right?
if so use (\d+) instead of (\S+)
12:32 PM
Cos they are the required map layer names to construct a valid OGC WMS map address to insert into QGIS as a map layer
a proper WMS URL would be
And I only &layers=4 (4 comes from the xml file generated by the map server)
@cempro do you need anything other than the layer names?

 Snowball KoTH Status Updates

Updates for the Snowball KoTH Challenge made by HyperNeutrino....
I have it set up to run through every single pair and now I'm just debugging
no nothing but they could either be style e.g. "world_oceans" or just "1" or a hash "asasdsa2345234"
@cempro use <Layer.*?>\s*<\S*Name>([^<]+) to get layer names, re.findall with that will give a list of only the layer names
12:37 PM
['\n ', '\n ', '\n ', '\n ', '\n ']
@totallyhuman Not yet, but I'd like to create one
@cempro Sorry, <Layer.*?>\s*<\S*?Name>([^<]+)
hey, question for you golfers: what motivates you to write answers on challenges? Like, I understand that golfing is fun, but how do you choose which challenges to answer?
it depends on the free time I have
12:41 PM
do you pick the ones you think you have the best chance at winning? The ones that are the quickest to write?
@NathanMerrill I only answer easy ones, I spend most of my time writing my language not writing with it :P
As I mentioned in my answer to this it largely comes down to whether I'll be spending more time solving the challenge or more time golfing my solution.
@NathanMerrill quickest most of the times
@NathanMerrill Given we're encouraged to treat each challenge as a separate contest per language, best chance at winning is rarely applicable. Nobody else golfs in Braingolf yet, and only a few in C#
occasionally I get motivated to write up a large golf
12:43 PM
yeah sometimes when I'm like "this seems relatively complex, but it seems like it's possible in braingolf" I'll have a go at it
related question, then: If the chat bot were to post old questions every once in a while, would you be just as likely to answer them?
@ASCII-only Thank you so much. You were very helpful.
and if not, why not?
@NathanMerrill yes, the age of the question is largely irrelevant to me, especially given I'm the only one really using my given language
@NathanMerrill quite possibly
12:44 PM
@Mayube Haha same
Some people might be less inclined as there may already be well-golfed answers in their language of choice
but for people like me and ASCII-only, who make our own languages then cry in a corner as we're the only ones using them... yeah
why does an existing answer of the same language make a difference? Because the chances of out-golfing an existing answer is slim (you're more likely to tie it?)
@Mayube I mean Neil has started using Charcoal a lot, others have occasionally used it, but DLosc and I have posted quite a lot of submissions
@NathanMerrill or sometimes it might even be less golfy
so yeah basically it's spending a lot of time for a high chance of a useless result i guess
@ASCII-only haha so far Neil is the only person but me I've seen using Braingolf, and even then he only used it to improve an answer I'd already submitted
@NathanMerrill I probably won't answer in language X if there's already an answer in language X (unless I can outgolf it pretty well, otherwise I will just comment a tip to that submission)
12:47 PM
Neil's a bro to all us self-languagers
@KritixiLithos why
as you said, it will probably be too golfy (with the help from the community)
I do not answer in Carrot often because it isn't TC yet
Can I get a second opinion on whether this Sandbox post would be a dupe?
A: Sandbox for Proposed Challenges

Stephen SCustom Fibonacci code-golf fibonacci sequence number The Fibonacci sequence is a fairly well known thing around here. Heck, it even has its own tag. However, for all that, we sure like to stick to our roots of 1, 1, ... (or is it 0, 1, ...? We may never know...). In this challenge, the rules ar...

@BetaDecay why isn't this non-competing but undeleted?
1:09 PM
A: Sandbox for Proposed Challenges

NeilParse a 4-dimensional array A 2D array is fairly easy to represent in ASCII art, something like this: 1 2 6 24 One approach for a 3D array is to have a number of 2D arrays, with an extra blank line between each array: 1 2 6 24 1 2 4 8 Things get a little more complicated for 4D arrays...

@programmer5000 At the time, non-competing answers were rarely seen. Wasn't really the done thing to do
1:29 PM
Aye. I'd recommend dropping the first paragraph, the one in small font, though.
@JanDvorak done.
Could we get more opinions (either way) on whether this is a dupe? I think it isn't, but want to get more feedback before it leaves the sandbox to avoid finding out too late to modify it.
A: Sandbox for Proposed Challenges

programmer5000code-golf math fibonacci Triple Fibonacci (very similar) Your challenge is to make a function / program that either: Generates the Fibonacci sequence without end. Given n calculates the nth term of the sequence. (Either 1 or zero indexed) (quoting Fibonacci function or sequence) ...

@trichoplax I don't think it is a dupe, go ahead and post.
1:46 PM
I am convinced I should answer every challenge I can with Go
It's kinda fun golfing in a language that's a horrible language to golf in
Or just post full programs in Java
@totallyhuman kinda explains my obsession with Ruby
I thought Ruby was ok
Is it really bad?
the only good thing about ruby is that you can index into integers in it
It's a great language, but it relies on methods a lot, which isn't great for golfing.
1:53 PM
Q: Golf a Lucas Sequence

Stephen SThe Fibonacci sequence is a fairly well known thing around here. Heck, it even has its own tag. However, for all that, we sure like to stick to our roots of 1, 1, ... (or is it 0, 1, ...? We may never know...). In this challenge, the rules are the same, but instead of getting the nth item in the ...

c'mon new main posts you got this
next 3 minutes and i should see a post from it
...wait how'd it insert the message above mine
Q: Can we have a tag for simple questions for beginners?

programmer5000A good way for beginners to get into code golf is easy challenges. Also, a good way to test and try out a new golfing language is easy challenges. We also have alot of them. I think we should have a simple or trivial for that that we can point interested beginners to. It might be nice to have it ...

@programmer5000 It's not my post, but I wanted plenty of feedback before that decision gets made

« first day (2300 days earlier)      last day (1583 days later) »