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

3:00 PM
I only have a Kindle (cause i don't really see a point in carrying 40 books) no books, :-) :D
 
20 bucks says that by the end of the month, you'll be looking for coffee shops to use the internet through your Kindle
 
@Loktar all the good ones cost money
 
!!> 'thegame'.split(/(^...)/).filter(Boolean).join(' ');
 
@rlemon ["the","game"]
@rlemon "the game"
 
@Neil Knowing me, I wont.
I have not used whatsapp for over 6 months, same with facebook.
ps that is moer than a months stuff to keep my mind active :D
 
3:04 PM
my new solution to help vamps that won't quit
var r = 'thegame'.split(/(^...)/).filter(Boolean);
[].forEach.call(document.querySelectorAll('table'), function(t,i) {
    [].shift.call([].slice.call(t.rows).pop().cells).textContent = r[i];
});
overly complex solutions that make them lose the game
 
posted on April 02, 2015 by admin

Hovertext: Now, Subma-Plane, that's a different story... New comic! Today's News:  Do you have yours yet?

 
user1596138
@NickDugger take me with you
 
@darkyen00 Well props to ya if you make it
 
Shall see it, though am sure this will be a big learning experience without googling it.
 
anyone here use ionic?
 
3:09 PM
Mornin developers developers developers
 
@SterlingArcher MORNING
 
wahoo! I am no longer in the red for vacation days!
and only 12 sick hours in the red
 
what are "vacation days?" are they related to this mythical "time off" people "take?"
 
aka "im taking a vacation day to fix an issue with my bank"
it was one hell of a vacation
 
user1596138
Someone opened "God's church of cannabis" in the unincorporated town just town the highway from me
 
What if I got `<div id="price">200</div>` and I'm getting it's value to an object using `$('#price').text();`
The final object key is looking like `"price": "200", ..."` but I want it to be `"price": 200, ...` instead, so I can do some calculations like `myObject.price += 50;`
At the moment if I try to do that, the outcome wil be `20050`instead of `250`
So how shall I solve it? Is there anything else like "reverse .stringyfy()" or something?
 
user1596138
<var id="price">200</var>
 
user1596138
What
 
@Frondor parseInt and parseFloat (check MDN for deets)
 
user1596138
Oh wait var is a real tag lol TIL
 
3:21 PM
Of course
@ssube I'll check that
 
jQ does type coercion if you call $('#foo').val(), but not with .text()
so you're getting back a string (hence the surrounding quotes)
since "str" + num prefers the type of the left-hand operand, you get "str" + "num"
 
@ssube uhh... no.
 
@ssube parseInt($('#price').text()); worked like a charm! Thank you very much
 
radix
pls
 
MLM
@BenjaminGruenbaum I didn't really know what a WeakMap was so the second half of the answer is where I learned why the example was relevant. But the first half answers the question directly which if I knew what a WeakMap was in the first place, would of been great. I understood and learned something, nice answer
 
3:26 PM
little minigame to play in the freetime online suggestion?
 
@towc 2048
 
@JanDvorak it's been a while since I've played it
 
@MLM see my last edit - does it help?
 
@towc try the fibonacci one
@JanDvorak how so?
 
@towc sonny 2
 
3:30 PM
!!> 1+"2"
 
@JanDvorak "12"
 
@rlemon hehe ^^
 
so many hours on that game
 
good morning nettlegems
 
I'll tell Krin :)
 
user1596138
3:31 PM
@BenjaminGruenbaum nice
 
MLM
@BenjaminGruenbaum Yes. "This works - but it has a memory leak - we now keep track of every single library object passed to the function." maybe add "which keeps the library objects from ever being garbage collected"
 
@MLM Good idea - done
 
And a short personal story about how much WeakMaps mean to you.
j/k, I like it. I also learned something.
 
@BenjaminGruenbaum tell him to make a sonny 3
and release it on steam :D
 
MLM
@BenjaminGruenbaum Spelling mistake: "unhanded rejection hooks"
 
3:37 PM
ty, fixed
 
yay, beaten 2048 first try after 8 months :P
those are the real satisfactions, who cares about Ph.Ds?
 
lol @Shmiddty
 
I meant what I said!
 
@rlemon I don't really like those kind of games, but thanks for suggesting anyway
 
The fact that you actually explained what a WeakMap was, how it functions, and how it is different from a Map was very helpful for me
 
3:44 PM
Thanks :)
The question is good
 
I should learn about garbage collection and such
 
It's pretty simple, once there are no references to a variable it's removed from memory
At least, that's what i remember from java. Not sure how JS does it
 
by context in 2 years my idea is that garbage are variables that are still in the memory, but you don't use them anymore, and are harmful because they occupy memory
I never did any research on it...
for example: when you initialize a local variable at the beginning of a function and you end the function, the variable is still in the memory, but you can't access it... is this right?
or items that you remove from an array
 
not really; objects are retained, not references to them
 
how does this work woorank.com
 
3:53 PM
@towc locals are very often on the stack, not the heap
 
An activation context might be garbage, but any self-respecting GC should know when it can delete them with their activation
@ssube not if they are closed over
 
user1596138
@argentum47 "#1 Online Marketing Software for Small Businesses" Well judging from that.. Now very well
 
ok, what is meant by "retained" and what's the "heap"?
 
@JanDvorak which is precisely why closure should be avoided
 
I mean how does it know which technology is being used
 
3:55 PM
performance of methods, even bound methods, is far more predictable and debuggable
 
@ssube reference that they should be avoided?
 
although when I search for stackoverflow it shows
jQuery JavaScript framework
 
@JanDvorak the performance implications?
 
@argentum47 it must have some presets
 
@ssube the claim that later deletion matters
 
3:56 PM
ow.. i see
 
Closures should't be avoided.
 
user1596138
@argentum47 What do you mean? How does it know it's on a nginx server and what js frameworks it's using?
 
@JanDvorak deletion? what's that got to do with anything?
 
yup
 
Closures should be embraced. Get it?
 
3:57 PM
@ssube Why else would you mind about stuff being on the heap rather than the stack?
 
user1596138
@argentum47 It uses headers
 
Stack allocation is much faster and simpler to manage
 
I see..
 
does V8 actually do that, though?
 
You deallocate by moving a pointer - vs having GC cycles, moving things around, several heaps etc.
 
3:58 PM
@JanDvorak closures push things from the stack to the heap, in addition to opening another scope, and so often have performance implications (some non-trivial ones)
 
@JanDvorak in what case?
 
bind is, at worst, more predictable and obvious
 
@BenjaminGruenbaum local variables that aren't closed over
 
user1596138
@argentum47 curl -s -I domain.com | grep Server
 
@JanDvorak if they're not closed over they're put in the stack usually, yes.
 
3:59 PM
@ssube you open another scope in either case. Do you mean an activation context?
 
nice
 
It's kept in a context object - which may be on the Heap, you get a reference to it with a Handle unlike a local which you get a reference to with a Local
 
curl -s -I fiverr.com | grep Server
Server: instart/160

yay
 
@JanDvorak yes
 
user1596138
4:01 PM
Yup
 
@BenjaminGruenbaum I thought the stack frame would count as a context object?
 
or a context of some sort
 
@BenjaminGruenbaum so sync code (e.g. [].forEach()) might not put the closure context on the heap?
 
methods with field access have more predictable, and probably better, performance than closures
 
whats the difference between a Handle and Local
 
4:03 PM
@JanDvorak a single invocation shares the context (in v8) if you have multiple methods and one of them needs to use the closure - then they all suffer the penalty - even if the one that you're actually returning doesn't need it - it's a common leak in node apps - he post I linked to on mrale.ph explains this a lot better.
That said - I'm completely ignorant of how TF works and that might change everything if/when it lands.
 
Reading up :-)
 
@Luggage it's still rather slow - [].forEach shouldn't even allocate a closure IMO (it does).
 
i mean if the function passed to forEach is an anonymous function
that references a variable that makes it a closur
 
this may help me
38
A: Best practices for reducing Garbage Collector activity in Javascript

Mike SamuelA lot of the things you need to do to minimize GC churn go against what is considered idiomatic JS in most other scenarios, so please keep in mind the context when judging the advice I give. Allocation happens in modern interpreters in several places: When you create an object via new or via l...

does anyone want to say "it's so wrong" before I start assimilating the things written there?
 
the easiest way to avoid GC is to avoid new (and factories, factory methods, inline objec tallocation, etc)
 
4:06 PM
> Coming from a ColdFusion background I assumed this would be easy with a Query of Queries etc. however I've struggled with coming up with a PHP solution.
this sentence...
bane of my existance
 
@ssube new is actually very fast and hidden-class friendl
@Luggage yes but _why_would it have to actually allocate anyhing?
 
@SterlingArcher wth is a query of queries? Is it like a murder of crows, pride of lions, gloom of emos, etc?
 
point n6 in there isn't really clear to me (under the title: memory gets allocated when)
> When you perform an operation that coerces to Object like Object(myNumber) or Number.prototype.toString.call(42)
 
@BenjaminGruenbaum it's well-optimized, but not allocating things is still faster :P
 
@ssube most likely a nested <cfquery> tag
 
4:07 PM
It doesn't. that's a case there the closure context could remain on the stack
 
what does that mean?
 
no reference is passed to somethign liek window.setTimeout() that would require it to live longer
 
@ssube the best way to save memory is to make your program a noop
2
 
user1596138
@ShivKumarGanesh that's just a readme and 2 images in the repo?
 
@Luggage or... no context at all :)
 
4:08 PM
@ssube in Coldfusion, you can query some query results with sql
 
A lot of time the trick is to pass the context (this) instead of a closure it's faster.
 
@BenjaminGruenbaum that is ideal, but more practically (only slightly) is to avoid allocations when possible
 
@Jhawins Yeah the readme has all the list of Visualization tools
 
@ShivKumarGanesh stop that.
 
@BenjaminGruenbaum Ok...
 
4:09 PM
what's a noop?
 
@towc no-operation
it's the cpu instruction for don't do jack
 
<cfquery datasource="mydatabase" var="myResult>select * from users;</cfquery>
<cfquery datasource="query">select *  from myResult where name = 'bob';</cfquery>
 
@ssube I thought it was a fruit or something XD
and was like "wut"
 
The second one queries the local results obtained from the databse
 
@towc nope, CPUs actually have an instruction telling them not to do anything
it's useful in a lot of weird cases, like aligning functions to 16-bit boundaries
rewriting code at runtime
 
4:10 PM
uhhh... ok...
 
that sort of stuff
spinning for a few cycles so as to flush the pipeline
 
I assume I will never have those problems...
 
it's a fairly low-level opt
 
(function(){})()
 
no use in js, right?
 
4:12 PM
webpack is looking pretty nice..
 
@towc not directly, but a good VM will almost certainly be using them
 
so, I see that using "new" is a really bad thing for GC...
 
don't go refactoring all your code to avoid new. You'll hate yourself.
 
@towc not quite. new has a very obvious purpose, but you have to watch how often you use it. It can be very expensive.
 
@towc no
 
4:14 PM
allocating memory is expensive, garbage collection and shuffling can be expensive
 
does that mean that if I don't need an object created with "new" and I need another one but with the same constructor I can just make a function(obj){obj.a = 'whatevz'} and do that with every property?
 
instantiating classes is better than loose, free-form objects, though
 
@towc that won't work
 
@JanDvorak how not?
does that still allocate memory?
it should only rewrite previous memory, except for the definition of the function
 
4:15 PM
@towc as in, it doesn't do what you intend it to do.
 
@towc be careful not to prematurely micro-optimize, it won't do much but ruin your day.
 
user1596138
> Five Signs You Should Be a Low-Code Developer
 
On the other hand, don't new up everything you see
 
user1596138
Article thumbnail is javascript code with line breaks removed
 
Don't worry about it @towc until it's a problem
 
4:17 PM
function Obj(num){
    this.a = num
};
var obj = new Obj(3);
//do stuff with obj, but then you need another one

function redoObj(object, num){
     obj.a = num;
}
redoObj(obj, 4);
 
In Java, it's super common to new fairly large classes to use in the body of a single, simple function. That kind of practice will cause problems.
Java especially likes to new up a lot of small functors, as well
 
@ssube I'm currently just interested in the theory for a possible upcoming problem
@ssube and that's kind of what I'm doing
 
@towc that will cause all kinds of maintenance, thread-safety, and security nightmares. Never do that.
but making it clear in your code that obj is no longer used and making sure you don't hold any unnecessary refs is a good thing
 
@ssube even just for a private little thing? I probably won't use this in production anyway
 
making instances immutable, as much as possible, is typically good for GC
@towc a) assume every private little project you'll only use this week will spend at least 4 years in prod :P
b) small personal projects are the best place to do everything just right, since you don't have the pressure of a real product
 
4:20 PM
so, what should I do?
function Obj(num){
    this.a = num
};
var obj = new Obj(3);
//do stuff with obj, but then you need another one

obj = new Obj(4);
 
just write readable code that you can read and refactor LATER when you have a good reason to
 
should I stick to that?
 
Every company-wide behemoth project once wasn't
 
assuming I have a lot of objects
 
@towc better, but reusing variables isn't great
 
4:20 PM
erm ok...
 
if I knew memory was a problem and Objs were heavy, I would:
function Obj(num){
    this.a = num
};
var foo = new Obj(3);
//do stuff with obj, but then you need another one
foo = null;

var bar = new Obj(4);
 
my current problem is that I'm having extremely laggy animations on codepen, and I'd like to understand how to make them faster, and one problem is surely the rendering, but I don't care much about that for now, so I think that the other main problem is garbage
foo = null deallocates memory?
 
no, but it releases the reference earlier in the method than would have happened otherwise, allowing the GC to collect that instance if it needs to
that is absolutely a micro optimization, though
 
ok...
 
if the GC decides to clean up the first instance to make room for the second, it can
if Obj is a few hundred megabytes, that sort of thing comes in handy
 
4:24 PM
ok, good to know
now, here's another question: I have an array of many objects that are created with "new", and I used to splice them out of the array when I needed to (like for particles in an animation and such), and then when I needed to spawn some items in the array I just pushed other objects created with "new"... is there a better way to do it?
like turning the object that needs to be deleted into another object using "new" again which comes with a prototype function to unlock it?
or would it be exactly the same?
 
a lot of particle engines actually do reuse objects from a pool, because they deal with so many flyweight objects
what does your profiler say the problem is?
 
I actually haven't looked at the profiler for this specific problem... let me see. btw, I'm currently trying to enhance this animation
 
@towc Mother's day thing?
 
@Shmiddty no, a girl I met
 
giggity
 
4:31 PM
that performs just fine for me
run it through a profiler
I'd be more worried about the performance after you show her that page, ifyouknowwhatImean
 
I tried, doesn't tell me anything about garbage... should it?
 
coworker gave me videos to burn to discs
45 second video. 731mb
what. the. fuck.
how is a 45 second video that fucking large
 
Hello everyone, I'm having some problems with the jQuery extension JCrop. JCrop is an image cropping library, under normal circumstances when applied to an `<img>` tag it will replace it with a `jcrop-holder` (but really the image is just given `display:none` and `visibility:hidden` tags). I'm having an intermittent issue where the style tags of the original image are not getting set to `display:none` and it's producing erroneous layouts. I'm not sure what to try, does anyone have any advice?
TL;DR a library is supposed to "replace" the original img with something else but it is failing and
 
@SterlingArcher 15 megapixels?
 
4:35 PM
@dystroy Do you have any tasks for SHJ3 developers?
 
@SterlingArcher maybe it's not compressed?
 
(super human javascripter, level 3)
 
(What's that?)
 
wont that just make it a zip file?
 
(ever watch DBZ?)
 
4:37 PM
maybe a 10000fps 45s file?
or are the fps fixed?
 
(There's a recurring trope where the main protagonist reaches new levels of SSJ or "super saiajin". At one point, early on, his power level is OVER 9000!!?!?!?!)
 
does H.264 even support that?
 
gif from Shmiddty was moved
 
Those three frames would fill like half of an episode.
 
@Shmiddty reminds me of how modern songs work.
 
4:41 PM
Where the chorus is longer than the verse?
Words are hard.
 
essentially
also stuff like umbrella-ella-ella-a-a-a-a
 
When everyone can sing along, they feel like they're part of a group thing. It's a strong motivator for conformity
 
!!youtube chinpokemon theme
 
Sort of like that theme song? lol
 
4:44 PM
That song isn't worth singing along, though
 
@SecondRikudo are you coming to yougottalovefrontend.com ?
 
!!undo
that's not the theme song
Y U NO UNDO
 
hi all
facing a strange issue that i can't solve by myself...
I'm tryin to make a sidebar menu, with bootstrap, that is always visible, meaning that it just follows the scroll event if scrolltop is below its original position
 
position: fixed?
 
!!afk bananas
 
4:50 PM
@Shmiddty don't eat them all, leave some for me :(
 
@towc no, cuz it just "fcks" my original css settings...
 
then you must have some really weird css
cap is no longer registering afks?
 
this is just "standard bootstrap" col-lg & so on... but putting this menu as fixed seems to make it get out of the css bootstrap bounds (col-lg & so on...)
 
@Shmiddty SHJ3 ? What's that ?
 
user1596138
@towc @Shmiddty the afk delay should be over now
 
4:51 PM
!!urban shj3
 
@dystroy No definition found for shj3
 
user1596138
Just give it a minute
 
@dystroy Shmiddty is afk: bananas
 
@Julo0sS do whatever you want, but fixed position seems like the most logical solution
 
user1596138
That took so long
 
4:52 PM
oh, ok
 
problem is jsfiddle parent document is not on the same domain as the iframe. afaik this will not be possible unless jsfiddle offers the capabilities via their api. in other news, trying to close your fiddle bugged my chrome. i.imgur.com/lIqyPo9.gifrlemon 6 secs ago
 
@rlemon lol you can sense the "seriously wtf"
 
had to kill the process
couldn't even switch tabs
 
user1596138
Ugh @rlemon for me it killed all of my other tabs when I closed that one
 
user1596138
It did that thing it does when you pause scripts in one tab and it sometimes cripples every other tab.. But I closed that tab already
 
4:55 PM
I blame debugger;
 
@rlemon you should find a way to shop some rage effects into that
 
user1596138
Had to kill it from outside of chrome
 
like click a bunch of times and the "gif screen" cracks
 
@Jhawins same
 
user image
4
lmao
user image
4
I sincerely hope this is true
lunch time!
 
5:06 PM
@darkyen00 :(
well make sure to come back after and let us know you're still alive
 
@SterlingArcher lmfao
 
hi
everyone
and everybody
:p
 
omg
the leg cringe in the background
@Zirak stop i want more internet
please cmon nooooooo
 
gif from Zirak was moved
 
But but but...I unoneboxed. @rlemon omg bug fix ur b0t sheesh
 
5:11 PM
HA THAT MEANS I CAN INTERNET AGAIN
#technicalities
 
user1596138
@SterlingArcher oh my fucking god what the fuck
 
inorite
 
user1596138
Wtf is that even supposed to teach them haha
 
5:14 PM
Something something applied impact ratio?
no idea
 
That physics is awesome
 
user1596138
It's pretty damn obvious what the structure of a cinder block will do when hit from different directions lol
 
Maybe it's the physics of testicular durability
 
@Zirak
 
user1596138
They were using an axe lol lucky the dope who doesn't know how to swing it didn't turn it around
 
5:16 PM
gif from SomeKittens was moved
 
@CapricaSix NOOO THAT WAS BEAUTIFUL!
 
willy
bottom
 
@SomeKittens That's one aerodynamic baby, ensuring gene diversity across the regions.
 
@SomeKittens it wasn't
 
willy
bottom
 
5:17 PM
@SomeKittens lol omg
 
@Coxy1989 Point please or stop spamming
 
@SomeKittens willy/bottom
 
@CapricaSix dafuq did I just see D:
 
Hello, is it possible to work with the deepest element of all children in a section? I'm building a script to iterate through a form and plug in values from a data source but I'm using bootstrap for the formatting
 
5:26 PM
@JohnPurtle 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.
 
@JohnPurtle sounds very wrong and very fragile
 
I was trying to use =^ to represent a thumbs up in a chat message... but I realized it doesn't really look like a thumb. Whoops
 
How so? working in jsfiddle so far is doing what i want it to do
just limited to a single level of children though
 
@JohnPurtle Rephrase your question, please.
 
Okay, let's say I have a blank form html with two columns, one for labels, other for input values of varying types. the labels and inputs are wrapped with different divs such as rows and columns via bootstrap. I'd like to get into the heart of each part, apply the values from an array to that section
 
5:34 PM
Ahh. So you need a css selector? (like, one that can be used with jQuery)?
 
Yeah, Right now i'm just getting the field types via $(this).attr('type') then setting val(), text(), prop("checked", true) accordingly
but it's limited to one level below
 
may I see this fiddle?
 
@Zirak wait wat?
 
The web is dying, man
Web browsers have been in decline for ages
 
5:38 PM
Yeah, no one browses the web
 
What's a web browser? Give me the URL to one so I can see it.
 
@phenomnomnominal Was this you? cheezburger.com/8465099776/… (a bit nsfw)
 
I'll get you it, just a moment
had to reconstruct the page because i accidentally infinitelooped
 
dammit
copied a pw from mvn to gradle with an extra < attached, locked the buildsvc account out of ldap
stoopid alternate build tools with their weird configurations
protip: if you ever set up an artifact server, a) use sonatype nexus and b) disable anonymous access
it'll show just how many over-eager and under-knowledgeable developers have hardcoded credentials in their build defs
 
@Zirak that may have been me
 
5:51 PM
Here's the fiddle pre-infinite loop: jsfiddle.net/rr4khbLb
 
infinite loops are good for you, they put hair on your hair
 
what if you're bald
 
Other head.
 
i would assumed it'd be bad because it puts nair on your hair and drive you into despair
 
@JohnPurtle Ok, I see
Instead of just walking thorugh children, give the inputs some ids so you can refer to them specifically
<input id="firstNameInput" type="text" />

$('#firstNameInput').val('Jimbo');
 
5:56 PM
@Zirak am sorry. Will fix. Please don't hit me again!
Been working a lot on the dark theme.
 
I'd rather not, making this as general as possible so we can use it with all the forms in the form folder that we bring to the screen
i suppose i could just demand a common class for the input elements and then select said class
 
how else will you match of values to fields? you need to know more than just "text" or "email, right?
 
return data is coming in formatted
 
are there always the same fields or different ones for each input?
 
for example, i'm bringing up an address to be edited, i'd be bringing in an array of [address line 1, address line 2, city, state, zipcode]
 
5:59 PM
how is the data you're putting in the form setup?
 

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