« first day (2553 days earlier)      last day (2378 days later) » 

12:01 AM
Sorry I was reading up on how a quickshifter works
@Mosho nice
 
o/
 
12:18 AM
how do you make a bold statement about something you don't feel strongly about?
in this context, computer science
I realized I just disagree with just about anything I write
there's no such thing as a notable revolution in technology. If there was, it happened ages ago when we figured out we could make transistors, or use boolean logic to automate things
computer science is not nearly as fascinating as too many other aspects of anything. Well, not anymore, at least
computer science is barely comparable to other complex systems
yes towc, any advancement is also a degradation, because power comes in pairs. Sure, maybe in the long term this might achieve transparency and efficiency, but do you really want to talk about that?
no, I don't go absolutely nuts for things that are easily determinable
maybe I just want to do some mediocre work, get married, have kids, and worry about them for the rest of my life
no, towc, computer science is not the answer to everything, because that's like saying "a combination of matter and energy are the answer to everything". It's just dumb
my parents really sucked any excitement out of me, I think
if anything, I like computer science because it's something I'm better at than other things, and just like almost all other things, it's one of the things that needs people to look into
but that's not something universities want to hear about
 
Maybe it'll give you some solace, when I was a child, I knew what I wanted to be when I grow up: I wanted to be a bear. That's a whole story in itself we won't go into at the moment, but after that phase I wanted to be an astrophysicist. 10 year old me.
That didn't work out at the end.
My brother is 11 years older than me and we sometimes chat about life itself and some such. Recently we came to the conclusion that we still don't know what we want to do when we grow up. In fact, the certainty in which we know what we want to do is in reverse correlation to our age.
 
it's not too late for that bear thing
also, thanks :)
 
Personally I register to the world view that everything's meaningless and we just die and the end and nothing matters, so knowing to say "hey, this interests me" and acting up on that is good enough for the time being
 
it is solace. I don't feel dread about the universe or something though
 
Maybe one day you'll find your purpose in life is to craft tiki dolls in 3rd world countries. Maaaybe.
 
12:33 AM
I just really can't think of something that genuinely excites me about studying computer science at university
 
Until then you can undercook chicken
Then either lie or don't do it
 
I can maybe just skip the whole "why I want to do any of this" part
although by "don't do it" I guess you meant uni?
and at that point, that's also fair
 
i didnt want to go to uni and study
but uni is fun. there are parties and young people getting boozed.
 
but what will rlemon and my parents (in that order) think of me? :/
 
i had a helluva four years there
and now i do programming for a living and hang in here
 
12:35 AM
I'm not arguing against university in general here. But booze and parties aren't really a motivation for me
 
@towc that's a whole different can of worms. However, your life is yours to live and lead
 
thanks, that's actually really solacing :)
 
Your parents can give you wise advice, and you should definitely listen and maybe heed them, but only you can decide
 
well, they can also legally threaten me
 
That's fair
And it'd also be your fault, so
Being an adult sucks
 
12:37 AM
but I still have a choice, right
 
On the one hand you can decide that today you're eating the entire jar of cookies
On the other hand nobody's going to buy you these cookies
 
I'll just use a previous draft of the personal statement where I thought I had some excitement I guess
are you talking about the alien concept of "consequences"?
 
@Zirak kiss my boo boo it hurts
 
Both consequences and a moral compass
@SterlingArcher there there my sweet prince
 
for some reason I feel like I normally shouldn't worry about parents threatening me, otherwise things would be fine
where's the moral compass come in? Don't steal the jar of cookies?
 
12:39 AM
KISS IT
 
make sure your actions don't hurt others?
is overthrowing an oppressing entity morally bad because you'd be hurting (even just on the ego or something) the entity?
 
"eating the entire jar of cookies" is a metaphor, one which one explanation is something you were taught is bad but sometimes has to be done anyway, or a conflict of interests (cookies are tasty vs. I won't have more later / my stomach will hurt)
 
oh. i thought it was literal. i started eating the jar of cookies.
 
share the cookies dick
 
Don't eat the jar itself though. Unless it's also made of cookies.
 
12:42 AM
they're my fuckin cookies
 
@towc Great question. Something can be both good and bad at the same time
 
@Zirak still don't see where the compass kicks in
 
@towc It's what guides you into making choices
You were taught something is bad, but you see the positive results. You have to weigh them in some way, give some balance
 
well, I guess you could look at it that way
oh gosh I think I see what you mean
if it's the family's cookie jar, of course I wouldn't eat the whole thing after years
I thought it was just mine, that's probably why I was confused
 
Also, if you're not familiar with this particular strand of philosophy, I'm a fan of the Tao (The Way or The Road). It's difficult to explain in a tiny text box, but besides the main text, there's a tiny intro book to it: The Tao of Pooh
@SomeGuy is also a pseudo-fan
 
12:48 AM
cheers, I'll add it to an imaginary list, although realistically I'll probably not read it anytime soon
 
Ace
can someone explain to me why js does not have LINQ?
 
what is linq
 
doesn't it?
we call it functional methods
they're great, and don't seem like magic nearly as much
 
Like almost all good ways of thought, its focus is on introspection and guiding you on your path (road) to finding your own morality and answers.
 
Ace
@KevinB i dont want to say kys
 
12:50 AM
Combine it with zen (which can be described in a tiny textbox in two words: "let go") and you have an interesting toolset
 
Ace
@towc linq for lists
 
hmmm
 
Ace
js does not have that
 
@Ace so are functional methods
 
Ace
exList.where(x => x.eID != "tiger").toString();
 
12:50 AM
@Ace can you give me a convincing argument to include it?
 
.filter and .map will do just about everything linq does, and give you more power
 
yeah, you can do that with js already
 
Ace
@Zirak i just put it
how? @KevinB
ah
so it's filter and map
 
oh I thought you wrote js for a sec
 
filter, map, reduce,
 
12:51 AM
s/where/filter and it's js
 
my current moral compass has been outsourced for some time (slovak girl)
hasn't failed me so far
but tbf maybe can't fail me because only my moral compass would tell me if it did
 
Ace
word jedi
 
tree cop
 
if you want it, someone's probably already made an npm package for it
 
Ace
i found linq.js
but havent tried it yet
 
1:06 AM
morn
 
@towc How can filter and map give you more power than LINQ when LINQ provides equivalent methods to both?
 
Ace
lol
rekt
 
because it's stuff we know how to use and love
 
I also know how to use LINQ and love it
I once ported it to JS
 
instead of a foreign syntax designed specifically for... oh
 
1:08 AM
@towc LINQ works with normal syntax
 
ok, sure
 
linq is love, linq is life
i dont even remember how i used to write code before linq
probably how i do it in javascript
 
1:59 AM
I guess they're so close it doesn't really matter which is which anyway.
 
3:02 AM
Where is a good place to find different SVG d="paths?

And how come there isn't a spot on the web for this?
People make millions of these all the time, all sites use them.
Why isn't there a spot where you can search for them?
 
search for them? they are just a list of coordinates.
 
You can't, though.
 
Can and do.
 
There's isn't like a directory for them.
Like in google image search, you can only find images, not paths.
 
You don't need a directory, you just make it. It's a list of numbers. type what you want or generate off of data.
that's like searching for strings. just type what you want
Also, I use d3-shape to make them.
like, from data.
 
3:16 AM
I typed in basketball svg and got this: codepen.io/joshuarule/pen/yYXQRP
 
you mean you just want to find images in svg? not just a path?
 
I don't want to make, I want to take.
 
I googled "svg basketball" and get many svgs.
Your google must be broken.
 
Is there a difference between width="100" and width="100px"?
 
Yes. Especially if on the <svg> element.
 
3:27 AM
Just generally speaking.
Sometimes I see a px, sometimes I don't.
What does it mean when there's no px?
 
"100" might mean pixels, or it might be in viewbox coords. 'viewbox' is the keyword that'll describe it
and 'units'
 
How come 200px measures the same as 200?
 
developer.mozilla.org/en-US/docs/Web/SVG/Attribute/width This page answers it more specifically.
in your example above, the "100" is the same as 100 pixels
but it's best to always specify px there to be clear
 
ok, thanks.
 
er, that might be wrong. one sec.
yea, probably
 
3:34 AM
 
that's just a div, what are you trying to do, make the svg larger?
 
I was just seeing if just a numerical value work work by itself.
 
ohhh. I see
 
@jandy Can I ask you something?
 
width and height are OK to use on <svg> and <canvas>, but for <div> and most other elements stick with css (the style="" attribute)
 
3:37 AM
@Luggage ok.
 
you can also use css (and the style attribute) on <svg>
 
@Luggage yea, I know that.
 
This page is full of svg sizing and alignment samples: css-tricks.com/scale-svg
 
I was just referring in general, not svg specific.
 
@Zirak Haven't read the Tao of Pooh. I read Tao Te Ching and it was a 3/5. Lots of stuff that I didn't really understand
 
3:40 AM
ohh, in general, use css/style and always use a unit like px
 
ok, thanks.
 
Ace
3:58 AM
how do i use 'promise' in JS?
simple example?
 
I was just told this, is it true?

"Defining the size of the image using the height and width attributes improves page speed."
 
It doesn't really change the speed, but it makes it "feel" a little faster since the page isn't re-flowing as images are loaded
it stops the text from moving around while loading.
 
When choosing to use either input or style, what factors determines this?
More importantly: What's the rule of thumb when determining whether or not Width/Height goes inside a 'Style Tag,' or whether you leave it by itself as an Input Variable'?

Input Variable

width="100px" height="100px"

Style Tag

style="width:100px; height:100px;"
 
always in a style tag unless, sometimes, on <canvas>, <svg> or <img>
 
Ace
how do i create a 'zone' of a function that in each line it behaves like a 'promise'?
how do i tell lines of code to not behave in parallel?
function() { f1.then(f2.then(f3))}
 
4:09 AM
Did you try asking via StackOverflow as a question?
 
Ace
not yet
we'l see
 
@Luggage thanks.
 
4:27 AM
God dammit my finger fucking hurts
 
Ace
stop sucking on it
 
lol i tore it on my bike
 
Ace
i have a problem:
 function runFirst() {
                        return new Promise(function () {

                            console.log("1");



                        });
                    }


                    runFirst().then(function () {
                        console.log('2');

                    });
why does console not log '2'?
 
wat
you never resolved the first promise
 
Ace
but how do i reslove the first promise?
it's an ajax call
$.ajax({
                        type: 'POST',
                        url: GymResults,

                        data: $('form').serialize() + '&' + $.param({
                            muscle: name,
                            weight: document.getElementById("W" + name + (i + 1)).value,
                            reps: document.getElementById("R" + name + (i + 1)).value,
                            type: "Single"
                        }),
                        //data: $('form').serialize(),
 
4:37 AM
if it's an ajax call, and it's not calling the first callback to .then, then it's failing
 
Ace
do i have to resolve the ajax call?
 
no
add an error handler
 
Ace
how?
 
add a .catch() to your .then()
it takes an error object as a parameter
 
Ace
sweet
so..
ah im confused
 
4:45 AM
you and me both
 
Ace
i just want to do ajax calls consecutively and not in parallel
 
why?
 
Ace
because i get errors when trying to acces DB data when some ajax calls are still running
for example, page loads and ajax runs to grab DB data and put it in list
i have to wait for that call before launching code that fiddles with that data
i get error when that code launches async and searches a null list
 
look at console
 
you could link the subsequent calls to the first call's promise resolution
 
Ace
4:48 AM
console tells me an ajax call is running still
and code returns error that was searching on a null list
@hsimah how?
 
fetch('db/endpoint').then(res => {
    dothing(res);
    fetch('my/second/call').then(otherres => {
        dootherthing(otherres)
    });
} );
something like that
you could format it better but I am writing in chat so that's what I came up with
 
Ace
howabout this?
$('#SQLS').css("background-color", "red");
                    $.ajax({
                        type: 'POST',
                        url: GymResults,

                        data: $('form').serialize() + '&' + $.param({
                            muscle: name,
                            weight: document.getElementById("W" + name + (i + 1)).value,
                            reps: document.getElementById("R" + name + (i + 1)).value,
                            type: "Single"
                        }),
so an element in the page is colored 'green' it's letting you know you can submit things to the DB
when you DO, the element turns from green--> red UNTIL the ajax call finishes
 
5:23 AM
o/
 
\o
 
5:36 AM
Is this code set up fine?
<a href=""target='_blank'> <button style="width: 260px;height:44px;background-image: linear-gradient( to right,#E6DC00 83px,#0059dd 83px, #0059dd 86px, #E6DC00 86px, #E6DC00 174px, #0059dd 174px, #0059dd 177px, #E6DC00 177px );cursor: pointer;  "> </button></a>
 
Ace
most of us dont code that way
it's hard to tell
 
it's syntactically correct, yes
That's all I can say about it, aside from telling you for the nth time to use classes to style your elements
 
Ace
or atleast JS
 
no
 
Ace
YES!
 
5:41 AM
I would argue with you, but a) it's too early, and b) in the year of the lord 2017 people all of a sudden are fine with packing their styles into JS as well for some reason. So, fine, roll with it
 
Who wants to see something I made? A show of hands.
 
Ace
@GNi33 lol
okay
@svgcoding honestly no because you dont code like most of us in this chat
it looks terrifying
 
So, what'd think?
 
Ace
when you click on it again
no, just add more features
and properly code man
you dont want to waste time coding horribly, so learn more JS
 
add more features like what?
2
 
Ace
5:50 AM
well, things like buttons
'play' 'next' 'stop'
'loop'
 
This one is a little different: jsfiddle.net/hdpdnk94
You mean like this: jsfiddle.net/nvb5k20j
I know how to do those buttons.
These are all of them, unless you know others, and if you do, please tell. jsfiddle.net/nvb5k20j/1
I would opp for an SVG playbutton instead.
 
6:09 AM
Heyo
 
6:45 AM
god damn
testing my site - nothing works in edge or firefox
turns out they dont like invalid parameters in a fetch call
 
@hsimah May I ask you a quick question?
You might not be able to answer it though.
 
just
ask
 
What would be the best way to move a playbutton in the middle of an SVG?
https://jsfiddle.net/cy8v6657/1/
<svg width="238" height="238" viewBox="0 0 238 238">
  <rect x="0" y="0" width="238" height="238" fill="blue" />
  <rect x="7" y="7" width="224" height="224" fill="black" />
  <rect x="14" y="14" width="210" height="210" fill="red" />
  <rect x="21" y="21" width="196" height="196" fill="black" />
  <rect x="28" y="28" width="182" height="182" fill="yellow" />
  <rect x="35" y="35" width="168" height="168" fill="black" />
  <rect x="42" y="42" width="154" height="154" fill="orange" />
  <rect x="49" y="49" width="140" height="140" fill="black" />
 
@svgcoding If you are still at it, you need a different hobby.
 
Margin?
 
6:58 AM
Google
6
Q: Centering image with SVG

SomeKittensI have the following image in my .svg file: <image xlink:href="developer.mozilla.png" x="50%" y="50%" height="62" width="71"/> I want it display in the middle of the page, but it seems that the upper left corner is in the middle. How can I get the center of the image to display in the center ...

 
It'a a button, not an image.
 
@littlepootis Can that be done via html?
Is there an html way to do that?
 
what
no
probably
just... inline the css
 
not if it's going on blogger.
 
7:15 AM
What kind of developers / product managers even work
for actual banks
I don't think they can even fucking make a simple hello world in ENGLISH :@
 
that's because they need to be able to do them in COBOL
 
Gah, I just want to store my money under my pillow
but that's Illegal
 
Ace
lol
shrek issues
 
Not shrek issues, I was just able to bypass my banks password trial security by waiting 3 months.
They actually ask you to goto bank to reset your password, however, waiting works!
 
huh? so now you don't have to reset the password or what happened?
 
7:25 AM
@GNi33 Now I don't have to
I just tried wrong passwords for an year and was able to guess my old password (this is the second bank I have used that falls for the same issue)
 
haha
 
I am guessing they have a variable / store / state somewhere thats either getting cleaned (respectable) or the documentation is completely out of sync with features (most likley)
 
Done!!!!!!!!!!
<div id="svg-wrapper" style="position: relative;width: 238px;height: 238px;">
<svg width="238" height="238" viewBox="0 0 238 238">
  <rect x="0" y="0" width="238" height="238" fill="#38761d" />
  <rect x="7" y="7" width="224" height="224" fill="black" />
  <rect x="14" y="14" width="210" height="210" fill="#1155cc" />
  <rect x="21" y="21" width="196" height="196" fill="black" />
  <rect x="28" y="28" width="182" height="182" fill="#38761d" />
  <rect x="35" y="35" width="168" height="168" fill="black" />
That works.
 
Still ignoring everyone's advice I see.
 
Still learning.
 
@BenFortune I have a quick question if you don't mind.
 
I do
 
He'll ask anyway
Hopefully
I need luls
 
Should the </div> tag be placed before audio, or in-front of it?

  }">
 </button>

</div>

<audio id="player" preload="none" style="display:none;">
<source src='' type='audio/mpeg'/>
</audio>

</div>
 
@BenFortune who?
 
7:51 AM
@ShrekOverflow svg
 
I ignored him
 
Shouldn't really be ignoring as an RO :P
 
Oh yes :|
its painful though
 
Anyone can answer.
Any of you.
 
@svgcoding please learn how to code or hire someone to code, we are not here to offer free help if you are not willing to learn, if you don't understand if </div> tag be placed in front or etc, you really need to learn HTML / SVG / CSS from scratch, and any amount of help we will offer will usually end up in us writing code for you for free.
 
7:55 AM
No, because I was told to keep that part away from the rest of the code.
@ShrekOverflow Do you want to help me make chess? codepen.io/finnhvman/pen/xXpzVN
As a project.
 
Thats connect not chess.
 
@ShrekOverflow And then we can do checkers after that.
 
Stop trolling.
 
@ShrekOverflow No kidding.
Do you think it could be done?
Chess?
Possible?
 
Possible in terms of what?
 
7:59 AM
Maybe in a way that the computer would do any random move.
 
In terms of him not coming here every 5 minutes
 
I only do when I have questions.
I'm going to take a break.
 
The cat in the AirBNB sat on my computer
@svgcoding Nope.
 
I'm not going to take a break?
You want me to stay?
Stop Trolling.
 
Please stop trolling right now.
 
8:02 AM
pure css modal popup. any disadvantages?
 
@snow not integrated with SYstem
keyboard integration will be almost non-existent
use dialog api
 
you can listen the keyboard event and trigger close
 
@snow that won't work on a phone
or touch
dialog API handles that
you can customize it with CSS
 
it does on my android
what about backend? could there be issues there?
 
If you're trying to make a pure CSS modal, you already have issues
Mental ones
 
8:12 AM
pure css modal?
speaking of yolo
 
8:24 AM
@ShrekOverflow No FF, No Safari, No IE?
 
@GNi33 Shim it
 
and no mobile browsers? talk about what not to use at the moment
 
I'd still use Dialog
and shim it :P
way better than a pure CSS modal that I can write
tbh
 
eh, I'd have to implement it without dialog anyways
may be future proof, but seems like too much of a hassle atm. I'll need to look into it though, didn't know about the dialogElement
 
What I'm going to say might sound very misogynistic on the surface, but man, male clients are so so much better
 
8:33 AM
#sexism
 
In general, being much more understanding of things that happen without our fault
 
brb, I'll report you to tumblr
 
why is deploying applications so complicated i feel like i was having less trouble when coding these stuffs ;-;
 
depends on a lot of factors
 
8:42 AM
lol i went through that today
 
What's complicated about copying files?
 
Ugh I really need to remember to push my stuff to remote at night
I always forget
and then I cant slack off at work doing side projects
 
well this is my first time deploying something
and i am not even able to connect to my mongodb server
-_-* its irritating when i keep getting connection refused
 
@AtharvaPandey Where/how are you deploying it?
 
ohh I have this mongodb on another which is our database vm we keep all our database their and my source code is in controller vm where we keep our source code so I will deploy my app from this controller vm but before that it is not even connecting to mongo
 
8:57 AM
@GNi33 Google has a shim for it
 
ah, nice, couldn't find it
 
I can't believe I forgot how to do something.
 
this room is so lucky for me huehue I did it :) @BenFortune actually in my mongo.conf i added an extra . over 0.0.0.0
 
this sucks.
 
8:58 AM
@ShrekOverflow ah, I searched for shim. Dialog is used in so many different contexts, it was hard to spot something good
 
@GNi33 I found it when using MDL
 
I dont even know what is shim
 
it is a really good though API Imho
It's exactly how I'd design an extensible Dialog
(except using Promises)
 
yeah? I'll read the docs in the evening
 
function onShow(resolve, reject) {
}
 

« first day (2553 days earlier)      last day (2378 days later) »