« first day (2894 days earlier)      last day (2276 days later) » 

19:01
@SomeGuy fucking good book, that
@ex080 700 something
@KendallFrey I have you to thank for that, actually! Thanks! :D
which is the other book you're talking about?
Free Will by Sam Harris
@SomeGuy oh, lol, you're welcome
@SomeGuy Ah, I haven't read that one but I'm pretty familiar with the classical arguments for determinism
19:02
@KendallFrey What's your stance?
In the philosophical sense, there is no free will. However, there is a meaningful concept of will, even if it isn't truly free.
The difference between jumping and being pushed
Right, agreed
For me, I always had the same stance, but until The Big Picture it was harder to make that distinction
My more controversial stances come from books like The Moral Landscape :P
@BadgerCat <3
@Shmiddty Happy birthday!
Didja do anything fun?
19:08
@Shmiddty and welcome back to the chat, I had to reply to one of your old messages to ping you
@SomeGuy hi
@BadgerCat Hi!
How have you been?
Good!
How's your german going?
Schlecht :P
I dropped it for a bit
GSoC, the RSI, college finals, etc. got too much to handle
I'm just picking it back up
But I'm basically at the same level as when we met last year, sadly
May join a class at some point
@BadgerCat Did I tell you I'm finally moving out?
I'm so excited :P
19:10
I heard :P
Did Awal inspire you to do it?
I should learn german in private than freak out my fil
Has he moved? I didn't know that
When are you moving out?
Sunday, I'm flying down, then I start apartment hunting
Nice!
What made you want to move?
19:14
I've wanted to move since I was 14?
I don't remember. My house is too...rigid
@SomeGuy you're like 21 now?
I feel old
I do too, Badger. I do too
@BadgerCat when I joined SO SomeGuy was 15
and I was 25
:/
19:17
@rlemon I still think of you as 25, if it helps
\o/
I still get carded for alcohol occasionally
legal age here is 19
@rlemon are you over 32?!
exactly 32
Now I don't feel so old
Thanks!
@rlemon I stopped getting carded after working as a satellite tech.. That was a hard life lol.
19:18
Hahahahaha
Rooooood
You get carded because you're too cute mister lemon, always told you
dievardump.. damn man
long time
where you been?
we have a serious lack of Simons in teh chat
@SomeGuy In India it's now 00:49
My loop doesn't wait for the sleep to finish before continuing the loop. How can I make it so?

const a = [1,2,3,4,5]

function sleep() {
	return new Promise(resolve => setTimeout(resolve, 1500))
}

a.forEach(async num => {
	await sleep()
	console.log('Number:', num)
})
@robe007 Thank you, Mr. Fact-man!
19:20
I want .each loop inside td tag in jquery how should I do this?

 <td>
    $.each(data, function(index, val){
    val.attr_value;
    });
    </td>
I come, I go. I've got a boyfriens, changes everything, the time I had to research and do things for me, now is to socialize. I also travel, just spent 5 months in Lisbon just to learn portuguese. Giing back to berlin after that
@SomeGuy shouldn't you go to sleep?
@SomeGuy Friends? xD
@SebastianNielsen I'm pretty sure forEach will fire those all off not waiting for the block to finish
use for..of like Madara suggested
@BadgerCat YOU'RE NOT MY SUPERVISOR!
Please don't ask Fabian to tell me to go to sleep, though :P
19:21
async function foo() {
  for( const item of items ) {
    await bar(item);
  }
}
really the best super visor is the one laforge wears
@SomeGuy I'll ask him to do your code reviews in german
@KendallFrey I'm 32, when do I get my adult super vision ??
@BadgerCat Hahaha, I don't mind that, actually
@dievardump ohh nice. so staying away from Canada?
19:23
Yeah, I wanted to come back but I'm kind of stuck here now. And It's too cold to think of coming together ^^' I would love to, but it would kill him
Maybe in some years when I'm back single ^^
lol
> I want my home to be as cold as my heart
Sometime ago I used to learn Icelandic, but not continue, because to speak this language it's really necesary to live in Iceland xD
@SomeGuy apparently I don't have any say in what he does
The problem is, it waits 1500ms and then fires all of the functions, but I would like it to wait for one function to resolve, then continue the loop, then wait for the next function to resolve, then continue the loop. (1500ms between each function call). Instead of all functions firing at the same time.
@BadgerCat Hahahaha, aww. The iron heart, huh?
19:24
And you, how is life? Still in Kingston (iirc) ?
Kitchener.
yup. bought a house (dunno if you were still active)
aie ! almost all the letters
like 3? years ago
@SomeGuy yeah :(
@rlemon You live there?
19:25
depends on who is asking
And do you still heavily smoke your electronic cigaret ?
yes
although I've been thinking recently I should stop
HAMMERTIME!
I kicked cigs. now it's just because I enjoy it
Ho, the bot didn't die
19:42
why is npm so slow
and yarn so fast
Getting Uncaught RangeError: Maximum call stack size exceeded
on what code?
@rlemon my god I had a dream last night that I was chain smoking and I loved it. It always used to be such a good excuse to go outside and relax...
@rlemon it's weird to handle events with promises?
what?
19:51
is yarn faster than npm?
you just said it is
is saturn hotter than uranus?
nothing is hotter than my... oh nvm
lol
return anAsyncFunction()
.then((result)) => {
    result.on('child_added', function(s) {
        // return here some_variable
    })
})
.then((final) => {
    console.log(final);
})
The only way I have found is this:
return anAsyncFunction()
.then((result)) => {
    return new Promise (function(resolve, reject) {
        result.on('child_added', function(s) {
            resolve(some_variable);
        })
    })
})
.then((final) => {
    console.log(final); // Now get here succesfully the value of some_variable
})
It is ok, or there is another improved way to get the value of some_variable ???
19:54
no, that's it.
but if you abstract out the then fn's it should be much more readable.
@rlemon How abstract?
move the function outside
function getChildAdded(r) {
  return new Promise( resolve => {
    r.on('child_added', resolve);
  });
}

return func().then(getChildAdded).then(final => console.log(final));
@rlemon Ok, it's better you're right
I don't know firebase
they might have a better way to do this in the docs
I'd check it out first before being sold on the Promise constructor
@rlemon It's ok
20:12
Is it possible to create say a span tag x amount of times, x is a varible containing a number
sure
but I imagine this question has a scenario specific to it
It does :) I want to load reviews for a product, the rating is in number 1 - 5, so instead of displaying a number I wan't to display x font awesome stars instead
A normal for loop will do?
why not always have 5 stars on the page and just hide / show based on ratings?
@Shamaran yup. there are probably a few dozen ways to do this.
Thats sounds a bit harder tho
nahh
honestly, I might do it in CSS :P
20:16
I can implement it with react aswell? :)
wow time is a real pain in the behind... I just notice that when sending a datetime string to postgres to store in a column "timestamp without timezone" it ignores the timezone (doesn't convert to utc).. However when querying against a timestamp it does convert the "query time" (not database) to utc when the database doesn't have timezone information.
And to make matters worse: pgadmin takes the times in such a column and silently converts the times to the system local time.
quick and dirty little demo
So when I insert Tue Sep 18 2018 20:18:43 GMT+0200 (Central European Summer Time), pgadmin shows 2018-09-18 22:18:43 however if I read and print in javascript it show 2018-09-18T20:18:43Z. And if it actually equals to Tue Sep 18 2018 22:18:43 GMT+0200 (Central European Summer Time).
20:23
@rlemon thats pretty nice!
Are questions in the format "What is a good lib to do ${X} in ${Y}" against SO policy?
yes
Even in the ever-friendly chat rooms?
that's fine
@rlemon I modified yours a bit, not sure how its working but it is lol
20:36
> not sure how its working but it is lol
congrats, you're a programmer now
Have a look please, does this look decent? :)
const test = []
    for (let i = 0; i < props.review.rating; i++) {
        let star = <span className="fa fa-star"></span>;
        test.push(star);
    }
    return (
        <div className="star-rating" key={props.review.id}>
            {test}
        </div>
    );
.star-rating span {
    display: none;
    color: #FFBC0B;
    display: unset;
}
So the props.review.rating is obviously number 1 - 5 :)
This dosn't feel right but its working?
I mean, it's fine. like I said there are a lot of ways to do this
It's legit to put html elements into an array like that?
those are not "html elements"
that's JSX
Yes ofcourse :)
20:39
it looks like html, but it gets translated to React.createComponent ...
Why am I getting the "Each child in an array or iterator should have a unique "key" prop" when I added a key to the div?
because the spans don't have keys
Ohh right, obviously :) Thanks alot @rlemon you've been a great help!
no problem. good luck
Hope you dont mind me butchering your cool css :)
20:43
It doesn't look like a promise is returned anywhere.
So, the Promise constructor is needed
why, if I may ask, do you need this to be in a promise?
is the event emitter not enough?
Oh no, chrome updated itself. It's hideous
I'm in a thenable, and I have an if statement to resolve and get out from the event
yes, I've seen the code. but why does it need to be there?
"I can't believe I'm saying that I prefer the already atrocious Material design. Google made all this song and dance when that came along and said that was here to stay, yet they've already replaced it. Idiots.

Fortunately, there is a way to revert back to material design. Who knows how long it will last, Google in their 'infinite' wisdom will probably disable it and say 'how could you possibly now like it?'" - a chrome ui review
lmao
20:46
@rlemon Just is for my logs
that doesn't make sense to me
It's some kind of test I'm doing. Don't think on it xD
fair enough
just trying to see if a new approach could work better
Yeah
Hi
Hows life?
20:52
can you store jsx in an array?
waiting for a file to upload to GC........
@JBis Nice, how are things? xD
@DavidKamer yea, why not?
it's just an object
ok, just wasn't sure how it would work
@robe007 Setting up a GC server but these Upload speeds are killing me :)
Its 300MB file and I have been waiting 10min+ and only at 60% :(
20:58
@JBis That is really sad xD
@rlemon huh, I guess I previously had issues because I was doing {this.props.jsx} instead of just this.props.jsx in the render method..
sigh 100 bottles of bear on the wall! 100 bottles of bear! Take one down pass it around 99 bottles of bear on the wall....
Can anyone recommend KeystoneJS or any other node-based CMS?
@Alesana Make your own XD
jk
or maybe not
XXXXXD
the writing styles you find when dealing with random people on facebook are amazing
21:06
@towc ooo. I sense a funny photo coming :)
I just found this person who doesn't use any punctuation or capitalization for starts of sentences and similar
I'm looking for something simple for clients to be able to modify their websites, but where I still have a lot of control over how the website functions
@towc Nice. That comes close to this senior who didnt know the space bar existed. All emails were written without spaces. lol.
@Alesana Sounds like you want WordPress to me.
this isn't even extreme
but it's fairly confusing
21:08
@MadaraUchiha That's a last resort lol
@Alesana Are you expected to actively maintain it?
@MadaraUchiha yup
I am seeing some performance issues with Wordpress
How much traffic are you expecting?
Depends on the client
Not too much - local businesses usually
Is there an online server to which i can send post requests and it will echo back or something?
21:14
I also want to use modern development tools - I know there are some ways to do that with Wordpress but it doesn't seem that they're ideal
@Alesana Why?
@ex080 wdym? like post "hi" and it echos back "hi"?
@Alesana when you hit enter instead of ]
:)
POST html using axios or requests
so POST "<p>hi</p>" but it will display "Hi"?
There's Roots for example, but I feel like it's trying to use WordPress in a way that WordPress wasn't made to be used, it would make more sense to me to use a CMS that was made to be used with modern development tools
Maybe not though
21:19
1 message moved to Trash can
@ex080 Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
@CapricaSix fuck off
axios.post(url, {

})
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
whats that for?
that's a POST request
U pass the data {msg:'hi'} as the second arg.
then the server on the REST api resonds
21:34
wat
found one
nvm
@JBis that bot has feelings as well.
@ThiefMaster well the move to trash hurt @ex080's feelings. And yes, I am the personal ambassador for @ex080's feelings.
Anyone here know reactive x?
21:43
thanks man
lol
!!undo
@JBis @no u
Close enough
!!help echo
@MadaraUchiha echo: User-taught command: <>$0
Eh, next time
21:50
@CapricaSix I dare you: [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "click"
lol
22:19
@KevinB cockblock... — foreyez 28 secs ago
lol
!!tel is shorthand for !!tell user echo message
@is shorthand for !!tell user echo message
doh
lol
!!!
she should ignore that now
22:37
exactly
I think there is also !!telll
!!telll 43983012 like so
@KendallFrey like so
@Rod_Algonquin yes
22:53
!!tell foresthopkins stahp
HAMMAHTIME!
@KevinB Command stahp does not exist. Did you mean: stop, stat, stats, star, stars, slap (note that /tell works on commands, it's not an echo.)
what
i meant the word stahp
HAMMAHTIME!
not a command
oh
derp
it's not echo
!!tell KevinB tell
22:58
@david Command tell cannot be used in /tell.
shakes fist at cloud
!!tell KevinB echo There was an attempt
@KevinB There was an attempt
23:18
Folks, why here I get: TypeError: this.indexOf is not a function
const d = new Date();
const years = [2017,2018,2019,2020];
getYear.bind(years, d);

const getYear = (d) => {
    const a = this.indexOf(d.getFullYear());
    return this[a];
}
23:32
Most likely
this isn't what you think it is
the code sample you provided isn't conclusive enough to indicate what this should be
but the error indicates that it is not an array
(you can't bind an arrow function, as it is already bound)

« first day (2894 days earlier)      last day (2276 days later) »