« first day (1629 days earlier)      last day (3319 days later) » 

Owl
8:04 AM
ok thanks for the feedback, I'll go make coffee.. have a nice day all *bye
 
Mornin'
 
@argentum47 ?
 
ASR
8:25 AM
Hi all this is my fiddle:

http://jsfiddle.net/6wft33d7/

I want this type of functionality http://www.ovariancancer.org/, the problem is in my div with the class event_content
I have to show limited content, once it is crossed it should hide and whn I clik on + image it should display
 
8:47 AM
@RahulDesai My speed of coding is so lowww... like a person with 30 IQ
 
Going home in : 12 minutes and 42 seconds
 
@argentum47 charge your batteries ;)
 
like Crank2 ? :D
 
;D
havent seen that movie, but yeah
;)
Someone beat me with the same answer by 1 min
I am slow too :(
so I ended up deleting mine
 
DON
How to bind datepicker on dynamically created table cells
 
@Neil nice
 
DON
tr = $('<tr/>');
tr.append($("<td />").html('<input type="text" id="edit_item_date" name="edit_item_date" class="datepicker" >'));
$('#table_id').append(tr);
 
you should build a Machine that shall type any known answer for you :P and delete when downvoted :D
 
DON
9:00 AM
lol
 
@argentum47 I though that was exactly what humans did?
 
JS question.
Imagine I have an array of functions and I want to call them all. Do you see something prettier than
functions.forEach(eval.call, eval.call)
?
 
@JanDvorak but speed ?
 
@argentum47 humans are better at synthesising valid english sentences
@dystroy eval.call?
 
9:04 AM
@JanDvorak just a shortcut for Function.prototype.call
eval is just the shortest function name I thought about
 
Why does forEach get two arguments?
 
to get the correct context. If not I think I would have to do functions.forEach(eval.call.bind(eval.call))
But it's hard to think about this so I'm probably missing an obvious short solution, that's why I ask
 
can't there be an object like var ListofFunctions = { func1: ref_to_foo(), func2: ref_to_bar() } and then functions.forEach(function(f) { ListofFunctions[f]() }) . I dunno if that makes sense
 
TIL forEach took a second argument. Looks good to me then.
 
It's an array
@JanDvorak It works, I'm sure of it. But it looks verbose (and unclear) for the goal
I'm not sure such a question would be wellcome on codereview
 
9:08 AM
ES6? functions.forEach(f=>f())
 
no ES6, of course
 
functions.forEach(function(f){f()})
 
not fun or pretty enough :)
 
not pointfree, but very readable and it might even be shorter
 
it is shorter (I just realized that)
 
9:11 AM
I just appended on an element with .append() and the result element was a child. How do I append on the same level?
 
@StevensHaen you append to the parent
 
@FlorianMargaine I'd like the element to appear right next to the other one
 
@dystroy Any chance there's a primitive in underscore.js? :-)
(ofc, in oCaml, ($()) )
 
(in lisp, funcall)
 
@JanDvorak I don't know, I never used underscore.js (apart in answering a few question on SO)
by the way...
functions.forEach($.call, $.call)
 
9:16 AM
:-)
 
the shortest one for now...
 
not as readable, though
maybe
 
i didn't know $
 
$.each(functions, $.call)
 
ow, jQuery $
 
9:18 AM
:)
 
what's the context provided by $.each?
 
the value, that's the trick
 
oh. makes sense
 
OK, I knew there was a short, pretty and stupid way :)
 
you are awsome :D
 
hello. SOmebody worked with localStorage?
All values are saved like strings?
 
yes
 
oh, that means i have to turn "0, 1, 2, 3" into [0, 1, 2, 3] :)
 
use JSON
unless you mean recovery of existing data, in which case splitting by comma should do
 
I am saving an array of integers in localStorage. Then when I open my app i need to load it from storage again like array of integers :)
 
9:54 AM
If i buy a book for kindle, it should sync across all my devices right ?
 
@darkyen00 I don't think your smart fridge can tell the difference
 
@JanDvorak then why the eff amazon says : Deliver to <device name> when buying ?
 
I'm just asking what "all devices" means
 
my ipad, iPhone, android
i am buying like 4 good books :-)
 
:) so many devices.
Nevermind, does localStorage.setItem() rewrites previous value?
 
10:01 AM
yes
 
Guys, is RegEx the most efficient and fastest way to fetch a part of a text from huge text?
I look at it as a viable solution.
But, can we do better?
 
@RahulDesai not always.
 
Any good programming book suggestions ? [I'd still like to read some]
 
@RahulDesai definitely not always
 
@RahulDesai You often don't want to load a huge text as a string to begin with
 
10:04 AM
fuck it. any good book suggestions ?
 
@darkyen00 Bible
 
@JanDvorak Is there a better option?
 
@JanDvorak Non Fictional
 
@dystroy Its for parsing a file.
 
What ? You don't usually parse with regexes
 
10:05 AM
@darkyen00 Still applies
 
Doesn't applies
 
Looks like a constructive argument is taking place
 
HI all
 
@darkyen00 Satanic Bible
 
No
 
10:06 AM
@dystroy Then whats the best for parsing?
 
@darkyen00 Sure you won't like Origin of Species then either? :-D
 
@RahulDesai It's very case specific, your question is much too vague
 
there is any slide show plugin available with tooltip information about the image
 
Okay Books with fields : Science & Technology, Programming, Philosophy, Human Psychology
 
@darkyen00 Bible fits three of these :-D
 
10:07 AM
One barely
enough.
 
@dystroy There was a question posted here where the guy is parsing an HTML file with PHP and he needs to get a hard-coded JS variable out of it, so I thought about RegEx.
 
I will find my way.
 
Hey guys, you should really close this question, the answer doesn't make it better!
-1
Q: How is CSS applied to HTML?

jbailie1991While there are a few questions with a similar title to this, I'm not interested in details such as how ordering affects the process etc. What I want to know is, when an html file has a link to a stylesheet, what happens behind the scenes? How is the CSS parsed? What language is used? What is th...

!!afk eat
 
10:26 AM
in the .done function after the ajax call, can I create another $.ajax?
 
@JanDvorak I bought The Elegant Universe & The Grand Design
 
snippet helpful when writing long answers
 
10:42 AM
@argentum47 There is no better imitation that could replace that code as is
That's not a compliment, just a pedantic way of saying "Define 'better'."
 
:D , I mean doesn't it feel a little bad ? it works but it doesn't look good. The thing I am trying to achieve is a logout link in my <nav-bar>
better meaning cleaner
 
@argentum47 You could just make it one module if you like
It would certainly be cleaner, but you may like the separation of responsibility
Though granted, maybe your navbar is doing more than you show
You could move more of the logic into the LogoutService
 
If you have a service made on purpose for that task
It's more of a direct action on logout rather than a side effect (which otherwise might merit separating the logic)
 
ok, I have a service written though ...
 
10:53 AM
@argentum47 Yeah, I meant that you should add the logic in LogoutService, the one you already have
 
ok. I understood.
1 more thing, I presently have a products.html page and a ProductsCtrl which is showing the list of products. I have thought of adding a filter on the left hand side, like (.col-sm-2{ filters} + .col-sm-10 { list_of_products } ). the filters might make a server side request if needed. how do I approach this?
 
You mean the filter might request more products to "fill up" the page?
 
like I have 50 products , and there are categories for each product. so I might want to filter by categories or price or location.
 
Hey guys, i am building a canvas game, so all visuals and game logic are made with javascript. How would you separate visuals from game logic? Some general tips?
And yes i am left to mix visuals with game logic :)
 
wow! There's christian metal aswell apparently
I just can't see how those 2 words can go toghether
I'm done with this world
@Vlad how could you?
 
11:02 AM
I am working in a JS engine called Phaser and it has these States which have by default, update(), init(), preload() shutdown() functions.
You can consider them as Screens
So in init() and create() you add visuals like buttons, sprites etc... but not sure how to sepoarate game logic in the same screen :)
ok maybe too general question
 
@towc there's loads of it, and I don't see why it wouldn't go together?
 
@GNi33 something is christian and peaceful, and makes you love others and such, whilst the other usually involves a praise to satan, and pumps the adrenaline and such.
anyway
 
wow
christian and peaceful. yeah. haha
those two words are pretty weird in one sentence, apart from your other point that is completely wrong
since when is metal in general "praise to satan"?
or in when time did it "usually involve" that?
 
Does this question make sense or not ?
0
Q: Javascript closure variable retention

user2463391I am facing a strange case of closure. In the following code snippet, defaultConfig is maintained as a closure variable even though it has no use left once test has been initialized. To insure that config contains only copies of defaultConfig's members, I have used slice to process its elements, ...

 
I like the effect on the top.. its like a progressbar , sadly going backward
 
11:17 AM
Perhaps, you can answer this guy's comment? http://stackoverflow.com/questions/29407553/search-html-for-a-hardcoded-javascript-variable-with-php/29409054?noredirect=1#comment46993386_29409054
Its about what we were talking about earlier if RegEx is efficient enough.
 
@RahulDesai This isn't parsing. That's just extracting a token easily identified by a pattern. For such a use case a regex is very efficient.
 
@dystroy alright :)
@dystroy and fastest too?
 
In that specific case and without resorting to low level code, yes a good regex is usually the fastest tool
 
@dystroy He needs to re-word his question for it to make sense. He wants his code to work a certain way and doesn't understand why it's working that way :(.
 
11:21 AM
Regexes are fast by design. If you don't use sick things like lookbehind or back references it's hard to beat them
@GrantWatters That's what I think. Can you comment ?
 
I see.
 
@dystroy .indexOf('.') is still faster than /.\./. ...
 
@JanDvorak yes, but that doesn't match what I would call a pattern (like in the linked question)
and when you use a correct regex engine, it's almost as fast
 
What does that say about javascript's regex engine?
 
If somebody's looking for a short interesting technical task involving real JS abilities, I'm always looking for hints on the memory consumption of Miaou (note : it might come from outside of the JS objects realm)
6
@JanDvorak not a lot : as it doesn't try to deal with complex regexes, it's almost as fast as indexOf (at least in V8) for static string searches
 
11:29 AM
@dystroy is the build fixed yet? ;)
 
@GNi33 what build ?
 
can't seem to get it to run locally
 
!!nudge 12 pasta
 
Florian said the build (vagrant, puppet and whatnot) is broken
 
@towc Nudge #3 registered.
 
11:30 AM
I'd appreciate if somebody would find my announcement worth a pin
@GNi33 it's always a little tricky to get all the iojs+pg+npm+etc. stuff running but there's no problem in the build itself (make based)
 
oh, not a room owner anymore. somebody else needs to do that
 
Hum... I wasn't clear... I mean the browser side memory consumption !
 
@dystroy yeah, I gotta look into it and where it's failing
 
TBH it seems to be very painful to correctly install iojs so that npm doesn't crash...
 
I love the hover animation here: unindianfilm.com/comingsoon
 
11:33 AM
but, theoretically I just need to run vagrant up and the setup should take care of everything else, right?
or do I have to manually run some commands / shell-files after that?
 
@GNi33 Hu ? Even I can pin it. I'm surprised I would be a room owner and not you. I don't even have time for the room meetings :\
 
I haven't been around much lately either
 
@GNi33 There's the vagrant solution, I'm not sure it's up to date (it's maintained by @FlorianMargaine). And there's the whole standard installation, the process I'm using myself
 
oh, is your way documented?
 
If you have a running iojs+npm installation, miaou is almost running
BTW, to test the browser memory problem, you don't need a miaou server
 
11:35 AM
that shouldn't be the issue, yeah
 
once iojs is installed, you have a lot of small things to install (uglify, sass, redis, etc.), then pg (there's a doc) and you just have to run make and start.sh
!!afk 10 minutes
 
shouldn't this all be handled by npm?
aside from pg of course
 
Installing uglify, redis & co ? I don't think so.
As for the make and the start, it could be hooked on npm but it isn't today
 
ok, I'll have a look into it
thanks so far
 
@towc nudge pasta
 
11:42 AM
@CapricaSix you're the perfect cook
 
You can't spouse a bot. Or was that discrimination removed in Italy ?
 
12:00 PM
@dystroy No, the italians are very conservative when it comes to marriage between a man and a robot
 
Yes, that's what I was afraid of
 
Try Belgium.
 
room topic changed to JavaScript: Giant Egg-Giving Bunnies! : Read this: rules.javascriptroom.com. Before asking inform yourself on the XY problem goo.gl/taIqf | WATCH: Developers, entrepreneurs and depression: vimeo.com/78419167 [cereal] [ecmascript] [es17] [javascript] [peter-programming] [we-so-excited]
 
Hum. I don't see any convenient way to combine userscript bots (in whatever form) with a strong CSP in miaou :(
 
CSP === Content Security Policy in this case?
 
12:07 PM
yes
 
here's something: if the multiverse theory is correct, wouldn't it mean that there would be a universe in which it wasn't correct?
 
what about my filter :(
 
Circus Sales Protester
 
@GNi33 I use it as a last resort protection for the users in case somebody finds a way to inject some javascript
 
@towc Why would you think that?
 
12:08 PM
Die you stupid hover-bug!! O___O
 
That's clearly a paradox
 
gif from Oliver Salzburg was moved
 
@towc Though in your defense, I'm sure a multi-verse exists where I'm high right now and I believe you made a thoughtful post
 
I mean, that would mean that there would be a multimultiverse and so on to not make a contraddiction
getting to infinite multiverseceptions...
 
multi-verse theory doesn't claim that the number is infinite
Nor that every possible universe exists
 
12:11 PM
And there are many types of infinites... infinite doesn't mean "holding anything you can think of"
 
@Neil not at this point in time, but in some point in time
 
Trivial example : the set of multiples of 3 doesn't contain 4. Or π. Or a turtle.
 
@towc See the above example
 
and I'm talking about maybe a multiverse containing just 2 universes, and a multimultiverse containing just 2 multiverses and so on... everything's finite
 
Hi everyone,
I'm trying to create a "floating effect" where a bunch of elements float around and bumps into each other (like this : http://i.imgur.com/Tzi5k6t.png ).
I don't know where I should look into, and don't know much about canvas. Do you have any resources or live example of what I'm trying to accomplish that I can tweak to fit what I need?
Thanks a lot
 
12:13 PM
It's turtles all the way down...
 
I guess so
 
I see a multi-verse as being more like a gigantic galaxy
A galaxy can't contain a mini-galaxy for a number of reasons
 
could you name one? I can't think of any
 
Unless you want to start calling a solar system a galaxy, but you're just splitting hairs
 
how about the multi^ω-verse?
 
12:16 PM
there's no reason it shouldn't exist
 
I've heard the weird theory that atoms are really their own universes, and as fascinating as that is, it is simply not true
 
That's not a theory, just an image for children
 
I mean, we have imaginary numbers, then we have imaginary numbers of second degree (j = sqrt(i)) to define other dimensions
we could go on
the thing can be formalized
 
@Neil how do you know?
 
@KendallFrey Absence of proof is not proof to the contrary
 
12:17 PM
if the space continuum is real, atoms may aswell be other universes
 
@towc sqrt(i) = sqrt(1/2) * (1+i)
 
Otherwise invisible unicorns exist
 
@towc j*j !== i
 
can't remember the formula...
 
@Neil Assumption is not something you can do in physics
we don't have a TOE yet, so you never know
 
12:18 PM
what about tangent universes ??
 
but you could get into further dimensions just by repeating the same thing
 
@KendallFrey Sure it is. However, this isn't physics, this is philosophy
 
sqrt(r*e^phi) = sqrt(r) * e^(phi/2)
 
how did you get to j again?
 
@towc i^2 = j^2 = k^2 = ijk = -1
@Neil QM is full of philosophy
 
12:19 PM
we have no proof that a mini-universe exists, therefore for all intents and purposes to the scientific community, they don't exist
@KendallFrey I call bullshit on that one
 
what was j then ???
my childhood has been destroyed
 
@towc no more dimensions, complex numbers are closed under algebra. sqrt(i) = sqrt(0.5) + sqrt(0.5)i
 
@towc sqrt(-1)
@Neil We don't have proof that string theory exists either
 
@KendallFrey but I remember j wasn't the same as i...
 
12:20 PM
@towc it's not
 
@Neil we don't have a proof we exist
@KendallFrey how do they defer then?
 
@towc I think therefore I am
 
-1 = sqrt(1), 1 = sqrt(1), 1 != -1
 
In philosophy, the brain in a vat (alternately known as brain in a jar) is an element used in a variety of thought experiments intended to draw out certain features of our ideas of knowledge, reality, truth, mind, and meaning. It is based on an idea, common to many science fiction stories, that a mad scientist, machine, or other entity might remove a person's brain from the body, suspend it in a vat of life-sustaining liquid, and connect its neurons by wires to a supercomputer which would provide it with electrical impulses identical to those the brain normally receives. According to such stories...
 
@KendallFrey We have just as much proof as the general theory of relativity + quantum theory put together
 
12:21 PM
@rlemon that doesn't really work
 
@Neil I don't know what you're talking about, we can't put those together
 
@towc you think it doesn't work, therefore you are!
 
If there is no way you can test your theory, it is useless, though a lot of scientists want to believe in a unified theory
 
\o/
 
@KendallFrey And yet they both accurately depict the universe, weird
 
12:22 PM
@KendallFrey so it's just the other "side" of i, right?
so, this is my theory, an equation to rule them all
0=0
this means that 1=1, and proves that you can get something from nothing
 
@towc Mind. Blown.
 
then the rest can be shown by other equations, so it may aswell be possible that the universe is just the process of solving 0=0
almost everything I've learned in physics are balancing equations, all of which can be derived in some way by 0=0
think about it tho, it's really powerful
 
1=1 means things remain the same, in ideal conditions. but in reality everything loses its value over time except wine
 
So wine=wine
 
yeah.. \o/ :D
 
12:26 PM
Unequivocal proof that the italians had it right all this time
 
actually wine >= wine
 
@argentum47 maybe that means that there's a specular universe to this one, but you still need to keep balance with other 1=1s in this universe. Ever heard about conservation of energy (and energy can be transferred to matter), newton's (can't remember if second or third) law: "to a force equals an equal and opposite force", just like adding 1 to both sides of the equation
 
@Neil yeah, um, no
 
third law
 
I think that this little theory has it's potential
@argentum47 thanks, right
 
12:29 PM
This looks like a drunken conversation in a bar... @towc is holding his glass of wine while speaking, convinced he just invented something that seems to make sense in the alcohool vapors...
 
this way everything can be ported into mathematics: space continuum can exist (infinite series), infinity can't be reached but can be defined...
@dystroy bars: where all great ideas start
 
lets get drunk on a thrusdaayyy..
 
@Loktar @FlorianMargaine rebecca.blackfriday
tomorrow is a holiday for me, today is my friday
 
seriously tho: can you disprove this theory? Can you show that processes are only virtual and not real?
 
ow ftomorrow is fridaya
 
12:32 PM
or that they create another reality?
that simulations are only on your screen and don't make a whole new reality (not as we see theirs)
 
I create my own reality daily.
 
this may also explain why we think we have a coscience: our brain is making processes
 
@towc so dyslexia is just race conditions?
 
why? how? wut?
 
@rlemon this might be partially true without resorting to "theories"
I know the parallelism of my thoughts sometimes make me write words in the wrong order.
(This and also a common case of not speaking English very well)
 
12:37 PM
:D
 
This could explain yoda's weird speech, too
 
I love you guys, but sometimes I don't understand anything that is being discussed :P
 
Watch Star Wars
 
or take another glass of wine
 
dyslexia yoda does not have
 
12:41 PM
(btw, I might be the only one here in this room having drunk good wine today)
 
I think there is another term for that actually
 
yodaism ?
 
37
Q: What term can be used to describe Yoda's speech?

JonWhat is Yoda's speech called? Is there a particular name for it (such as "dangling...")?

 
That was interesting (well, midly interesting but that's better than uninteresting)
 
ASR
we are using Helvetica,Arial font styles Is that the best font recommended?
 
12:52 PM
depends on usage
 
I like Droid Sans
or Roboto
Ubuntu is a really nice font but windows doesn't render it as nice
 
ASR
@JanDvorak what are the best font styles for a web page?
 
@ASR depends on usage
 
What about Noto Sans? Noto sans is nice. Also, monoco
 
so sleek. so clean
 
12:55 PM
not too bad
 
Ubuntu looks nice on the preview, but when you use it in a real project it always looks like crap on windows
 
@rlemon -1 do not like
 
ubuntu is pretty lame imho
 
yea well your font is stupid too okay?!
 
yeah well I'm telling mom!
 
12:58 PM
I don't even have a font
at least not a published one
 
Hai
 
@g3mini 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.
 
Anyone in here familiar with Polymer?
 
Should I rename myself to v1rgo?
 

« first day (1629 days earlier)      last day (3319 days later) »