« first day (1920 days earlier)      last day (2916 days later) » 

10:00 PM
I think you would have to approach it by defining a list of constant-time / known-complexity actions, and defining everything else in terms of it.
 
oh absolutely
this syntax is simply a hint
 
Hmm... what's a good constant in computing... something that cycles regularly while processing...
maybe CPU cycles?
 
O(list1:Size^2 + list2:Size)
 
:P
 
@NathanMerrill That's just O(list1:Size^2) right? It's been a while since I did big O in college but I thought you just took the largest one and ignored the rest
 
10:02 PM
Or maybe I was misunderstanding, I was thinking we you looking to take a piece of code and determine its complexity.
 
@Rainbolt not necessarily, because O(N^2 + M) can
 
@Rainbolt list1:Size and list2:Size are two different variables
 
can't be simplified
 
Or are you just looking for a syntax to describe a big-O expression itself?
 
@PhiNotPi that's why I'm doing complexity hinting (and why the hints need to be parseable)
@PhiNotPi yes.
hmmm, this is slightly problematic when it comes to things like graphs
say, you had a tree with N nodes
but your complexity was based on the height of the tree
 
10:10 PM
So there is an average case, worst case, and best case, and you just need to pick one right?
Or show all three
 
So, let's define a list of core functions that can make up a big-O expression, like addition, multiplication, log, exponent, factorial, etc.

1 .... log_10(x) < log_e(x) < log_2(x) .... x^0.5 < x < x^2 < x^3 .... 2^x < e^x < 10^x ... x!
 
How bout log(log(x))?
x*log(x)
 
Two of these functions can be multiplied together, like xlogx or 2^x*x!. Whenever there is multiplication, the function of the lower type acts as a tiebreaker. x^2 *e^x < x^3*e^x, but x^3*e^x < x^2*10^x
Whenever there is addition, the lesser term is dropped. When there are multiple variables, sometimes there is no "lesser" term. (x^3*y^2 + x*y) simplifies to (x^3*y^2), but (x^3*y^2 + x^2*y^3) can't.
 
@PhiNotPi also x^x at the end
 
x^x!
x^x^x^x^x^x\ldots
 
10:20 PM
A(x, x)
:P
 
@Solver I know you know gulp, but do you know grunt? If you do, could you see if you could answer this question? :3
-1
Q: Build some files, copy the rest

DowngoatI have a very simple project. I have some bash files, and some JavaScript files in a src/ directory, I want to transpile the JS files, and copy the rest. Here's my folder structure: root |- dist // Where grunt should output |- src | |- run_code // this is a bash file calling `code` | |...

 
Stuff gets complicated when we do stuff like x ^ f(x).
Stuff like x^(x^2) is clearly bigger than all of x, x^2, and x^x.
 
@Downgoat lel downvote
 
@Downgoat feature request: mathjax in the userscript
 
@CᴏɴᴏʀO'Bʀɪᴇɴ there is already a userscript for that
 
10:23 PM
why not in the PPCG one? :3
 
@Rainbolt Gee, what a scrub. Smoking would clearly give away your position
 
@CᴏɴᴏʀO'Bʀɪᴇɴ once I finish Cheesecloth I will
 
@Downgoat :D
btw do you need help?
 
where should Cheesecloth files be stored? seems like only executables are kept in /usr/bin
@CᴏɴᴏʀO'Bʀɪᴇɴ yes
 
@Downgoat cool! I don't know bash though.
Can I haz link?
 
10:26 PM
@QPaysTaxes what is overwatch
 
@Downgoat what is cheesecloth?
 
@Maltysen Cheddar Package manager
 
@Downgoat you finished cheddar?
 
@QPaysTaxes can it run on hay? My computer is made of hay
@Maltysen for the most part
 
@Downgoat cool
 
10:27 PM
@QPaysTaxes I was soooo hyped for Overwatch (one of the first people to sign up for the closed beta) but there's no Linux or Mac client
I didn't even make it into the closed beta either lmao
@QPaysTaxes No Linux
And the damn thing doesn't work on Wine either which is really weird
@QPaysTaxes Because Blizzard always makes a Mac client if not a Linux client
it's unusual
they explicitly said they weren't going to do it
 
@quartata done
 
@QPaysTaxes oh, I have a graphics card for my stack of hay so I guess I can run it
@CᴏɴᴏʀO'Bʀɪᴇɴ is this dragon related to you?
 
@Downgoat Yup. Great Uncle John Doe.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ cool, he most of done a lot of testing...
 
10:32 PM
 
Yeah! That's how coding got into my family :P
 
Boop
 
@flawr AHHHHHHH
 
grin
@AlexA. ^ conedog
 
what are you doing
WTF
 
10:33 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ I just found reddit.com/r/thisismylifenow
 
@QPaysTaxes bai :P
@flawr omigerd
 
I should go to sleep now, bay
 
@CᴏɴᴏʀO'Bʀɪᴇɴ what is this?
 
It's cheddar's number.es6, but made to look shudders pythonic
 
10:41 PM
D:
 
It was fun to write tho
 
@CᴏɴᴏʀO'Bʀɪᴇɴ ;_; you are a pythoner now? D: D: D:
 
NEVER
I was only implementing a previous suggestion
And it was in JavaScript
// "convert" c-style to python style
function convert(code){
	// split into lines, remove tabs for visual effect
	var lines = code.replace(/\t/g, "    ").split("\n");
	// get max line length
	var maxLen = lines.reduce((x, y) => Math.max(x, y.length), "");
	// add some padding
	maxLen += 3;
	// iterate through lines
	var iter = lines.map(line => {
		// get all valid ending characters
	var lastIndex = line.search(/(?:}\))*[{};]+$/g);
		if(lastIndex < 0)
			return line;
		// pythonic line
		var pLine = line.slice(0, lastIndex);
 
Pro tip: To spend less time in The Nineteenth Byte, remove it from your bookmarks bar.
 
@HelkaHomba I'm already too far gone. I just type in nin into the search bar and it knows where I want to go.
 
10:43 PM
@QPaysTaxes Not really... you can't define non-identifiers
 
^
 
@HelkaHomba I actually don't have this room bookmarked at all.
Doesn't seem to help.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Amateur. I just type n :P
 
wtf
I type in n and I get this: nd1.nodiatis.com
 
I type in n and get the nethack wiki
I type in c and get the Nineteenth Byte life status ruined
 
10:47 PM
	first pretzel code
∀eÄ¡∈aâ˙A	function, takes inputs 'a' as list of operators, 'e' for string of commands
			for each instruction, executes its corresponding function (lines of the program)

∀e		for each â in e
	Ä		set register A to:
		¡		result of calling function:
			∈		index of â in a
				a
				â
			˙A		with arguments [A]
 
what is this? it looks beautiful
 
Is "Hue Hue Hue" a meaningful internet phrase to people? (I mean personally, not just what you looked up on urban dict)
 
@HelkaHomba basically TWSS
 
How?
 
shrug
Internet speak
 
10:50 PM
@HelkaHomba hue hue hue = he he he but in a mocking dank way
 
@Cyoce \huge\forall e\ddot{A}¡\in a\hat{a}^\cdot A
 
@CᴏɴᴏʀO'Bʀɪᴇɴ pretzel, my work-in-progress golfing language
 
interesting. not very golfy by the choice of symbols
 
I'm not sure if I entirely understand what babel does. Can someone explain? Does it just make arrow functions into normal functions?
 
@AshwinGupta Basically. It makes ES6 code ES5 compliant
 
10:51 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ What do you mean? Choice of symbols does not affect golfiness.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ do all major browsers support es6 (chrome, ff, IE, edge, safari)?
 
@Cyoce In UTF-8 it does.
 
@AshwinGupta you don't need to know what it does, you just need to use it
@AshwinGupta no
 
@AshwinGupta Chrome and FF for sure. IE definitely not.
Idk about the others
 
babel also adds support for ES7
 
10:52 PM
@QPaysTaxes :(
 
@Downgoat ok thats why. Got you.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ This is just the UTF-8 translation. The real language will accept a custom code page.
 
@AshwinGupta Babel is a source-to-source transpiler that transpiles from es6 to es5
 
@Cyoce Oh I see.
 
@quartata s/es6/es2015/
 
10:52 PM
@quartata ok ty, I got you.
 
@Downgoat no, es2015 is es6 iirc
 
@Cyoce I mushed the words together there for a sec. Now I think @CᴏɴᴏʀO'Bʀɪᴇɴ should go by "CᴏɴᴏʀO'BʀɪᴇɴPʀᴇᴛᴢᴇʟ" from now on.
 
Hi @NewMainPosts
 
@CᴏɴᴏʀO'Bʀɪᴇɴ ES2015 iincludes ES6 and ES7 I think
 
@Rainbolt It'll be "you pick one", but the standard is average case
 
10:53 PM
idk
 
@HelkaHomba ಠ_ಠ not likely
 
@Downgoat Babel doesn't support all es7 features yet
 
@quartata yes it does
 
@HelkaHomba s/CᴏɴᴏʀO'Bʀɪᴇɴ\s+/CᴏɴᴏʀO'Bʀɪᴇɴ/
 
not all of them
 
10:54 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ everything in the ES7 spec is supported
 
I put my code in, I don't think it really changed anything...
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Also, Babel won't do shit if you use a built-in function/method that isn't supported in ES5.
 
@Downgoat That's so vague :P Heck, there's even draft specs (that's what ** is)
@Cyoce Yeah :(
@AshwinGupta show us the code?
 
um, its long...
 
@AshwinGupta pastebin?
 
10:54 PM
Like 500 lines.
 
@QPaysTaxes yea
 
@Cyoce babel has an official polyfill which you compile with
 
@QPaysTaxes oh well. I'm lazy.
 
Do you want to see the "changed" code? Or the old code?
 
Hehe. Switch the B and C in Conor's name.
 
10:55 PM
old. we can upload changed
 
@HelkaHomba ಠ_ಠ
 
Its a little bit outdated (1 day of work) but thats the code.
 
@QPaysTaxes I'm just lazy when it comes to manually reformatting text. I'm selectively lazy.
 
@PhiNotPi I don't think this is valid big-O syntax
 
10:56 PM
39 secs ago, by Cᴏɴᴏʀ O'Bʀɪᴇɴ
@HelkaHomba ಠ_ಠ
 
@PhiNotPi There's got to be a way we simplify all of those logs
 
No stars for that? Come on. This place stars worse jokes -.-
 
One other quick thing, if I have 2 script tags in html (which link to different script files). Can I acess variable foo from script 2 that is in script 1 directly?
 
@AshwinGupta yeah, not a lot of es6+ there
 
@NathanMerrill They are constant multiples of each other.
 
10:57 PM
@HelkaHomba Not a great incentive for starring that ._.
 
@AshwinGupta Yes. All the scripts will operate on the same window object.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ ಠ ‿ ಠ
 
@quartata ಠ╭╮ಠ
 
@CᴏɴᴏʀO'Bʀɪᴇɴ ok thats probably why. I'm not using any advanced features, IDK much javascript programming, I'm probably making everything harder for myself xD.
 
@AshwinGupta You're doing great. :)
 
10:57 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ I don't see anything es6+ in there which is a shame
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Ah ty :D
 
@AshwinGupta So long as its a global.
 
Yeah I figured
 
@NathanMerrill I'm not sure why x ^ f(x) wouldn't be valid. What's wrong with x^(x^2)?
 
@quartata Yeah >:|
 
10:58 PM
@AshwinGupta Yeah, it's all one scope. Keep in mind though JavaScript has no block scoping i.e
 
@quartata well TBH, Idk anything special about JS, so I'm using stuff that I know from java, just basic programming techniques.
 
if(fooey) {
  var x = 2;
}

console.log(x)
=> 2
 
@PhiNotPi ah, I thought f was an actual function
 
One of the nice things that es6 has is let
if(fooey) {
  let x = 2;
}

console.log(x)
 
@quartata I don't understand, whats the signifigance of this?
 
10:59 PM
=> error
@AshwinGupta The point is that x doesn't go out of scope.
 

« first day (1920 days earlier)      last day (2916 days later) »