« first day (1868 days earlier)      last day (3066 days later) » 

12:10 AM
reactiflux moved to discord
 
yuk I only get get one github gh-pages across all my repos?
 
no?
wait, yea
 
discord is cool
 
@SuperUberDuper You can make a site for each repo, plus one for your user
 
12:22 AM
Hello guys, I have a very broad question regarding HTML/JS. Is anyone free to help ?
 
@Paramone Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
I'd like to 'catch' what happends when I click on a page's thumbnail. It basically 'changes' the sites look without the actual link changing.
Anyone have an idea on how I could do that?
 
People who're good with css (like @rlemon): I have a container with children, each one being a container for more grandchildren. I want to flex the outer container, but also the inner ones; so sort of like the children are table rows, and grandchildren are columns.
I'm too stupid to do that.
 
I don't know flex
if you give me a visual example I may be able to do it without
 
It's the classic form tbh
I want them aligned :(
 
12:29 AM
how come things like <link rel="import" href="../bower_components/polymer/polymer.html">
work locally, but not on gh-pages?
 
@Zirak learn 2 html
use labels not spans
also not p, that makes no semantic sense, use divs
 
You can't link a label to two inputs
"no semantic sense, use divs, the most generic element of all"
 
because it is a generic container
 
I used p because each one is an entity of its own, and it looked okay.
 
p is for paragraphs
those are not paragraphs
 
12:31 AM
It's pretty paragraphic
But who cares
 
lol
 
I started going down the display: table avenue before wanting to gouge my eyes out
 
crl
use <li> (without <ul> ofc) :p
 
Why on earth would I do that
 
crl
kidding
 
12:32 AM
You're just stupid
Go away
I don't like you right now
 
crl
those are known facts :)
also flexbox, sry just wanting to say it
 
I'm trying to do it with flex, no success so far
 
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
form, /* just fixed width the container */
form p {
  display: block;
  width: 100%;
}

form input,
form span {
  display: inline-block;
  width: 33%;
}

form span {
  text-align: center;
}

form p input:last-child {
  width: 32%;
}
 
crl
it should be possible, (some flexbox refs 1 2) flexbox = no moar dirty %
 
@rlemon ew
 
12:36 AM
bite me
:P
you use shitty elements and structure, you get shitty css
 
has a feeling you'd have spewed shitty css no matter what
 
you would probably be right.
but I get results.
 
Who cares
You're useless to me
Perish
 
you love me
next week we should see a movie
 
crl
hold on Z, trying to make your shit
 
12:40 AM
@rlemon Which one?
(ps I'm starting to think of floats)
 
lol
and you said ew to me?!
HA
 
I DON'T KNOW WHAT TO DO
 
USE WHAT I SAID OR LEARN FLEX!
 
I'll use display: table before doing the fucking width: 32%
 
lol
is it tabular data? why not just use tables
 
12:42 AM
It's not really tabular...it just looks like a table
Classic form
 
Is object.freeze performance saavy ?
 
Maybe you'll have a better idea, actually
 
crl
p {
	display: flex;
}
form span {
	text-align: center;
	flex:1;
}
 
I want to display "the value should be between X and Y"
 
I can do this
 
crl
12:43 AM
or I misunderstood
 
otherwise. no
 
@crl That's...pretty good
huh
Is there a better way to display that form, though?
 
ohh so you like him and not me?
pft
:runs and cries:
 
It's really a bunch of:
- input < some crap < input
- input < some other crap < input
You specify a range
waitaminute
No there's no control...
 
crl
p > *:nth-child(3){
	flex:2;
}
that if you want a big last input
 
12:47 AM
So there's no good way
@crl Thanks, you're better than @rlemon. I'll work with that.
 
:(
I HATE YOU! SHUT UP! I'm sorry...
 
crl
hehe
 
Did you hear an annoying buzz in the background?
 
@Zirak nope, looks interesting though
 
crl
took me the last hours to do jsfiddle.net/crl/z8fMr/371, but I can't figure out how to hide that silly dropdown (uikit lib) when you click on it. I don't trust anything using jquery anyway
 
12:50 AM
my friends and I use mumble currently
 
ermm... wow... I'm stupid
so, this morning my phone broke (it's almost 1am now), and I gave it to some guys to repair it. In the meantime I have no alarm
and tomorrow I need to go to school at 8am
everybody in the house is already asleep and they will probably still be asleep when I would normally go to school...
so I can't leave them notes asking them to wake me up...
 
crl
I pretty much wake up everyday at same hour, with no alarm, just sleep and trust your biological alarm
 
@towc Take one of their phones, set an alarm for yourself, return to them when you wake up
 
@crl it does happen to me sometimes, but I just ran 10km, I'd rather not risk it :P
 
crl
or setTimeout in JS
 
12:55 AM
@crl that was kinda my plan
 
crl
lol
 
Also, get a regular (non-phone) alarm clock, will save you some future headache.
 
but how reliable is it? What if my computer decides to update or go sleep?
 
Feb 12 '13 at 18:27, by copy
Linux Tip of the Day: Turn off your computer to wake you up in 7 hours with Deep Purple - Lazy: rtcwake -m mem -s 25200; firefox https://www.youtube.com/watch?v=oIwcUcZWJbI
 
@Zirak yeah, I'll have to do it
 
12:56 AM
1 min ago, by Zirak
@towc Take one of their phones, set an alarm for yourself, return to them when you wake up
 
@Zirak but that's just creepy, they won't be ok with it, trust me
@copy interesting
@copy holy shit you saved my day!
and my next day technically..
so it's basically a wait on the whole system achieved by the command line?
 
It sets the rtc clock alarm in your computer (the one that is connected to a battery) and then suspends the computer
 
crl
I wonder if making my own wysiwyg in react would be good.. github.com/Voog/wysihtml is the best I've found, but don't like too much their complexity, they enforce html rules (basically not put block element inside inline ones etc..) but I don't think it should matter too much, and their api is complex because of that..
 
@copy so cool! Thanks for sharing!
btw, FF?
any particular reason?
 
Whatever browser you prefer
 
1:05 AM
and I'm asking why do you prefer ff over chrome, just as a separate question ;)
you know your shit and always flipped the way I view things, so...
 
let x = (() => {
for (var i = 0; i < 5; i++) {
 try {
  return i;
 } finally {
  if (i != 3) continue;
 }
}
})();
 
crl
firefox maybe less use memory, if it matters, but I like too much chrome's console personally
 
continue “cancels” return
 
@towc I'm using Addons that Chromium doesn't support. Vimperator, Tab Mix Plus, Noscript, …
 
crl
I guess it's more the try finally, the issue, let me try
 
1:08 AM
@copy fair enough
also, vim vs emacs?
 
Both are great choices
 
cool
 
I wonder what else can be aborted via finally
 
crl
(() => {
for (var i = 0; i < 5; i++) {
 try {
  return i;
 } catch(e){}
  if (i != 3) continue;

}
})() //0
 
try { pregnancy() } finally { abort() }
 
1:14 AM
@crl yes, return doesn't throw, so catch won't run; what's your point?
 
crl
not any, I never really used finally, so too inexperienced to say something :)
> The finally clause contains statements to execute after the try block and catch clause(s) execute, but before the statements following the try statement.
 
1:39 AM
morning
 
crl
India?
 
@crl nope
just a friendly way to salute everyone in the room
 
crl
ah ok
damn everytime I eat clementines, I can't sleep
 
@crl lol
how come?
 
crl
vitamin C probably
 
2:01 AM
@towc Haha don't worry about it! Thanks, though
 
didn't know stackechange has a chat! this is a game changer!
 
@PauAI Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
Is there a way to catch all types of thrown exception?
ignore the question there are no object types in js :peace:
 
2:16 AM
@PauAI In Firefox you can do try { … } catch(e if e instanceof TypeError) { … }
 
try {
    myroutine(); // may throw three types of exceptions
} catch (e if e instanceof TypeError) {
    // statements to handle TypeError exceptions
} catch (e if e instanceof RangeError) {
    // statements to handle RangeError exceptions
} catch (e if e instanceof EvalError) {
    // statements to handle EvalError exceptions
} catch (e) {
    // statements to handle any unspecified exceptions
    logMyErrors(e); // pass exception object to error handler
}
 
I'd love to see that in the standard
 
yeah what @copy said
 
me too @copy
 
In other browsers you have to do try { … } catch(e) { if(e instanceof TypeError) { … } else throw e; }
 
2:18 AM
btw does javascript have a standards documentation? I want to use what the world is using
 
yeah, what @copy said
 
@PauAI No, but mdn is very good
 
frt BlueBird allows something similar to this
you can .catch on specific error Classes
somePromise.then(function() {
    return a.b.c.d();
}).catch(TypeError, ReferenceError, function(e) {
    //Will end up here on programmer error
}).catch(NetworkError, TimeoutError, function(e) {
    //Will end up here on expected everyday network errors
}).catch(function(e) {
    //Catch any unexpected errors
});
 
^ main reason I don't use native promises
 
Bluebird has so many extra features and is incredibly fast
I can't see a good reason not to use it
well I can, but you know
 
2:26 AM
hello devs if chrome has canary for its bleeding edge development does mozilla offer one?
 
developer addition?
 
@rlemon cause it's pretty big to send to the client is one major downside
 
1 message moved to Trash can
@PauAI Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com or pastie.org
 
@phenomnomnominal yea, but really no. one image is usually as big as your largest lib.
 
@rlemon one large image doesn't stop the app starting
 
2:29 AM
do I have to do anything to set a cookie with a Set-Cookie header?
 
agreed, but that can also be circumvented with good development
size (today) isn't really an issue as long as you are keeping it sane.
 
@tomexsans, Firefox has more advancements regarding debuging animation easing and XHR replay(live header editing), hope chrome will update soon
 
@phenomnomnominal now otoh, you are working on a much larger site, much more than the average user.
it is unfair to use that as a comparison
(not that you did, but just saying)
 
2:48 AM
@rlemon oh yeah absolutely, and we optimise for mobile hard. We're still using bluebird cause the dev-time benefits far outweight the time cost per user
also we cache our libraries bundle pretty hard and don't take upgrading lightly
 
cards on the table, I'm drunk.
!!afk not here
 
rereads the conversation with added slurring
 
drunk and thinks size doesn't matter?
Canadians obviously have a different kind of drunk
 
for anyone who uses nodejs, does mongodb db insert updates in realtime?
 
3:19 AM
@rlemon Great thread, thanks! Knew about Harlequin baby, but "teratoma" was something I learned about (that you may not want to Google)
 
@SomeGuy rlemon is afk: not here
 
m59
> Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence replaying notifications subject to a maximum time length for the replay buffer.
That is the least understandable documentation I've read to date.
 
Weird.. so this custom dropdown I made I had to write the opening/closing of it totally different when I made it a standalone component and I have no friggin idea why lol
kind of frustrating.
 
@m59 That's when code > English
 
4:50 AM
gud morning all anyone used md-autocomplete
?
 
 
1 hour later…
6:00 AM
hi
 
6:15 AM
@copy it worked!!!! :D
 
it's very sad to see nodejs though being an awesome thing, it's room stays empty.
 
@saaggy18 Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
6:37 AM
> After that it is downloaded every 24 hours or so
Why does it say that?
 
@saaggy18 well, node is just a runtime for javascript so I don't really see why it would need its own room in the first place
there's no V8 or Chakra rooms (or is there?)
 
@ivarni what is chakra?
 
@saaggy18 you may shoot some nodejs stuff right in this very room...
 
@saaggy18 Microsofts JS engine
 
But saying that I cannot guarantee you'd always get an answer...
 
6:45 AM
@deostroll you just kinda demotivated me at the end before even asking any question..
:D
 
Lots of people who hang out here do lots of node, but this time of day/night is usually a bit quiet
 
just be prepared...
 
@deostroll That's not the best resource for now. Please use serviceworke.rs instead.
@deostroll Because it is so. Service Workers are refreshed on a day wise basis.
 
7:07 AM
But why the need for that frequency of refresh?
 
did you read that page? Because the answer is exactly adjacent to that note.
> to prevent bad scripts from being annoying for too long.
 
yeah exactly how does that happen?
 
a service worker sending you push notifications from the background every minute about your mom being bigger than jupiter
 
But if I close my browser, thats done, right...
 
so you are ok with having to lose browsing power for life just because you happened to visit a page which registered that service worker...
 
7:13 AM
So if its designed that way, how does it enable offline experiences...? I mean the worker timed out, I am ditched by my LAN network (say)...how does it help here?
 
If network is not available, the service worker is not unloaded. It is left as it is and permissions are restored.
 
but what happens if that is the case after the 24 hours?
 
same
 
it doesn't refresh?
 
no
 
7:21 AM
0
A: Apply bootstrap form styling to div elements without changing class

Leandro CamiloHow about use JQuery to automagicly add css class to elements for you?

How about no?
 
I'm not sure but try this popupWindow.offset().top.close()abhishekkannojia 7 mins ago
Yea, you obviously can close a offset.
 
user3119231
8:05 AM
Good morning.
 
Good for you maybe, but these people certainly didn't have such a good morning :)
 
user3119231
2 words: fuck you :D
 
8:22 AM
Link shortening service? That response? Sneaky.
 
I didn't expect anyone to actually fall for it :)
 
goodmorning
 
Clicking shortened URLs on a friday is not a good idea
 
user3119231
Clicking any link on friday is a bad idea
 
Imma see if the HTML room falls for it :P
 
8:25 AM
I've got a really interesting thing going on in Git btw, I cherry-picked two commits from a branch onto master. Changed my mind and rebased to delete them. Then did a git pull and now they're back on my local clone but they're not on the remote server
I'm not sure what even
I never pushed
 
hey guys.. I have websocketserver running.. every time I need to redeploy, I need to stop the wss server and start it again, meaning I loose all active connections.. Is it possible to edit a backend .js file and have nodejs refresh the rutines or etc?
 
I must have actually pushed right?
 
user3119231
 
user3119231
Can someone tell me how to box this? blame me if you need to
 
@RonniSkansing I see there are tools for hotswapping in node, e.g. this but massive disclaimer: I've never done it and I have no idea how well it works or if it's insane to do in production. But the keyword you want to google is "hotswapping"
 
8:34 AM
thanks @ivarni I was looking for that word.. makes searching much easier
 
@Maurize Eh, why'd you ping me with that?
Whoa, windows' start menu search field actually learned from my use of it! Just now, it opened Notepad++ instead of ordinary notepad when I typed "Not"
It's taken ages, but at long last, I don't have to click any more xD
 
8:54 AM
Dont make fun of me pls. I just wanted to shared that to you ;)
 
"Repa" ??
 
^
 
Reparation*
meaning repair
I've broked my website playing with the gitignore and the cached of git
 
imo you should write more meaningful messages, like

- i repair that
- i repair this
- i tried to repair that in previous revision
- i honestly tried in this revision
 
Hmm I've got an odd problem
Is anyone using git with GPG to sign commits?
 
crl
9:20 AM
@RonniSkansing or hotloading
 
thx =)
 
crl
9:40 AM
!!mdn selectedIndex
 
crl
why do we need all this stackoverflow.com/a/6150060/3183756, to just retrieve the current selection on a contenteditable..
just want 1 or 2 lines max.
 
contenteditable is horrible
I don't think it's changed much since what, IE4?
 
crl
ah :(, want to make a tiny wysiwyg
 
I would honestly just drop in tinyMCE or something. Maybe better yet look at prosemirror.net. It's terrible to work with if you want to do it yourself
 
crl
9:48 AM
been trying github.com/Voog/wysihtml since yesterday, but I don't like all the rules they want to enforce, I wouldn't really care if the html isn't really correct (like block els in inline elts) just care of matching start/end tags that's all
thanks for the links, checking them
 
Prosemirror is by Marijn Haverbeke so it should be solid
he wrote the Chrome devtools editor
 
crl
they don't support tables though, only downside I can see
 
tinyMCE does, but it might be behind a plugin
I've used tinyMCE since it's the default editor in keystone.js, it works but generates nasty HTML
 
crl
yeah, voog may be cleaner for the html (and they also support table cell merge, doesn't mtter so much though) but it's rigid..
 
or you could of course wrangle with contenteditable, it's certainly possible though painful. I remember spending days fighting it just to make a table-cell editable
 
crl
9:56 AM
ah, ok I trust you, don't want to spend weeks on that.., thanks for the warning :)
 
Hm, by the ay, how does one get into stackoverflow.com/teams/57/javascript?
 
@ivarni Hmm. Can you suggest any WYSIWYG editor that does not create nasty HTML? I need one :D
 
@Sheepy Never seen one. I tried to convince my client to work with markdown but they didn't want to :/
 
ProseMirror?
 
crl
@Sheepy voog ^
 
9:58 AM
Opps. Pity.
 
crl
a shitload of parser rules
 
I've got a mocha issue in a yeoman generator...the tests don't run since its not able to find a lib - mkdirp...does this mean that that lib has to be installed globally?
 
do you know a good place to buy gaming PC components (GPU) today?
 
Yup. Tried voog before. Code is neat, indeed, wish it provides more image and table properties.
 
mkdirp is mkdir -p.
 
10:04 AM
but yeoman cries if I use its default api for the same...
 
crl
@Sheepy for tables, you can do many things, not the resizing right..
images it's better to make the drag-drop/load ourselves, easy to do
 
Hong Kong is a good place. Our computing malls are not as big as China, but we have less fake goods and no tax :D
Because they don't sell oversea, you can also take the chance to visit this vibrant city!
 
>.> why hexchat refuses to connect to freenode today.................
 
Freenode is/was under DDOS: twitter.com/freenodestaff?ref_src=twsrc
 
@Sheepy I meant a web
with black friday discounts
 
10:10 AM
@Neoares Don't forget to add free shipping to USA (I assume). Amazon books are cheap. Amazon international shipping is not.
 
crl
tinyMCE ain't bad actually
they just took over the contextmenu (right-click) bit annoying
 
We are using CKEditor. Also takes over right click; can't help it.
 
crl
there might be a way to disable it, the contextual menu is mostly redundant
 
Well, our content editors love it.
 
crl
10:29 AM
@Sheepy cke is bit less 'cool' for tables maybe
 
so what are you guys doing for 12th Jan ?
 
Is the 12th Jan a special day ?
Ah yes
sorry
 
@DenysSéguret Oh comon !
 
I do nothing, as the customers who care for end of support aren't the ones with whom you have problems anyway
 
haha
I intend to celebrate it by making a codepen that works on ie6
(the website doesn't, obviously)
 
10:44 AM
What day is it?
 
@Sheepy Support for older versions of Internet Explorer ends on January 12, 2016
 
Wonderful! I would have posted it on facebook if I know any friend still using old IE. I am feeling fortunate.
 
!!s/know.+/used facebook/
 
@AwalGarg Wonderful! I would have posted it on facebook if I used it (source)
@AwalGarg Wonderful! I would have posted it on facebook if I used facebook (source)
 
Thanks
 
10:50 AM
yawn
 
Facebook is an international tragedy
 
wow, atom is moving from coffeescript to ES6
 
@Sheepy I know, and I'm from spain :/
 
function onSubmitToJiraDone(dataS, redmineId, datafixId, environment, formData, plainEnv, plainDFID, plainComm ) {
  var jiraID = dataS.key;
  setResults(jiraID, datafixId, redmineId, environment);
Anything obviously wrong with that?
 
@Abhishrek I'll go out and have a drink on a pioneer in web browser history, a true groundbreaking innovation back in the day that formed and shaped the web and browsers that we know today.
 
10:52 AM
@GNi33 yep thats what the codepen will be all about
 
function setResults(jiraID, datafixId, redmineId, environment) {  //the function called
 
and then I'll hope IT BURNS IN FUCKING HELL
 
A letter to grandpa IE 6
you were good in your days, but now you smell worse than a skunk's fart :->
 
IE 7 even moreso
that browser took so many of my hours and probably some years off my life
 
as setResults when called, outputs that all the parameters other than jiraID are unset.
 
10:54 AM
@djsmiley2k Too many parameters. Not all parameters are used.
 
too many?
 
crl
what?? does tinyMCE create an iframe over the content
 
@djsmiley2k please use a param-object
 
@GNi33 k, going ot have to google that
only just figured out functions last night :D
 
it's just one object as parameter, instead of a bazillion others as direct ones
 
10:55 AM
@djsmiley2k cereal taught you functions? wow
 
@GNi33 my new laptop is awesome
 
I guess there are pros and cons, I just really enjoy passing objects a lot more
 
@AwalGarg cereal showed me the light
 
@Abhishrek did you try 3DMark?
 
@GNi33 yeah although i realized the GPU is named awesome
Nvidia 960M
 
10:56 AM
@djsmiley2k looks around... cereal not found... yeah that guy is pretty good
 
we re-wrote my single input page to use functions
 
@GNi33 Yeah. No way having eight parameters is better than an option object. We are not doing Win32 or OpenGL, are we?
 
and once that's working, I'll refactor the bulk page too
 
@Sheepy exactly
 
I presumed I should likely pack all the parameters into something, but hadn't tried to figure that bit out yet.
 
10:57 AM
and JS makes default params a lot more nicer this way imo
just have a default object defined at the start of the func, and extend it by the passed one, done
 
Look at jQuery.ajax. It has many, many options. You only need to pass in those that you need.
And in case you need many - which is quite often - each parameter is nicely labeled in *your* code.
 
crl
 

« first day (1868 days earlier)      last day (3066 days later) »