« first day (2085 days earlier)      last day (2857 days later) » 

12:57 AM
@Loktar highest detail level with DX12
I get 60fps
 
 
1 hour later…
2:11 AM
@ndugger lol I panic when I see 60fps
 
I had vsync on
but this is highest quality on one of the most graphically demanding games out right now
 
2:31 AM
with vsync off, I get ~125fps
 
morning guys
 
can it run minecraft at 30fps
 
can replace IIFE for block scoping private functions/variables
 
@ndugger Tomb Raider?
 
most probably is
graphics looks awesome.
are these the same?
var settings = (function()
	var privateVar1 = 'abc'
	return {
		exposedVar1: privateVar1;
	}
	)()

var settings1 = function() {
	let privateVar1 = 'abc';
	return {
		exposedVar1: privateVar1;
	}
}
 
2:40 AM
no
the first one basically does:
var settings = { exposedVar1: 'abc' }
 
but is IIFE needed to make private variables?
 
not really
 
@littlepootis Yeah, the newest one
 
@littlepootis without using let, how can i declare a variable in a function without polluting the global namespace.
@ndugger what engine are they using
 
Polluting the global namespace means something else.
And let doesn't solve this problem. let is used for block-scoping, it doesn't replace an IIFE.
An IIFE basically creates a closure whose scope is normally inaccessible.
Also, there's no such thing as a "private variable" in JS.
 
2:54 AM
can share a simple example
 
For which one of these?
 
An IIFE basically creates a closure whose scope is normally inaccessible.
that one
 
var settings = (function () {
      var privateVar1 = 'abc';

      var settings = {};

      Object.defineProperty(settings, 'exposedVar1', {
        get: function() {
          return privateVar1;
        },
        set: function(v) {
          privateVar1 = v;
        }
      });

      return settings;
})();
@Ming You could write your above example like that... but why would you..
 
whats the better way?
 
(function () {
  var meaningoflife = "pootis";
})();

meaningoflife; // Reference error : not defined

...

let meaning = "pootis";

meaning; // "pootis"
@cswl lol
@Ming not worrying about variables being "private".
 
3:06 AM
@littlepootis thanks.
 
also variables declared inside a function are local to the function... IIFE or not..
 
so basically let is block scope and var is function scoped right?
 
Yes
 
thanks
 
3:18 AM
Use const instead of let though
 
yeah. thats would be better.
btw want to ask why does this happen
var a = []
for (var i = 0; i < 5; i++) {
	a.push(function() {return i;});
	console.log(a.map(function(x) {x()}))
}
[ undefined ]
[ undefined, undefined ]
[ undefined, undefined, undefined ]
[ undefined, undefined, undefined, undefined ]
[ undefined, undefined, undefined, undefined, undefined ]
 
@Ming scoping
wait,.. why are you pushing functions?
 
Howdy friends
 
testing a code that makes a = [5, 5, 5, 5, 5]
how can i invoke the functions?
 
@littlepootis Are you sure?
 
3:26 AM
got it fixed
 
@Meredith no
 
var a = []
for (var i = 0; i < 5; i++) {
	a.push(function() {return i;});
	console.log(a.map(function(x) {return x()}))
}
 
It's undefined because he forgot a return statement
 
@Meredith :)
why does this happen
[ 0 ]
[ 1, 1 ]
[ 2, 2, 2 ]
[ 3, 3, 3, 3 ]
[ 4, 4, 4, 4, 4 ]
 
Because you're returning the value of i
And the value of i changes with every loop
 
3:30 AM
yes. but a[0] was already appended value of 0
how can a[0] change
unless the loop is updating ALL the values of a
for every loop
meaning, it had to do 15 steps. instead of 5?
 
a[0] isn't changing
 
wait. is a[0] a pointer
to a memory ?
 
a[0] is a reference to a function
 
well, yes and no
 
3:31 AM
the function has closure over i
it never copies i, so it changes every time
 
ah ok.
i get it now.
it just points to a function. i see.
thanks :) @ssube
 
The pointer points to the same function each time though
That isn't changing
 
but let will fix it because every loop is new SCOPE?
 
try this
 
Yep
 
3:33 AM
var a = []
for (var i = 0; i < 5; i++)(function(i){
	a.push(function() {return i;});
	console.log(a.map(function(x) {return x()}))
})(i);
 
But use const
 
the pointer points to the same function and the function points to the parent's context
and the context is an object, so it's a reference
 
let and const aren't 100% supported
 
Does it matter?
 
no
 
3:34 AM
support matters yes
 
Support does not matter
 
for node or on the web?
 
For both
 
either way
 
@Meredith is using const due to functional programming. immutable values? is that the benefit?
 
3:36 AM
Basically
 
btw, does not work with for loop
TypeError: Assignment to constant variable.
 
It works with a for loop
just not with the increment operator
 
oh. ok
 
post-inc is silly anyway
 
how to implement const similar fashion with for (let i = 0; i < 5; i++)
but using const instead
 
3:38 AM
YOU CAN'T
 
You can't. That's the point.
 
i know. but if want to acheive the same objective.
whats a const way of doing it
 
map, filter, reduce, forEach
 
ah. ok.
 
Learn how to use reduce effectively
 
3:39 AM
that looks like a map wrapping a reduce
 
Most powerful function ever
 
I'd argue map and filter are pretty up there too
 
Map and filter can be implemented with reduce
But not the other way around
 
is filter and map abstractions of forEach?
 
No
You use forEach when you need to cause side effects
i.e. arr.forEach(x => console.log(x))
 
3:42 AM
i saw a tutorial once where they created map and filter functions with forEach
 
you can
 
for each is just a simple loop
map and reduce extend it to return a new array or collect values and return a single one, respectively
filter extends map to skip falsy results and keep the original otherwise
 
again I'm not saying not to use let const just know your target audience
 
Keep in mind that map/filter/reduce are only for loops in javascript because it uses arrays, not linked lists
 
@William lol, they're not splitting that by region
ie8 is dead outside of china
 
3:47 AM
In other languages, those functions use tail recursion and reduce is the fundamental function
 
w3schools is not known for their accuracy, either
 
But in JS it's faster to use for loops
 
@ssube did you read the article and comments it is above 1% i nthe US
 
HELP ANY SYSADMINS ON
PLEASE PLEASE PLEASE
NEED HELP / ADVICE
 
2.08% for US
@thepiercingarrow maybe
 
3:49 AM
@William from the comments on an article
none of which is subtantiated
 
I accidently overwrote a file with the mv command and I desperately need to recover it!!!
 
@thepiercingarrow that's not how SO works
@thepiercingarrow not really possible
 
Lol
 
Please? Please? Please?
 
@thepiercingarrow oh damn
 
3:49 AM
go find a new job
 
You can't recover from rewrites
 
My teacher's gonna kill me
 
@thepiercingarrow i will recover it for 1 million dollars deposited to the bitcoin address here
 
Noo it was the mv command
 
@thepiercingarrow mv does a rewrite
 
3:50 AM
I heard that rm is recoverable ?
 
@ssube you decide gs.statcounter.com/…
 
There's a chance you can recover from rm. But not mv.
 
@littlepootis nah, it just changes the nodes
none of those file functions actually clean up after the file
 
@ssube So, there's probably a chance?
 
😭😭😭😭😭😭
 
3:51 AM
but the FS probably does
 
quickly it was only like 3 minuetes ago?
 
Just load the file from your backup
 
you have to copy on mv but there's no requirement to actually reuse the same blocks
 
reboot the computer always IT first step
 
3:52 AM
the system is better off finding new, consecutive blocks
 
No its my teacher's server I ssh'd into it and deleted his stuff
2
 
@William that will only make it worse
 
lol dude
 
hahahha
 
@William ROTFL lol
 
3:52 AM
@thepiercingarrow gj
gz
 
No it was an accident
 
F-
 
You fucked up dude
 
hmm hopefully he has backups
 
Remove all traces and gfto of there.
 
3:53 AM
I'll ask him tommorrow
 
Drop the class
 
Why did you ssh into his server?
 
YAY just realized it wasn't his stuff. It was another kid's project. *phew*
 
drop out of school
 
@littlepootis For a project
 
3:54 AM
stage a computer break in/hacker
 
Wait I just lost a friend.
 
poor kid
 
😭😭😭
At least it wasn't the teacher's file.
 
Buy the poor dude a beer
 
I mean, if you go around deleting other people's files, do you really deserve friends?
 
3:54 AM
He's too young for beer
 
Well is there a list of commands to try and recover it??
I have root
 
@thepiercingarrow you pay 6 figures for forensic file recovery
that's it
 
Root beer or root privileges?
 
lol both
damn searching up google I couldn't find anything...
 
3:56 AM
your going to have to murder the kid so nobody finds out what you did....jk
i will do such for a small fee
 
Its fine his project wasn't very good anyway.
He sucks at comp sci
 
@William murder?
 
if the teacher is any good, you'll fail the project
 
Has he ever fucked up a mv command?
 
maybe the class
 
3:57 AM
@William what country you live in?
 
@littlepootis it is the only solution
@thepiercingarrow whatever country you live in
 
@ssube He's not. He's a terrible teacher who just likes to exercise his power.
 
I can travel
 
@thepiercingarrow oh yeah, you're failing something then :D
 
shit just realised I won't see my teacher till next month
 
3:58 AM
just enough time to bring out the student
 
Hm I'm friends with him I'll just redo his project for him.
 
"next month" is tomorrow
 
next month is in a few hours for you
 
62 minutes
 
3:58 AM
Omg it's in 2 minutes for me
HYPE
 
2 minutes for me also
1 minute!!!!
 
HYPE HYPE HYPE
 
45 seconds
 
lol I still have 12 hours - i'm in HK which is why I won't see my teacher till i'm back in the US
 
3:59 AM
10
 
HAPPY NEW YEARS!!!!!!!
 
Happy July First!
 
Woo
 
@littlepootis lol
 
4:00 AM
@Meredith just kidding hahahah
 
We are actually celebrating a holiday tommorrow
 
@William ಠ_ಠ
 
There are currently seven official public holidays in China. Each year's holidays are announced about three weeks before the start of the year by the General Office of the State Council. A notable feature of mainland Chinese holidays is that weekends are usually swapped with the weekdays next to the actual holiday to create a longer holiday period. The public holiday pattern, described as "notoriously complicated" by a Wall Street Journal journalist, is therefore less predictable than most developed countries. == History == Festivals in China have been around since the Qin Dynasty around 221-206...
 
@William haha
 
@littlepootis what does ಠ_ಠ mean
 
4:01 AM
We have tens of public holidays
@William IT MEANS TTHA TTHA
 
I'm hyped for the 4th of july
 
But I can't go to the beach this year
 
we gonna play an AWESOME mafia game
 
Cuz it's a monday
 
4:02 AM
Don't waste your july 4th on a beach
Go all out
okay said student is mad at me :( He is ignoring me on FB
 
I always go to the beach
 
Even though I can clearly see he is online
 
@thepiercingarrow you are joking
 
@William no joke
 
4:03 AM
hmm well offer to buy him lunch and redo the project
what type of idiot teacher lets you delete someone elses project?
@littlepootis have you seen finding dory it is cuet
 
I wanna see finding dory so bad :(
 
i liked it as much as the original
 
@William It's got nice reviews, but I'm not into animation films.
 
@littlepootis It was funnier then x men and star wars by a long shot
 
@William mine
We all put our projects in a directory which we all have write access to
And we mark them 444
And then he looks at them
 
4:10 AM
Hi
 
hi andrew
I'm your biggest fan
 
I am a fan
 
:^]
Got a math final tomorrow! Wish me luck
 
4:14 AM
LA
 
fuck linear algebra
 
Gotta go to bed for a 'good nights sleep'
I dun fuk'd up my triple booted computer
So looks like I'm staying up late
 
having the biggest storm ever right now
 
Nice. One just passed me. Now they're blasting fireworks at 11 pm
 
you should be in bed mister
 
4:18 AM
I have to fix my bootloader before I go to bed
 
@AndrewL. which partition did you insntall the bootloader
I think we talked about this
 
I'm talking about chameleon rn. I installed the bootloader on the partition so I can boot from chameleon
Accidentally injected something into the chameleon bootloader and it overloaded it
 
so just reinstall it doesn't sound to bad
or just boot of a thumbdrive
i'm pretty sure chamelon detects the operating systems even
 
I can fix it :)
Just a matter of going into windows and mounting my drive and removing the file
 
easy peasy
go do it
 
4:21 AM
I also installed bootloaders on 2 partitions for linux which can then boot into windows
So fail safe ;)
 
watching damien about the anti christ
 
O.o
 
it is interesting not sure if we should talk about religion here
 
Probably not haha
 
@AndrewL. do you go to church
my guess is no probably not
 
4:25 AM
I do :)
 
really surprised...
 
How so?
 
@William Stop watching me
 
@AndrewL. my chinese friend didn't in Chicago he goes to urbana now
 
You're the anti-christ? @littlepootis
 
4:26 AM
yes
 
Knew it
 
@littlepootis I will find you and kill you
 
I turn wine into water
 
and making the seeing blind
 
@William We're flying to India. Get the tickets
 
4:27 AM
@AndrewL. what type of laptop do you have osx running on?
 
@AndrewL. Good luck!!
 
I never got it to work well on a latop
 
I have a desktop
I built it myself back in 2014
 
interesting so no osx running on any laptops
 
@William i tried installing it on my old laptop from 2010. It was destroyed
That was back in 2013 when I tried that
Or was it 2014
I have a triple booted system of ubuntu 16.04 lts, mac os x el capitan, and windows 10 pro
 
4:30 AM
thats impressive I want a lenovo laptop that will run osx
 
But the machine is still 2014. It's getting a bit slower
 
that is why i hate tech because it is outdated so quickly
 
I should've thought my parts through. My GPU is a bit buggy and mobo isn't extremely compatible with osx
Yeah. I got the r9 270x because it was on sale for 110$.
That gpu was already behind in 2014. Now its r9 480 and gtx 1080
Although technology is getting cheaper
 
why would you run OS X on a normal pc?
 
@littlepootis custom hardware could be better and cheaper then a mac pro desktop
 
4:34 AM
I had some uses with it. I used be very good with macs and would help.
Help other such as my dad and I used to use some xcode
Until I realized how cancerous it was. Haven't touched it much lately but I keep it there just in case
@William In my case I can get processors for virtually no money at all. My uncle almost gave me an intel extreme edition i7 lol (the guy who works at intel)
 
@AndrewL. that is funny
 
He has 3 extreme editions lying around
One 3rd gen, one 4th gen, and another 5th gen. They are HUGE
Welp I'm hitting the hay.
 
@AndrewL. go linear algebra!!!
 
@AndrewL. Get a Xeon
 
hmm
wtf?
Any OS X users here?
 
4:39 AM
@thepiercingarrow a little I have a latop
 
@William How do you use shark?
 
@thepiercingarrow shark can do some sketchy stuff
I have been burned by it once before
I wouldn't say I now exactly what I am doing, but I am no idiot
 
Hm?
Like the profiler
 
I have to go it is 1 am where I live
 
@ndugger nice, too bad it's only 1080
like a baby thumbnail on my 1440! :P
lol but glad it's working for you
You just get it delivered today?
 
4:48 AM
@William Bye!
 
5 ISIS supporters were arrested in my city yesterday
 
@littlepootis Oh noes. I'm sorry.
@littlepootis Did you know them or see it happen?
 
Nah, it was in the news. They had Acetone peroxide with them.
 
So basically nail polish remover?
 
They were planning on an attack this weekend.
 
4:54 AM
Ooooh lucky you they were caught!
Ouch I'm sorry
 
Sadly, only five of them were caught.
 
Damn.
 
Xeons are for server and heavy processing. I don't need a xeon
 
@AndrewL. Everybody needs a xeon
 
4:56 AM
Back to bed I go
 
5:13 AM
How do I get angularjs services for a controller thats constructed as a class, passed down to the controllers methods?
 
5:55 AM
Good morning gentleman and gentlewoman
 
@Paran0a Are you implying that there's only one of each in here?
 
@monners you get to be the woman I call the man
 
6:10 AM
@William Is that your way of asking me for a date?
 
Cup your balls and put this dress on honey ,we're going on a date.
 
6:33 AM
Ever since jsfiddle switched to new layout the UI has been buggy. Anyone else?
 
new layout?
 
oh I mean they redesigned the layout
 
is dribbble a flat design site?
 
6:48 AM
why?
 
jsfiddle has caching bugs
 
Sometimes I feel like creating my own, there's some stuff I like about jsfiddle, some about jsbin and other repls..
 
I've actually come to really dislike it, it's not a pleasure to work with anymore. I'll give something else a try
 

« first day (2085 days earlier)      last day (2857 days later) »