« first day (2203 days earlier)      last day (2728 days later) » 

8:00 PM
@SterlingArcher Does it feel MORE CINEMATIC???
 
lol
 
ohh man I should post the code
 
idk about you guys but my 144hz monitor makes it really smooth
 
its terribad how I'm doign this
 
@rlemon make it a VR feed
 
8:00 PM
function broadcast() {
	for( const client of server.clients ) {
		if( data.length === 0 ) continue;
		client.send(data);
	}
}
(function f() {
	exec('raspistill -w 800 -h 600 -o ./image/image.jpg --timeout 100 --quality 100 -sh 0 -co 0 -br 50 -sa 0 -ev 0 --exposure sports', (stderr, stdout, err) => {
		data = fs.readFileSync('./image/image.jpg');
		setTimeout(f, 5000);
	});
}());
 
or just use one of those VR social apps
 
this is worse than TrumpTV
 
10/10 read that as rapist ill
 
oh good I'm not the only one
 
was like wtf kind of command is that
 
8:01 PM
wait, I need to show @Waxi my patches
 
that will never connect
I'm 30
 
@Trasiva "psychotherapist"
 
@rlemon Time for you to give up and shave off the side touching your ear and just rock a goatee.
 
thats more face to shave
 
8:03 PM
 
may as well shave the entire thing at that point
 
dye your hair rainbow and fuck your life up fam
 
user1596138
@SterlingArcher lol
 
I wanna play with the exposure modes
sports is okay it seems. there is a snow mode
 
please don't expose yourself
 
8:04 PM
X-ray mode is best mode.
 
@SterlingArcher please expose yourself (source)
 
you heard the bot
 
s2r
 
snow exposure just seems to be darker
 
I mean, what were you expecting?
 
8:13 PM
ohh yea
check that out
 
Does this even make sense? https://www.irccloud.com/pastebin/FYtgOGnW/

I want `generate()` to return a promise that resolves with a final set of data, but I need to do some post processing inside `generate()` in a then... how can I ultimately return the contents of then from generate?
 
my god you look like eminem
 
the cartoon filter is fun as well
 
Mom's spaghetti.
 
@EchoLogic i haven't read your code, but it sounds like you're trying to do the impossible.
 
8:18 PM
@KevinB that is highly likely.
 
if you want generate to return anything but a promise, don't return a promise
 
No, I definitely want to return a promise...
 
then the value 'returned' is the promise
you can't have both ways
 
@rlemon what happens if you return a promise with a then chained on?
Universe breaks?
 
depends on what you return to .then
 
8:20 PM
you've already returned the promise
the then chaining doesn't stop that
 
it'l still return the promise, but you can change what it resolves with using .then
or even reject it
 
or return a promise from the inner then and chain accordingly.
 
let outcome = generate() I know a promise gets returned, but I'm unsure how the .then inside generate changes the details of the returned promise.
So, what's outcome?
 
outcome is a promise object
always
 
what state is that promise in?
 
8:22 PM
no clue
that's the point
 
well, it's unresolved initially right?
unless... it's an already resolved promise i guess
 
you don't and can't know, that's kind of why promises exist
 
async/await maybe?
 
Maybe I'm not making myself clear... basically I want generate() to return a chained promise... I'll be further manipulating the data inside generate() and ultimately I want it to return a promise with the manipulated data. I just wanted to know if it was "safe" to do what I've written. :)
 
yes
well
i mean with what you've written here
still haven't read code :p
yeah looks fine
let -> const
 
8:26 PM
function foo() {
	return new Promise((resolve, reject) => {
		resolve(1);
  }).then(one => 2);
}
console.log(foo()); // foo is always the promise
foo().then(console.log.bind(console)) // but you can always get what you wanted from the final then
 
thanks. Also that last line was pretty much what I was asking about, @rlemon. cheers.
 
finally crashed
that was a good run
I don't handle ws connections properly
 
@EchoLogic "chained" promises are regular promises.
When you have a reference to a Promise object, you don't know (and don't care) whether it's been chained 0 times or 1000 times
You can definitely make functions that accept Promises, call .this() on them and get new Promises, then return those.
 
if you really want to strip it down, you can just require a promise-like (i.e., anything with .then)
 
lol this guy again
I love his music, so original
each song is a masterpiece
 
lol yeah cracks me up
 
i need to see that guy singing some prog xD
 
he's so recent too
I really hope he continues with the meme
 
8:51 PM
Like In The Wake Of Poseidon - (King Crimson)
 
a week ago he hit 10K subs
he's already passed the 70K
 
Would be the most amazing thing ever!
 
dudes gonna have 100K subs in < 1 month of making videos
 
@AronisMariano Hey, someone else who likes King Crimson!
I was recently in a Stick Men concert, they played most of an album they just released, Prog Noir. They were amazing
 
8:53 PM
:P
 
Just wanted to show off :D
And was excited by a fellow prog rock lover
 
@SterlingArcher i.imgur.com/qUOb678.jpg he's so pleased with himself.
 
erlendellingsen.github.io/app-tab-bar lol no demo, dependency city (most of which are dated now) and just released this on reddit
!!afk
 
to webpack users: do you keep your JS source outside document root?
 
9:06 PM
Hey fellas this function runs terribly whats a better way to write this.
    stateCheck(): Boolean {
        var stateArr: string[] = this.workorderService.getStates();
        var state: string = this.customAddress.state.toUpperCase();
        if (state.split('').length >= 2) {
            console.log(state)
            for (var i = 0; i < stateArr.length; i++) {
                console.log(stateArr[i])
                if (state === stateArr[i].toUpperCase()) {
                    return false;
 
@tereško yeah, i usually have a public folder which is my document root, and on the same level a src/app folder which has the source
webpack builds into public
 
Its checking everytime the user adds a letter is there a way to only test it after a few seconds or somehitng?
 
@BlunderCode look into debouncing
 
@bitten alright will do!
 
or Throttling
 
9:10 PM
@Loktar reading about it as we speak
 
yeah, throttling is more suited
 
!!should I play video games or watch a movie?
 
@Zirak You should play video games
 
As you wish
 
9:29 PM
where would i put this function davidwalsh.name/javascript-debounce-function in an angular 2 app so I can use it throughout the app anywhere like he does?
 
9:48 PM
in angular 1.5 you didn't need that, it comes built-in with the model-options
you sure angular 2 doesn't have the same? (i haven't used anguar2)
 
@BlunderCode Less console.log should improve it
And what is it with the state.split('').length?
Why not just state.length?
 
couldn't you use [].includes there?
instead of looping and returning true or false?
 
And the workOrderService should already contain all states in upper case, if that's what you need. And you could have a hash of it and just do return workorderService.states[state]
 
@rlemon dude,
 
Hi everyone. One question, If you use mongoDB, how useful is javascript (I know MongoDB rely on Javascript)? Like do I have to know Javascript? Or can I pick up on it as I use mongoDB?
 
10:09 PM
well, one is a database, the other is programming language,
If you replaced mongoDB with mssql or javascript with python does that change how you see the question?
 
@FarhadSaadatpei You'll be using some mongo db adapter, so all that should be abstracted for you. The mongo repl however is sort of js.
 
@rlemon spacex, version alpha
 
I see. Thanks @Zirak
 
10:39 PM
!!afk for the weekend
 
@KendallFrey you're not fooling anyone
 
@Mosho KendallFrey is afk: for the weekend
 
besides caprica
 
@all: Need some insight on this. So if I am using Webpack to load my internal app modules using import, is it wrong to not do the same import for say loading jQuery. I am loading it globally. Is that un-webpack like?
 
10:55 PM
@AliGajani using webpack to load 3rd party dependencies is normal. Just install jquery using npm and then import $ from 'jquery';
 
but I am using gulp for that, should I use webpack instead? I am checking to see what's normal..
 
using gulp for what?
 
gulp to load in all my third party libraries like jquery.. as in to concat/minify them, and then load them up in a build.js
 
It's normal to use webpack for ALL dependencies, but you can continue to load jquery separate if you like.
you can configure webpack to look for jquery in global, for instance.
personally, i have webpack do all the minimizing and bundling for my client. I have gulp do some other tasks but the entire client bundle is webpack all the way down
 
cool, so here's what i am doing presently. webpack to bundle my app.js, gulp to minify/concat third parties like angular+jquery which gives me vendor.js, then finally merging these two to get build.js..
 
11:00 PM
If you are interested, here is my webpack config: gist.github.com/luggage66/a915ee1dd72057049105c389338df23a
 
thanks man. so from the looks of it, what I am doing is not so unconventional...
ill take a look at your config
 
It's a real-world one with various shims for some modules. warts and all
 
I don't get my gym. the weight room is up 3 flights of stairs.
on leg day it takes like ten minutes just to get to the shower
they should have considered leg days
 
11:38 PM
@Luggage 'warts and all' ?
 
how can I stop a function at a certain point?
I have a function finding is something is not a number and I need the script to stop if NaN == true
 
@Tantrik you can use return
 
I was thinking so
I can't seem to get it to work
 
show us your code
 
I have pretty much else if input is not a number alert(); and I need it to stop there
ok
apologize for the super noob code this is some of my first stuff
 
11:44 PM
no problem, we all were there once
 
idk why I can't even get anything in jsfiddle to actually run..
ever*
oops
 
where do you want the code to stop running
and what are you trying to do exactly
 
just a guessing game
so
when submit is clicked, regardless if something is there is will display "not quite try again"
it shouldn't get that far is there is nothing entered
 
are you sure you pasted the right version, nothing works if i click submit with a blank field
 
ik same I hate js fiddle lol
there
jsfiddle is the worst
 
11:51 PM
okay so look at your code again
you are printing that line without any checks or triggers as to when it should be displayed
 
I see exactly whats happening i'm just not really sure how to handle what I need
I thought I would use a return but that hasne't worked
 
lets take baby steps
 
so I should add a check in for is it is null?
 
why dont you break your code into 2 functions
1 function to handle the submit, and a second to toggle the line you want
 
hmm ok
do you usually want to segment when possible?
I guess that would actually make way more sense having two functions
seems like it would be way easier to finish the first, go to the next
let me give that a shot see what I can do here
ok so i'm confused
if I split up the functions, how would it know to go look for the next thing
 
I think this may change up the whole dynamic of the program the more I think about it
toggle(userGuess);
what is going on with that line?
 
that line is called whenever you make a guess
 

« first day (2203 days earlier)      last day (2728 days later) »