« first day (1935 days earlier)      last day (2893 days later) » 

1:00 AM
either I suppose.
 
PID then
 
ok hold up googling
 
A proportional–integral–derivative controller (PID controller) is a control loop feedback mechanism (controller) commonly used in industrial control systems. A PID controller continuously calculates an error value as the difference between a desired setpoint and a measured process variable. The controller attempts to minimize the error over time by adjustment of a control variable, such as the position of a control valve, a damper, or the power supplied to a heating element, to a new value determined by a weighted sum: where , , and , all non-negative, denote the coefficients for the proportional...
 
ty whoever voted.
 
1:00 AM
sh*t
 
when u google PID...
 
o_O @CᴏɴᴏʀO'Bʀɪᴇɴ are you shedding?
 
I TOLD YOU NOT TO LOOK AT ME WHEN I SHED
 
1:01 AM
@AshwinGupta vex people use it all the time
its actually simpleish
 
ah one thing
I don't know calculus.
 
@AshwinGupta doesn't matter
that's for the theory behind it
 
Integrals?
ok
 
implementations is basic arithmetic
 
Poor goats :|
 
1:02 AM
how exactly does this work Malt?
 
@AshwinGupta so basically, you have some quantity that you want to set to a value
 
RIP Vihan's ego.
 
@AshwinGupta but you can't control the quantity, you can only set some other quantity and measure the original quantity
 
@HelkaHomba some goat hater (probably Marky) voted for non-goats like 100 times though
 
1:03 AM
@Maltysen Wha?
 
@Maltysen ok wait, maybe this would be easier w/ a real world example.
 
@HelkaHomba like, take velocity
 
what kind of thing are we talking here
 
you can't set that
you can only set motor voltage
 
right
 
1:03 AM
but you can measure speed with an encoder
 
ok ^
then what?
 
so lets say you have some error in your quantity, lets call it e
 
I know lots of calculus and I'm not sure what Malty is getting at :s
 
mkay.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ do you know Es6 destructuring?
 
1:05 AM
sorta
 
@AshwinGupta we can calculate e(t) as the target minus value at t
 
@Maltysen Range of error?
 
@quartata one more question -- given a list of numbers a ... a b ... b c ... c ..., how can I transform numbers representing the length of the runs of numbers? E.g. 1 1 1 2 3 4 4 4 4 => 3 1 1 3
 
@AshwinGupta huh?
 
wait let me think about that.
no I'm lost.
 
1:06 AM
@AshwinGupta this part isn't complicated or anything. if you want to get to 50 and you have 40, your error is 10
 
ok right.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ so if I have a function which gets an object, can I filter that object so only specified keys are kept?
 
nvm I get it.
thats what I was asking, is this basically range of error?
 
@AshwinGupta so now the goal is to minimize e(t)
@AshwinGupta what is that?
 
nvm nvm it is, forget it.
@Maltysen of course, so then what?
 
1:08 AM
so the PID algorithm is a three part(P, I, and D) way to try and calculate the input to the system so you minimize the error
each part addresses a different concern
we'll write the input as u(t)
 
alright, btw I do all this in RobotC?
I suppose thats the only way eh?
 
@Downgoat this:
 
@AshwinGupta idk. I have a working python demonstration of it(without actual robots) that's kinda cool
 
How can I restrict a program to a certain directory so that it can't modify files outside of that directory?
 
let o = {a:1,b:2,c:3};
let k = ["b","c"];
let a = {};
for(let prop in o){
  if(k.includes(prop)){
    a[prop] = o[prop];
  }
}
< 3
> a
< Object { b: 2, c: 3 }
 
1:09 AM
ew, for in loops, yuck
 
@AshwinGupta i'll show it to you after I explain it
 
@Maltysen yeah well reason I ask is because I Don't like RobotC.
@Maltysen ok ty
 
@AshwinGupta so now the simplest way to correlate you error and input is just proportionally
 
@Downgoat you could convert to an array of pairs, then filter, then reconvert
 
Oh sh*t, something suddenly just dawned on me.
 
1:10 AM
thats a yucky way to do it too
 
Last year, during NBN, I could've used this for my flywheels.
 
What did you have in mind? >_>
 
@AshwinGupta yup
 
When the battery decreased, so did the speed, if I did this I could keep the speed consistant.
 
its used everywhere
 
1:11 AM
yeah ok this is becoming more and more interesting.
 
constructor(Value, {Writeable = true} = opts) {
    Object.assign(this, opts);
}
@CᴏɴᴏʀO'Bʀɪᴇɴ ^
 
@AshwinGupta so do you understand what I mean by the proportional control?
you just set u(t+1)=Kp*e(t) (if we're being discrete here)
 
I've never seen the {Writeable = true} = opts syntax before.
And I really need to look into Object.assign
 
yeah I think.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ it is not syntax, but it is my desired syntax (at least the =opts) part
 
1:12 AM
@Downgoat tell me more?
oh
is that an object literal?
 
@AshwinGupta if your error is big, your input is big, if your error is almost 0, you don't have to do much, if your error is negative cuz you overshot, your input is also negative
 
oh yeah ok that makes sense.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ what is?
 
the {Writeable = true} is destructring the passed object
 
1:14 AM
@AshwinGupta ok so lemme share my thing with you, with only the P part, run it and you'll see the pros and cons of just the P part
 
alright thanks
github?
 
Fish!
Crap, am I late?
 
should Cheddar have an Object.defineProperty equivalent?
@Geobits justa little
you missed the goat bashing
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Apache is a damn cool helicopter. They can do all kind of crazy shit with it. It can be used as an offensive and defensive tool. They can attatch missile launchers and miniguns. Also, it has configurations with sensors and things for unmanned control of other aircraft.
 
@Downgoat Well we can always start that up again. Lemme call Marky.
 
1:15 AM
@AshwinGupta true!
 
I think this one has a jammer on the front.
 
@Geobits ........ ಠ_ಠ ...............
 
keep = (x, k) => Object.assign.apply({},[{}].concat(Object.keys(x).filter(t => k.includes(t)).map(t => {let obj = {}; obj[t] = x[t]; return obj; })))
 
or radar or something. Not the usual nose cone.
 
1:16 AM
@Downgoat
 
@Maltysen ty, I'll look through here.
 
@AshwinGupta the scenario for that one is that you have a robot moving straight, but it gets random noise right and left
@AshwinGupta just run it first
so it tries to correct
the first robot does nothing
 
@Maltysen yeah I gotta find an online python compiler, I've got python 3.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ oh gosh, such object assign ._.
 
@AshwinGupta it uses matplotlib
 
1:17 AM
IT WORKS AND IT DOESN'T USE FOR..IN OR PSEUDO-OBJECTS AS ARRAY!!!!!11!!1!111!11142!!21alfalfa@!@#4
 
idk if you can do it online
 
ok, I'm trying tutorialspoint compiler
nvm Ill use ur thing
 
@AshwinGupta It looks like the sensor/imaging module on that one.
I didn't work much at all on helos, but that's what it looks like to me.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ yay?"
 
does it work for your purposes? :3
 
1:19 AM
it will work for my porpoises
 
good, they can do ES6 too
 
but not for my dolphins (they are very reluctant to install babel)
 
um
this is really stupid
but how do I download this...
 
@AshwinGupta copy paste?
 
no not ur code, this library I need...
 
1:20 AM
Hit the download button that looks like an ad. That usually works if it's hosted on some terrible site.
 
@quartata I found the answer, it's +/"1@=
 
@AshwinGupta ohhh that
 
can I run it without the lib?
 
you on windows, rite?
 
@Geobits If minibits doesn't act like this when he's older, I will be disappointed. >_>
 
1:21 AM
yeah
HOLY SH*T
6:21
brb
 
@AshwinGupta then go that link, go to matplotlib and get ur version
 
paper due in 9 min
brb
 
@CᴏɴᴏʀO'Bʀɪᴇɴ He pretty much acts like this now, or at least depending on audience. He's still nine, though, so in most situations he can't get away with it.
 
@Geobits You are a good instructor. :D
 
Correct.
He's been working on puns lately. It's coming along nicely.
 
1:23 AM
:D puns are a good thing to know
 
@Maltysen ok sorry back! Submited, that was close.
 
encode =: */@(p:@i.@#^])
decode =: +/"1@=@q:
 
Ima try downloading that now.
 
@AshwinGupta if you want something interesting ^^
 
what is that?
 
so line noise then
 
@CᴏɴᴏʀO'Bʀɪᴇɴ thats a blank white webpage.
 
@AshwinGupta copy+paste
 
1:25 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ what does thsi do?
 
@AshwinGupta works python3 btw
 
@Maltysen oh ok
 
@Downgoat maps Z^N to Z and back
 
@Maltysen do I want cp27 or cp34?
 
@AshwinGupta 34 if you have python3
 
1:26 AM
oh duh.
 
anyone have experience with heroku?
 
mkay where do I put this?
 
@AshwinGupta put what?
the installer? run it
 
the .whl file I downloaded.
its not an exe?
 
with pip
 
1:28 AM
@Maltysen assume I'm an idiot. 90% Of the time I am.
@Maltysen with pip. K what do I type?
 
@AshwinGupta also, I made two errors in my script: forgot the parens after SImpleLoop at the bottom, and change the set_color_cycle from 'b' to 'brg'
 
@Maltysen will fix that.
 
@AshwinGupta pip instaall adasdh.whl
 
its not a valid wheel filename?
 
@AshwinGupta (you know that adasdh was a random name i made up, right?)
just checking
 
1:31 AM
yeah Ik, I'm using the actual file path.
 
ok it has another error
is not a supported wheel on this platform.
I wonder if the 32 bit version will work (even tho I got a 64 bit machine)
ok 32 bit attempted install.
now it says could not find a version that satisfies the requirements...
maybe I need to update python
oh..
opposite problem, I have 3.5, this is 3.4
ok this just isnt working...
 
I can use my calculator on an exam. Can I install J on my calculator? :p
@quartata Why does this work? 180*-&2 yields 180 * (n - 2).
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Still easier than this :D
 
@mınxomaτ what
that's incredible
 
1:48 AM
Aaaaaaaaggggh Ruby has destroyed my Pythoning
 
*-&2 is parsed as a hook
 
@HelkaHomba On the other hand, if charging is free, you're probably gonna do it more often.
 
@Downgoat what are you trying to do
 
@AshwinGupta srry, my router died
 
and a 2-hook is just a f g b
 
1:48 AM
i'm back
 
i.e f is * and g is -&2
 
> uARM is certainly no speed demon. It takes about 2 hours to boot to bash prompt ("init=/bin/bash" kernel command line). Then 4 more hours to boot up the entire Ubuntu ("exec init" and then login). Starting X takes a lot longer. The effective emulated CPU speed is about 6.5KHz,
 
@AshwinGupta forget the script, lemme just explain it to you
 
@mınxomaτ still impressive
@quartata but why is the constant parsed okay without a bond?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ You're calling the hook with the constant I thought
 
1:50 AM
@HelkaHomba I'm the only one who voted for hedgehog. ;_;
 
@quartata but shouldn't that syntax error? no right args?
 
It's a monadic hook
 
oh
is that what that means?
I thought it just meant a hook called monadically
 
wait what does this output
 
(180*-&2) n => 180 * (n - 2)
 
1:51 AM
Oh whoa uhhh
give me a second
 
@Quill make a cheddar online interpreter
im trying to do some websocket shit which runs the code but I want to seperate the backend and frontend
 
	def __gt__(self, other):            # this is why I hate python.
		return self.value > other

	def __lt__(self, other):
		return self.value < other

	def __eq__(self, other):
		return self.value == other

	def __ne__(self, other):
		return not(self == other)

	def __ge__(self, other):
		return not(self < other)

	def __le__(self, other):
		return not(self > other)
 
I'd be cool if that wasn't mandatory--is it?
 
^
 
@CᴏɴᴏʀO'Bʀɪᴇɴ OK I think I know what's happening. What happens if you assign that to a definition
 
1:58 AM
@quartata same thing
   ip =: 180*-&2
   ip 5
540
 
Nevermind then
 
@Cyoce Python shouldn't assume that's how you want to implement those functions.
 
@El'endiaStarman It shouldn't assume that's what I want to do, but this is a pretty common pattern that Python should have a built-in way to shorten.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ What happens when you put parens around the *-?
 
2:01 AM
syntax error
 
I mean, come on. Python should at least be able to figure out that if I haven't defined x >= y I want it to be x > y or x == y
 
@Cyoce What if you have an object that doesn't have a well-defined >?
Like, say, complex numbers?
 
I think he implies there is a defined > and =
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Yes. It should check if I've defined > and ==
 
2:04 AM
@Cyoce you are doing it wrong just subclass int and override __int__
 
Maybe you have an object for which > is well-defined but == isn't.
 
@El'endiaStarman then it would error because both > and == are not defined.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ And when you put larens around just the -&2
 
What if you want >= to do something entirely different?
 
2:05 AM
same functionality
 
@El'endiaStarman Reminds me of how in Java, using > with two Integers compares them but == tests for reference equality.
 
Then there is some behavior of * that I don't know about one second
 
* is sign when monadic
 
I officially don't know ask Zgarb
 
@Zgarb, Resident J master. Why does (180*-&2) equivalent to 180 * (n - 2)? Both quartata and I are stumped.
 
2:08 AM
@quartata my coding teacher won't approve. thanks
 
@Cyoce what coding teacher makes you use python
does he not like braces? >_>
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Mine does.
 
@Cyoce it's objectively the right way to do it
 
@Cyoce brb downvoting all his python answers. see if he says anything the next day >_>
 
course in perl you would just use tie
 
2:10 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ Yeeeees now I will further outrep him!
 
@Cyoce he has more rep than you
 
@CᴏɴᴏʀO'Bʀɪᴇɴ PPCG rep is the only rep that matters.
 
oh
does he have a ppcg account?
 
downvoting everything you've ever done one second
 
2:12 AM
That question got me over 6k. :P
And I'm lagging well behind quartata now... :P
 
only a mortarboard away
 
0
Q: Shortest Pangrammatic Window

Reecer6A pangram is a sentence or excerpt which contains all twenty-six letters of the alphabet, as is demonstrated in this code golf challenge. However, a pangrammatic window is a pangram in the form of some segment of text, which may end or begin halfway through a word, found somewhere within a larger...

 
@Downgoat you can use socket.io
 
Crap, I need to get some more rep.
 
@NewMainPosts I NEED TO FGITW
waiut
is dup methinks
nvm
I need to undownvote something >_>
can't
oh well
 
2:21 AM
@Quill but what does that have to do with seperating frontend/backend ._.
 
ohai thanks for the upvote
 
@Downgoat well you have a socket provider on the backend and you can just hook into that for the front end
 
Happy 10k @CᴏɴᴏʀO'Bʀɪᴇɴ
3
 
@Quill that's what I was thinking... though I've never developed a node ws server, (or any node server), so I', probably going to have gigantic security holes >_>
how do I prevent WS DoSes?
 
2:27 AM
with that, I need to seriously study for a geo final. BAI GUYS
 
@Downgoat you'll be right if it's hosted on heroku
 
@Reecer6 Welcome to PPCG! Relevant to your profile:
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Geography? Geology? Geolibertarianism?
 
woah, i've been personally welcomed. i feel honored.
 
@HelkaHomba Definitely geolibertarianism
@Reecer6 ello
 
2:33 AM
Hello @Reecer6, welcome to PPCG. Stay as long as you like you won't be leaving for a while anyway!
 
clearly referring to george class, the study of the great men named george of history.
 
@Reecer6 nice first challenge btw
 
@Downgoat to stop most of it, check a few things: the incoming requests are from your domain name or localhost, and check the HTTP packets have headers, and check they're not trying to access the IP directly
 
thanks.
 
@Quill yeah, I was plannign on doing that along with checking cookies
 
2:33 AM
wasn't sure if it was just going to be "this old challenge what you index through a string"
 
Cookies probably won't do too much, just reject or better yet redirect malicious content
Also check the user agents, there's a whole list of scrapers, crawlers out there you can block
 
@mınxomaτ chat-mini-quantum-challenge: find a controlled-T gate.
Because I can't.
 
@PhiNotPi doing the IBM thing?
 
@PhiNotPi Mini and quantum? That sure is tiny.
Mini-challenge: In exactly 15 bytes, print the longest ordered list of positive integers possible. Space, comma, or newline separated. e.g. python 2 print '1 2 3 4' has a score of 4
 
@HelkaHomba I got python/pyth to error in 5 bytes
as too large of an array
:/
@HelkaHomba V^CGCGp+Nd
10 bytes
can't even calculate the length of the string
theoretically prints `range(156490583352162063278528710879425690470022892627113539022649722^156490583352162063278528710879425690470022892627113539022649722
)`
 
2:46 AM
@Maltysen Oh? Let's say it should run fully (assuming the console buffer doesn't overflow)
 
@HelkaHomba Geocaching, duh
 
@Maltysen Now I remember why these types of problems aren't the best :p
 
@HelkaHomba jd^FmCGCG 9 bytes
156490583352162063278528710879425690470022892627113539022649722 ^^ 156490583352162063278528710879425690470022892627113539022649722
 
> exactly 15
but it's ok
 
it would be even bigger
 
2:48 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ Not @Geoblitzing?
 
@HelkaHomba Some of that, probably. Ask @ Geobits.
 
@Maltysen What if I had said 4 bytes?
 
@HelkaHomba jdu^CGGCG this is corrected actually does tetration still 9 bytes
@HelkaHomba hmmm
jdUT is obvious
gets 10
jdUG is better
gets 26
 
or 3 even
 
@HelkaHomba #i.!!!!!!!!!!!!9's a good start.
 
2:53 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ bah that's nothing
@HelkaHomba 3 is very hard
 
@HelkaHomba i.!9 => 362880
and for 3 I have 9 :|
 
@CᴏɴᴏʀO'Bʀɪᴇɴ but is that space sperated?
 
bah J
 
:3
i.(!^:(!!!9))9x does even better for 15 bytes
factorial repeated ((9!)!)! over 9
calculating that rn brb
 
2:57 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ if you can calculate it, its not good enough :P
 
*approximate :p
so, 10^2403 factorials
wait
10^1859932 factorials
I don't even know how to approximate that
 

« first day (1935 days earlier)      last day (2893 days later) »