« first day (2173 days earlier)      last day (2663 days later) » 

3:00 AM
I don’t understand floats well enough to say for sure that my answers are valid, and it’s scary.
What if sqrt(100) is 9.9999999999999? If it isn’t, what if that does occur for some enormous perfect square? Rules like Programs only need to work for inputs within the language's standard integer range. are a pain for languages with bignums built in.
 
Depends on the integer type. 32-bit integers? Yes. 64-bit integers? No.
 
@Downgoat I like .size the most
 
oh... that is nice
though I feel it conotates more of byte size rather than length
 
but it's an array
 
3:08 AM
Web Page Blocked

Access to the web page you were trying to visit has been blocked in accordance with company policy. Please contact your system administrator if you believe this is in error.

WHY!????? WHY WOULD YOU DO DIS!????
 
@ConorO'Brien like C's sizeof(array) I mean
 
@Downgoat Length is the most common one. Count indicates elements of a certain kind. Size is usually length times size of the elements.
@Pavel Which web page?
 
The one downgoat just linked
strawpoll.me
Seriously, what's wrong with strawpoll?
 
> this is in error
 
Yes?
 
3:14 AM
That's proper grammar actually.
 
I don't exactly give contact information.
 
You usually just hear that was in error
 
@quartata shouldn't it be "this is an error"
 
Is there an eval statement in Processing? I might need it for calling a function
 
Probably not since it's compiled
maybe use Java 8 lambda
 
O__O I have never heard this grammar until today
 
@Qwerp-Derp You're doing something wrong most likely
 
@quartata How do I make button that calls a function
 
@Lynn oops. I misread the challenge
 
in Processing
 
3:17 AM
@Qwerp-Derp why would you need eval for that
 
@Downgoat Seriously? I have, and English is my third language...
 
I probably have but didn't care enough to notice it
 
That's more likely.
 
Whoah. What languages do you speak?
 
@Downgoat What do you mean
 
3:18 AM
German, Spanish, and English.
 
I can speak 2 and 1/4 languages.
If a dialect counts, then probably 2 1/2
 
This also might explain why you don't get my jokes, ever. Or more likely I'm not funny.
 
I can read Portuguese, but that's where it stops.
 
@Qwerp-Derp <Insert Programming Language/Natural Language Joke>
 
3:20 AM
If it counts, I can reasonably well speak and understand Ukranian.
Due it being basically the same as Russian.
 
GUYSSSS!!!
 
Hello
 
@Zizouz212 What is it
 
omg
 
Oh my goats, what happened
 
3:22 AM
@Pavel Me? I read and watch TV exclusively in English, so you're probably just funny. :P
 
@Zizouz212 Spit it out
Also why is your profile picture a Wobuffett
Wobbufett? Wobbuffet?
Dammit spelling Pokemon makes my brain broke
How to run function once a button is clicked in Processing?
 
He comes here from time to time. Doorknob stealth pinged his eardrums into oblivion once
 
@Dennis you could have fooled me
 
Although this time I think he's gone insane or mute
 
@quartata Stealth ping?
 
3:26 AM
@Zizouz212 gossip tease :P
 
@TrojanByAccident oh, yes, the glorious obnoxious old ish times
 
@TrojanByAccident Relic from a worse time.
 
You don't really want to know. Old bug.
 
It used to be possible to ping people without creating a visible @mention with the usual red background.
It was used to annoy the hell out of people and eventually got fixed.
 
3:27 AM
how?
 
You know how you can make links [like](this)?
 
@Zizouz212 btw I have open source question. A thing I want to use has some gnu lesser license, can I use in my project which I might put price tag on?
 
Maybe he's crashed a plane; I remember him saying he was getting a pilot's license
 
You made the bit in the square bracket empty, and the link a mention
 
3:28 AM
oh
interesting
lol
 
@Pavel no
You can't make the description empty. You need a non blocking space
 
Same principle though.
 
You probably use null bytes or smth
 
@flawr How can one tell if a random person on the internet is in a plane crash?
 
IDK, I was probably on after the stealth-ping thing
When was stealth-pinging a thing?
 
3:29 AM
@ConorO'Brien I probably could have, but I decided not to.
 
Now, the only avenue left to trolls wishing to remain undetected is to star everything.
Or create a bot, I suppose.
But that takes effort, and is really easy to shut down by a mod.
 
Those are hardly undetectable.
 
Yeah, but you can't trace who made the bot back to it's owner
 
@quartata Check if flawr posts a video shortly after supposed incident
 
@Pavel Try me.
 
3:32 AM
@Pavel mods can see IP
 
@Pavel bruh
 
TIL
Good thing I have no clue how to make a chat bot.
I tried earlier today.
Decided I have more important things to do.
Though to be fair I was still trying to make that wolfram|alpha bot.
 
Also stealth pings weren't undetectable. And stars aren't really either
 
How do you detect who made a star
 
@Pavel become a mod
 
3:33 AM
Process of elimination.
 
Making a bot is not forbidden. Just make sure it doesn't do anything you wouldn't want associated with your account and keep it out of TNB.
 
You kick people until it stops.
 
@quartata What if everyone is gone and it keeps going on? :)
 
And if it really comes to that, we can always involve a dev/CM.
 
So, as people are getting kicked, randomly stop for sixty seconds.
 
3:34 AM
@Pavel +1
 
Oh boy. Better kick them all to be sure.
 
Room timeout would be easier IMO
 
1 min ago, by TrojanByAccident
@quartata What if everyone is gone and it keeps going on? :)
 
I think we should make me a mod to test out theory :P
 
It's moot, at this point if it happens the only excuse for it not being me is if I'm not there.
 
3:36 AM
@Downgoat You can star in a timeout
 
o__o
that is not good idea
 
Uhhhh I need halp with buttons in Processing
This is my button class thing
 
Hey @Pavel, how would you like to collaborate on some code? ;)
 
import java.util.ArrayList;

class CentreText {
  float[] coords;
  String text;
  float font_size;

  float text_width;

  CentreText(String txt, int size, float x, float y) {
    coords = new float[] {x, y};
    text = txt;
    font_size = size;

    textSize(font_size);
    text_width = textWidth(text);
  }

  void changeFontSize(float size) {
    font_size = size;
    textSize(font_size);
    text_width = textWidth(text);
  }

  void displayText() {
    fill(#000000);
    text(text, coords[0] - (text_width / 2), coords[1] + (font_size / 3));
How to do clicked()?
 
@TrojanByAccident depends on what you're making.
 
3:37 AM
So I want to wire a button to a function once it's clicked
How do I do that without using eval?
Halp
 
@Qwerp-Derp Have Button be a class and have instances of button really be subclasses
 
this is TNB not stackoverflow
 
@Qwerp-Derp press f12, click 'console', type clicked(), hit Enter
 
You pass in a function.
 
@Pavel :)
 
3:38 AM
@Qwerp-Derp or take in a Callable or Predicate
 
Or an anonymous class if Processing doesn't do that.
 
@Downgoat Subclasses what
Eval seems really simple
But really dangerous
 
class Button { ... }
class MyButton extends Button {
    void didClick() { ... }
}
 
goatButton extends button
 
@Downgoat Why would I need subclasses
 
3:39 AM
@Qwerp-Derp okay, then use Callable
 
What's Callable
 
TIL: Don't attempt to code a fork bomb and move it while doing anything mildly important
 
So let's say I have a function print which is like so:
void print() {
    println("Hello");
}
And I have a button which has an extra argument print()
 
@TrojanByAccident like:
 
How do I make it so that when I press the button print() gets called
 
3:40 AM
@Qwerp-Derp new Button(..., new Runnable() { public void run() { print(); } });
 
@Downgoat ?
 
That's what it looks like in java.
 
Do I need to import anything?
 
    public Button(Callable<Void> func) {
        this.func = func;
    }

and then to call:

     func.call();
 
@Qwerp-Derp antigravity
 
3:41 AM
I think he pinged you by accident
 
@TrojanByAccident Stop pls
 
But I will literally eat my own hat if you can't just pass in print directly in processing
 
Hats died tho
 
Not real hats.
 
Do we need to make a PPCG Overflow chat room?
 
3:42 AM
@quartata What you mean
 
@El'endiaStarman Probably
 
@El'endiaStarman Probably yes
 
Though I dunno if it will be used very often
and it'll have problems Nth monitor had
 
Cause the SO community is really salty and won't answer questions
 
^ yeah, I am scared to ask stuff on SO
 
3:43 AM
I went on the PHP chat room once and everyone was salty
 
@Qwerp-Derp What language are you most familiar with
 
You guys are all friendly
 
@Pavel most of the time :P
 
This place is great
 
They were like "Go up a tutorial idiot"
 
3:43 AM
@Downgoat We can just unfreeze it whenever needed.
 
@quartata Python
 
@Pavel Awww thanks. :)
 
@El'endiaStarman but what about the latter point
 
@Pavel Thanks!
 
@Downgoat I thought the Nth Monitor was for general chatter.
 
3:44 AM
Lesson 1 of SE: Don't go into SO chatrooms. It's really bad.
 
@El'endiaStarman Yeah but it turned out to be a disaster
 
You could post a question on SO.
 
2 days ago, by Downgoat
At a distance yeah, in theory it seems great, but in the smaller aspects, they are problem
See surrounding conversation
 
That is literally SO's purpose for existing.
 
@Downgoat Okay, but I'm saying make a room specifically for SO-esque help from other PPCGers.
 
3:45 AM
@Pavel But SO won't answer questions like "I don't know how to do this"
Not anymore
 
def print_thing():
  print("...")
foo = print_thing
foo()
 
Also Processing is weird and vague, it'll probably be overlooked
 
@El'endiaStarman I think it'll have same problem, I don't want this place to turn into a place where anything coding will be like "OH MY GOD YOU DUMMY POST IT IN PPCG Overflow CHAT!"
 
@quartata OK... what does that demonstrate
 
Like I understand it for ongoing coding help discussions, but I feel it'll only increase strictness
 
3:46 AM
These are first class functions -- that is functions are values
 
Mmhmm
 
@TrojanByAccident you never did say what you wanted to work on.
 
You can put them in variables
 
3:47 AM
So can I do something similar in Java/Processing?
 
wut
 
@Downgoat We have little discussions on other topics all the time, and it's not an issue. It's just nice to have a place to go when a discussion is going on for a while.
 
Basically all languages can do this.
 
So I save the function to a variable, and then execute it?
 
3:47 AM
And it doesn't clutter or get cluttered by other discussions.
 
Oh, I thought you meant Python v4 was released
 
Yes.
A field in your case
 
I'm concerned that people won't really hang out in Overflow as much, so less people will see if you post there.
 
@quartata Can I just take an argument like this? Button test = new Button(10, 10, 300, 200, "Hello, World!", test());
 
No parens. You aren't calling it.
I don't know processing so I don't know what the type is.
 
3:51 AM
@quartata Hmm?
 
I think I should use WebSockets for TIO.
 
processing is a java add-on kind of
 
How you denote the type of functions
 
@Dennis for what?
 
@quartata What do you mean
 
3:52 AM
the type
 
@quartata have you since figured out how you ignited your sandwich?
 
So int, void and float?
That sort of type?
 
@Dennis :O does this mean you'll use node?
 
As in when you put the function in a variable how o you specify the type of that variable
 
@Downgoat What? No!
 
3:53 AM
:(
but node is only language with good websocket support
 
@quartata Do I have to do int test?
Or does it just have to be test
 
What do you need websockets for? Everything already works fine.
 
@Downgoat That's not true at all
 
I'm curious what you're trying to do.
 
@Pavel Frontend-backend communication. It would remove quite a bit of lag for slow connections (such as my own), and it would allow me to implement a few goodies. For example, the client could send a hash of the data first, so it wouldn't have to send the entire data if the result is already cached.
 
3:54 AM
@quartata here we go again...
But let's be honest, node is most popular choice for WS for a reason
 
If Python doesn't have a websocket library, websocket must not be worth using.
 
That relies on the hash being shorter than the result. Most of the time, the output is just one or two numbers, right?
 
@quartata?
 
@Pavel It wouldn't have to send the code and input if the result is already cached.
 
@feersum pypi.python.org/pypi/websocket-client/0.4 what do you mean it doesn't have a websocket library?
 
3:56 AM
That was sarcasm.
 
@Pavel I never said that.
 
Why does everything always go to python...
 
Logically, my statement means Python has a websocket librayr OR websockets are not worth using.
 
@Downgoat Because Python is the best language. Search your feelings, you know it to be true.
 
Hahahaha
 
3:57 AM
@Downgoat I have to admit there's a certain appeal to use the same language for the front- and backend, but I'd rather use a language I like for at least one of them.
 
@Pavel you must have missed the "If" at the beginning
 
@Dennis you know you can transpile python to node
 
I did.
 
@TrojanByAccident orteil.dashnet.org/cookieclicker its for this
 
@Downgoat I can run both on the server, so what's the point?
 
4:00 AM
Well, if it's open source, writing it in node would allow Downgoat to help contribute to TIO. On the other hand, writing it in Python would allow everyone else to contribute to TIO.
 
@El'endiaStarman if by "best" you mean "makes Conor want to cringe", then yeah, it is >_>
 
The only language more glorious than python is Java
 
@Pavel One more reason not to transpile my beautiful Python code to JS then. That said, the backend currently uses Bash.
 
I dunno, AFAIK python doesn't handle async tasks super-well (not saying it can't). Node on the other hand was designed around asynchronous execution (it's primarily design goal is cenetred around websockets)
please don't kill me
@Dennis :''''(
 
JS person: sees JS hate Hey, how's perl doing?
 
4:03 AM
"I don't understand this Perl script." and "I didn't write this Perl script." is the same sentence.
 
Haha
Though I think former is really same sentence is "I didn't write this Perl script in last 5 minutes"
 
@Pavel Well, I've got a few things I'm working on. PigeonScript interpreter, Slashes interpreter, malicious code, take your pick. We could also work on something else, if you like
 
If you can't read what someone else wrote, you just don't the language well enough. This is true for all languages.
 
@Pavel "I don't understand this Perl script." and "I wrote this Perl script." are also the same sentence
 
It's actually getting late for me and I still have some homework to do, but tomorrow I'll see if I can.
 
4:05 AM
@AshwinGupta oh
@Pavel It's 11:06 e.e
not even that late
 
And by "I still have some homework to do" I mean "I literally just remembered a massive project due tomorrow"
 
@Dennis not true, all cheddar program are readable no matter how stupid programmar was
 
@Pavel I have 6 overdue assignments
 
@Pavel it's okay PPCG is more important than academic success
6
 
@Downgoat ... said the Cheddar author, which just proves my point. On a related note, what does this do?
a->b->(g->g((a-b+1)|>a)/g(1|>b))(n->n.map(Math.fib).reduce((*)))
 
4:08 AM
I think I can figure this one out. It's java, right?
 
It's Cheddar.
 
@Dennis this is old chdddar program, doesn't count
 
@Dennis you could golf that more
 
PigeonScript programs only become readable when you insert a bunch of arbitrary whitespace and line breaks
 
its like 8:00 where I am
 
4:09 AM
But use => instead of map(...) and / instead of reduce(...)
 
@Dennis THANK YOU I FIRMLY BELIEVE THIS
people over at software design.SE are like "programs should be universally readable", or something
 
So... don't use Perl?
 
@Downgoat It still works, so why exactly would that not count?
 
@Dennis Try this maybe: a->b->g=n->n=>Math.fib/(*)->g((a-b+1)|>a)/g(1|>b)
It's not quite released yet but it's big changes
wait wrong commit
 
4:13 AM
Stop making it more readable. It's supposed to be readable no matter how stupid programmar [sic] was.
 
... I golfed it more
but if you go step my step I don't see how it's not readable
 
And that's exactly what Perl programmers would say about Perl code. I for once have no idea what that Cheddar code does, which is probably because I don't know Cheddar.
 
Well what part do you not understand?
 
(g->g((a-b+1)|>a)/g(1|>b))
 
@Maltysen ah, okay. it was a good run though
 
4:18 AM
I'm not really trying to. I'm just proving my point.
 
Created lambda taking argument g. It calls argument g with (a-b+1)|>a and divides by 1|>b
 
@Downgoat oh so |> is func composition on cheddar? cool
 
And what exactly is |>?
 
no it is range
 
4:19 AM
always thought that was a cool feature of julia
oh
 
It was @ConorO'Brien idea :P
 
omg why?
 
@EᴀsᴛᴇʀʟʏIʀᴋ because .. caused parsing bugs
 
I am gonna change it to .. when I rewrite parser
 
4:19 AM
ah
|> is func composition op
 
@Dennis is it really that bad? :/ I thought it was pretty good
 
shit I could change then
 
@EᴀsᴛᴇʀʟʏIʀᴋ I've never seen that syntax
 
@Qwerp-Derp I have never used processing
 
@ConorO'Brien example:
*(2,3)|>println
6\n
 
4:20 AM
google processing higher order functions or similar
 
@ConorO'Brien The problem is that other languages use it differently. It's either function composition or function application in other languages.
 
\n is literal newline
 
I'm trying to decide whether the string "HW" can be achieved via a0~a8~+ or if it should be a0~8~+
 
@Dennis applcation vs composition?
 
disregard me, the second code wouldn't work
 
4:21 AM
A composition would take two functions. Julia's |> applies a function to the preceding argument.
 
@Dennis So it's apparently a heinous crime to go against the past. gotcha
 
btw @ConorO'Brien functional docs help? :3 :3 :3 :3 :3 :3 :3 :3
 
@Downgoat idk. my head's been acting funny these past few days
 
D:
Thanks travis for showing me all 10,000 lines of stack overflow
 
@ConorO'Brien It's just that nobody who looks at the code would even consider the possibility of |> meaning range. That's not a crime, but if Downgoat's ultimate goal is really readability, the universally understood .. would be a much better idea.
 
4:23 AM
To hell with readability
 
You can have either innovative syntax or easily understood syntax. Not both.
 
@Downgat You think .. is hard to parse? We have to parse .. as range and . as array access. Thankfully .. only appears in interval notation but every once in a while we break something and [0..4] gets parsed as a list with two dot operators
 
whatever
I can't think straight
night
 
@quartata well that's easier
you haven't written absolute shit parser
 
Aren't you using grammars?
 
4:25 AM
I mucked the grammar parser together in around 3-4 days
 
Oh OK.
 
When I say grammar I don't mean like full CFG
 
CNF?
 
I mean like you have optionals but creating a non-terminal is incrediably slow
 
@quartata that would be literally impossible at the current state in my parser, as it only checks the current point in the code
 
4:25 AM
so most of the stuff is manually parsed
I should probably do a tokenizer and parser seperately
 
Oh. Ew.
 
Yeah, our most common (Pytek) syntax error is something like [0..4] screwing up the parser somehow.
 
you should do like swift 0...5 is [0, 5]` and 0..<5 is [0, 5)
 
Well, what else is .. used for?
 
shudders
 
4:27 AM
I think that'd potentially be worse.
 
I hate Swift's range operators.
 
You all should make your grammars cool like C++ where >> can be 1 or 2 tokens depending on what has been previously parsed.
 
D:
what is wrong with them?
They are really clear
 
Way too visually dense.
Even if stopping to think about them makes perfect sense I shouldn't have to stop and look at three characters. For [0..5) the start and the end tell me what I need immediately
 
The one bad thing about that is it will work poorly with existing text ediotrs.
 
4:30 AM
I... hadn't thought about that. Can you override vim's matching brackets behavior?
 
@quartata I have, actually, and I'm still like "screw it, the syntax is useful". :P
 
A good attitude
 
From my ~40 minutes of vim plugin experience I don't think so unless you like attempt to completely reimplement indenting and brace highlighting
 
Notepad++ let's you do that. You can define custom bracket pairs with arbitrary characters.
 
I think the best text editor to use for Pytek will be one written specifically to handle its unorthodox grammar.
 
4:33 AM
Like backslashes really
@Pavel Oh yeah. I think El'endia made something for it
 
One that makes the backslashes invisible so they are not a blight upon the page?
 
@quartata does [1..5] return like a generator for [1,2,3,4,5] or does it return range object?
When I say range object, I mean can I iterate through [1, 1.1, 1.2, ...] with [1..2] somehow for example
 
I don't think we've fully figured that out yet.
I definitely plan on supporting both step and chunk arguments within range syntax.
 
Please figure out soon, I need to know what I should do for cheddar :P
 
Why would you want to have to specify the step separately?
 
4:36 AM
0
Q: Solve an Ice Maze

Wheat WizardIce mazes have been one of my favorite staples of Pokémon games since their debut in Pokémon Gold and Silver. Your task will be to make a program that solves these types of problems. Ice mazes primarily consist of, as the name suggests, ice. Once the player moves in a direction on ice they wil...

 
Are you just intentionally going to make it the opposite of what they do?
 
@quartata You can with :set matchpairs
 
@feersum How do you mean?
 
@El'endiaStarman In reply to that
 
@WheatWizard That doesn't fix indenting problem thoguh :(
 
4:41 AM
You don't need to indent these
Oh you mean it auto indents?
Mine does not do that
 

« first day (2173 days earlier)      last day (2663 days later) »