« first day (2737 days earlier)      last day (2110 days later) » 

12:37 AM
@Zacharý what's so surprising about that? TCL does that too :P
 
Only the literal [1] can get treated as a string.
 
12:53 AM
you're passing it a char array...
wait...
@Zacharý hmm
 
Like I said ... weird.
 
0
Q: Can we assume typed inputs?

OMᗺFor some languages with a static type system the compiler is able to infer the types, however sometimes there's ambiguity (even with input) unless the user gives the type manually: Motivation 1: Haskell Consider the following Haskell example: f xs = do x <-randomRIO (toEnum 0, toEnum 1) --...

 
@Zacharý link
@Zacharý no?
 
No, I completely understand that one. D's string type is actually immutable(char)[]. And char cannot be casted to immutable(char)
 
well actually it isn't
 
12:57 AM
@ASCII-only link then?
 
@Zacharý but a char literal is immutable(char)
@Zacharý sorry it was as a reply to my previous message
 
Ah.
@ASCII-only And there's no dchar literals. That got me a few times when I was writing 'd'd for RAD.
 
@NewMetaPosts pretty sure this is a duplicate
 
@Zacharý :|
 
¨ is now implemented. I have a feeling RAD is going to be on TIO sometime this weekendn.
*weekend
Oh no ... segmentation fault. There are no pointers in my code.
and are done.
 
1:52 AM
@Zacharý how is it possible that there are no pointers in your code
id be very interested to see this
 
@quartata Because D is an awesome language.
 
put on a blindfold and clicked on a file at random
i saw a pointer
id like my $20 back
 
Which one?
 
Segment[]
didnt read past the type. started foaming at the mouth.
screaming
 
@quartata That ain't a pointer in D my friend.
 
1:56 AM
waking up the universe
@Zacharý are you telling me its copied
because if so i think i might have found, you"re performance issue
 
@quartata The pointer would be Segment*. Segment[] is like std::vector<Segment>
 
still wrapped
 
@quartata My performance issue is the O(n^2) parser and tokenizer.
 
unless it doesnt move and actually copies the whole vector
 
@quartata I think it moves.
 
1:58 AM
which sounds like something rust would do
@Zacharý then congregations. you have a pointer
 
@quartata I meant no explicit pointers. No T* anywhere.
 
Oh well
i dont do that
 
@Zacharý please don't scan postfixes then
 
std::shared_ptr<std::weak_ptr<std::shared_ptr<T>>
 
do it like a normal, sane parser
 
2:00 AM
kill all life on earth with this one simple tricj
 
@quartata :|
 
better, than Boehm
 
@ASCII-only Once it's on TIO, that'll be next on the list.
 
@Zacharý ok good :P
 
sometimes i wish i had a haskell compiler.
 
2:05 AM
@quartata brew install ghc or whatever
 
ghc is bigger than 2 GB, the butterflies cant address that far. so instead im just praying that a piece of toast falls from the ceiling with a copy on a hard disk
5
 
@quartata Has a similar event ever occured in the past?
 
...it wasnt a joke?
@Pavel yes. this is how i got a C compiler Basically
pure chance, and yet it might just save us yet
now thats the real joke
 
@quartata Lucky. I had to scavenge my C compiler from the remains of a C++ compiler being torn apart by a vicious javascript interpreter.
 
this is giving me bad memories.
people would tear apart real people. just for a place to stand. some shade.
anyways. if anyone can find me a smaller Haskell compiler, that would be more feasible than my toast idea.
I have to go find water after i ran the shower for 2 days. hopefully I dont get fired
 
2:48 AM
does anyone know how to humanely dissect a Cactus?
im reading this tutorial right now and it says that it might live if you put the top back on?
let me see who wrote it
 
0
Q: Iterate string instead of integer

JekThis is a code golf version of a similar question I asked on stack earlier but thought it'd be a good code-golf question. Have a 10-length string starting from 0000000000 Iterate through till you get to 0000000009 Then start using letters in place to get 36 total iterators 000000000a . ....

 
"United States Army". seems trustworthy?
 
lol
3:05 AM
@NewMainPosts closeflagged.
 
3:27 AM
@quartata They seem very united, I don't think they'd lie to you.
 
I'm not gonna lie, my CellularAutomaton answer is probably the peak of my PPCG career
42, cellular automaton, and built-in abuse, all at the same time
 
@Pavel yeah thats what i figured
 
3:44 AM
@JungHwanMin Would making it shorter than 42 make it less impressive :P
@Mr.Xcoder Looks like that it works.
Yes it works. Pyth = shorthand is more general than Python's. (of course)
 
4:04 AM
@quartata O_o why do you need to dissect a cactus
 
lol
@Downgoat :/ perhaps he has to get water, as the post above implies?
@quartata (this one)
 
yeah, yeah
every bit counts
 
lol
I can't still understand what's going on o_o
 
think im tripping after drinking this cactus water actually
dont do this kids
 
lol
hmm
strange
 
4:10 AM
never mind it was just indigestion from all the fried lychee nuts i ate
 
@quartata oh in that case give it lots of love and eventually the cactus will open its heart and give you its water
 
lol
github pages doesn't want to update itself o_o
 
@Downgoat souds like that takes a while
not sure i have the Time
 
lol
Is this a situation when you cant stick a straw in
 
thats not a bad idea
lets see here
hm. need a metal straw.
oh ok apparently while i spent 3 hours dicking around with cactuses someone actually found another acquifer
 
lol
4:16 AM
Or you can stick a metal pipe-thingy (perhaps a water tap) in
 
sometimes i wonder why the embassy pays me, i dont think they have any idea what i actually do
perhaps its better that way
 
lol
Are we in a philosophical talk
 
we all are in a philosophical talk, every night of our lives
thats just how it works
i don't make the rules
 
lol
meh I'll assume we are
 
OK just saw this on HN and... I'm not sure what's going on with this: theverge.com/2018/7/27/17622846/…
Why was this a condition
Don't get me wrong Spectrum sucks but
Not sure how this came about
 
lol
4:28 AM
idk about this, I'm not american
 
@lol, your username tho' ... lol
 
lol
lol I used this name like a year or so
 
4:57 AM
Who were you in the interim?
 
 
4 hours later…
8:55 AM
posted on July 28, 2018 by flawr

Locate Substring This is not a challenge yet, just a place to write down an idea. Given some finite binary string \$S\$, we can try to find the minimal length \$n \in \mathbb N\$ such that we can uniquely locate each contiguous substring \$ T \$ of \$ S \$ that has length \$ n \$. Example Let \$ S = 01000110 \$. Then surely \$ n > 1\$. But we also immediately see that \$ n > 2\$ b

 
Sandbox for Proposed Challenges: the new pastebin.com?
 
Occasionally the onebox looks like that. No idea why.
 
9:54 AM
0
Q: Is it possible for a challenge to have hidden scoring test-cases?

user202729Assume that the method of generating the hidden test-cases is known. (for example: a list of 5000 uniformly random integers in range [1..1000]) Reasons why hidden test cases should be allowed (that I can think of): Guaranteed to prevent hard-coding (assume that there are sufficiently many poss...

 
 
2 hours later…
11:33 AM
0
Q: Check if number is odd or even

Piotr WasilewiczYou need to check if a given number is even and then print 0, or it is a odd number and then print 1. The Number can have many digits. So a challence is translate this program: #include <iostream> #include <string> using namespace std; int main() { string a; cin >> a; if ( atoi( a.s...

 
 
3 hours later…
2:28 PM
posted on July 28, 2018 by lol

Is my maze even solvable? code-golf maze Input A 2D array of booleans, which will be our maze. A truthy value will be a wall, and a falsy value will be a path. We start at the left upper corner, and end at the right down corner. Those two cells will always be a falsy value. Output A boolean value, which truthy means solvable, and falsy means not solvable. I/O Examples Input | Solu

 
@NewSandboxedPosts you're broken
 
2:39 PM
  File "D:\Dane\JetBrains\PyCharm\SargoniaNew\sargonia\player.py", line 172, in keys
    eval("self."+a[key.lower()]+"(val)")
  File "<string>", line 1
    self.xp=int(val)
           ^
SyntaxError: invalid syntax
how is this invalid syntax
 
lol
Hmm
 
The full method is this:
    def keys(self, d: dict):

        a = {
            "doświadczenie":   "xp=int",
            "złoto":           "gold=int",
            "dostępne punkty": "points=int",
            "hp":              "hp=int",
            "atk":             "atk=int",
            "mp":              "mp=int",
            "sp":              "sp=int",
            "broń":            "weapon=items.Item",
            "zbroja":          "armor=items.Item",
            "zwierzę":         "pet=items.Item",
            "zaklęcia":        "spells=list"
(yeah, totally bad practise, it has to read a human-readable format and be future-proof)
 
Hm...
Ah.
eval is for expression. Use exec.
 
ahh... makes sense. Never used those methods in Python, I avoid them
Works, thanks
 
Still, you should do a = { 'key' : ('field name', int) }, then
self.__dict__[a[key][0]] = a[key][1](val) (if this is more readable...?)
Avoid the exec.
 
2:47 PM
Polish I'm guessing?
 
Yeah, I wasn't thinking much when doing this. Thanks
@Zacharý Yup
 
This is for some kind of game (sorry, I've been asleep, so I don't really know what I've missed), right?
 
@Zacharý exactly
 
Okay then.
 
 
1 hour later…
4:03 PM
oh my god... In the script above, I call a function, it finds a list of pairs with regex, starts a loop and then passes them to a different function. When the program executes line by line in a debugger, it reaches the loop and then suddenly the function stops, like if there was a return inside, but there is only an assignment...
What the frick? It was caused by a call to .rtrim(":") on one of the groups...
oh wait. rtrim is undefined. why the hell there were no exceptions?
 
4:31 PM
IDK.
 
4:49 PM
@Riker I havent forgotten about will smith eating soy beans
just so you know. its in development.
 
5:22 PM
hm, I think I know why NSP et al. are broken, the link format has apparently changed
 
Anonymous
@EriktheOutgolfer I'll look into it
 
I don't think you can do anything about it
it's apparently a change from the SE side
 
Anonymous
I can ask a CM about it
 
it's also problematic with me posting answers lately, I get scrolled to the bottom
 
Anonymous
Actually I guess a post on mother meta would be a better choice
 
5:26 PM
the thing is that the answer's ID is no longer in the proper URL, only as an ID reference (i.e. #<answer_id> ending of the URL, which is probably supposed to auto-scroll to the post, but no /<answer_id> anymore)
 
Anonymous
That's pretty dumb
 
6:42 PM
0
Q: Let's practice the scoring rules of 421!

Arnauld421 is a rather popular dice game in France and some other European countries. It is mostly played in bars and pubs to determine who's going to buy the next round of drinks. The full game is usually played in two rounds, with tokens that each player tries to get rid of, but this is irrelevant her...

 
7:11 PM
@Mego yeah, try to post an answer (whenever you can) and see the address bar...yuck
(it might be obvious if it sends you to the bottom of the pit :P)
 
 
1 hour later…
8:12 PM
RAD is finally ready to be on TIO.
 
8:54 PM
:| apparently antivirus is showing phishing ads XD
 
I don't use an antivirus, I just brick my computer and wipe my system, reinstall the OS often enough that it doesn't matter.
 
9:21 PM
posted on July 28, 2018 by OMᗺ

What associativity was it again Tags: code-golf, balanced-string, parsing, parentheses, parsing, string Non-associative operators (for example the subtraction-operator) often are either left- or right associative, such that one has to write less parentheses. Consider for example the following: $$ a-b-c $$ Probably everybody read that as \$(a-b)-c\$, by default (usually) subtraction i

 
@Pavel if you can reinstall the OS and have it be fine then you didn't brick your computer
 
I'm not going to argue over the definition of brick here
 
10:25 PM
@dzaima, how is your APL clone going?
 
@Zacharý not working on it much. It works, but doesn't have a ton of built-ins
 
10:51 PM
@quartata alrighty ty
@quartata tha'ts a great twitter, take some hints
@flawr that is indeed true
@flawr 9/10 needs an identical but smaller subreddit
also sorry for the late responses i was out of internet
 
11:44 PM
-1
Q: Advanced Board Move count: from Top Left to Bottom Right of a Board, can move to right, down, left and up; Can not revisit any cell

StochastikaSo an extension of the typical basic DP question: A NxN chess board, write code to calculate the number of ways you can go from the the top left to the bottom right corner, given that you can go down, up, left, AND right, and you can not revisit any cell. N <= 100 I couldn't figure the exact...

 

« first day (2737 days earlier)      last day (2110 days later) »