« first day (1421 days earlier)      last day (3752 days later) » 

m59
m59
00:04
writing these tests just keeps getting cooler and cooler
Does anyone else get this excited about tests?
@copy what if I wanted to give an effect when the player hovers over a building? That would be too much for mousemove on canvas
I could tell the pc to calculate every 10 triggers or smth
but I guess that wouldn't be elegant at all
m59
m59
You would want to limit the framerate
@towc Nope, it's not
@copy if you say so
m59
m59
@copy no to which?
00:08
@m59 probably 10fps for a game like that is enough
@m59 To That would be too much for mousemove on canvas
m59
m59
Oh right, but it's good to put some kind of throttling, right?
@towc You should be able to do 60
@copy it's not like I need 60 anyway
@m59 No, doing all draws in RAF is enough
Just for the logic, yes
00:09
but I'll first try with 60 anyway
m59
m59
Hmm, I've only done scrub canvas exercises on CodeHS.
I think they had something like a setInterval(animate, 10) going on
did you end up quitting that?
m59
m59
No, but very busy right now
I'll probably log in and do some work next week
@m59 That's actually less throttled than RAF
But for beginners and small project it likely doesn't matter
m59
m59
Oh. I've never used it, so I dunno how it works.
I assumed it was some kind of magic :)
00:12
!!magic
(∩ ͡° ͜ʖ ͡°)⊃━☆゚. * ・ 。 ᵐᵃᵍⁱᶜ
m59
m59
;D
future of JavaScript in 1 sentence...
1564
Q: How to include a JavaScript file in another JavaScript file?

Alec SmartIs there something similar to @import in CSS in JavaScript that allows you to include a JavaScript file inside another JavaScript file?

is the answer actually right?
@CustomizedName Goats
00:15
wasn't there something like importScript('url') ?
can't find the exact function...
Throw everything in script tags
ok...
Goats :O
@copy is that the future
.fr
00:17
I think JS will rock and C# will float xD
I think both will work together
I got same kinda feeling
someone should make a language called Goats
Or a goat simulator
@copy ironic?
00:20
No
there is one already there
now we need a sheep simulator
Someone not as stupid as me, is it blasphemy to store a function as a string in some json, then eval it later? Seems like it will be a terrible idea.
@Loktar I'm trying to make a visual for my cloud script. jsfiddle.net/rlemon/m44n58eu/1
does this kinda speak for itself?
yeah imo
@NickDugger Yes, that's terrible
00:22
Thought so
cool, thanks
am going to sleep
m59
m59
3
A: How to include a JavaScript file in another JavaScript file?

Venu immadiIf you want in pure JavaScript, you can use document.write. document.write('<script src="myscript.js" type="text/javascript"></script>'); If you use the jQuery library, you can use the $.getScript method. $.getScript("another_script.js");

smh
$.getScript('https://code.jquery.com/jquery-2.1.1.min.js');
4
m59
m59
When a jQuery scrub tries to give vanilla js answer, it's still bad.
OH LOLL
That's even funnier
That just made my collection of ridiculous code.
00:27
That was an actual answer to "How do I load jQuery" on main.
m59
m59
link?
Jun 26 '12 at 17:29, by Esailija
0
A: Load jQuery using javascript

thecodeparadox$.getScript('http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js')

oh wow, it was even worse
$('head').append('<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>')
m59
m59
hahahaha
eventually this is going to turn into a blog post
m59
m59
oh man, I have tears
too funny
00:31
@rlemon Nice!
What's best practice for "resetting" an array. If it's full of stuff, but I want to start over, is myArray = [] the best way?
arr = []
alright, danke
yes, best way
I ask some pretty n00wb things
00:34
I wish I could blog like this
just write the code, comment it, submit it, done.
but people want text
Who says you can't?
I'd read it
@SomeKittensUx2666 lol wth
he has to be trolling
m59
m59
@Loktar even my wife said he must be trolling :)
@Loktar Easily one of the worst rep whores out there. He's not trolling.
wow thats sad :?
00:40
yeppers
poll: if my demo's were mostly code + comments and not text would you all still read them
or would you prefer I spend the time to write a paragraph about each little bit
Only code is enough
As long as the demo itself is half-interesting
m59
m59
I might prefer paragraphs because personality is nice, unless your comments are particularly fascinating (which probably doesn't make good comments)
Boom, interesting code-only demo: jsfiddle.net/somekittens/7h67umav
m59
m59
lol
00:43
That's below the threshold for half-interesting
jsfiddle.net/rlemon/m44n58eu if I posted this code, (and a link to the fiddle) then posted a fiddle with this same concept but cleaned up for a nice scrolling cloud thingy like on rlemon.ca would you all prefer that, or would you like more of an explanation of the code
(for this, and future articles)
YOU CAN'T HANDLE THE INTERESTINGNESS
user2620028
@SomeKittensUx2666 I think it's broken. It's not interesting me. :(
user2620028
:( oh
00:51
Lo guys
user2620028
whats up ian
Lo all - does this suck as an answer? stackoverflow.com/a/25695790/1773904
Hey @AaronSiciliano :)
The OP just pasted a shit-tonne of code, so I didn't try and make his code work, so much as give him some direction of how it could be done
Trying to hard
Looks like jQuery has a $.Callbacks - but I haven't used it
that comment thread really pissed me off
fuck that guy (Voltasalt)
also he wasn't downvoted for listing NP++ in a fav IDE thread, lots of people listed vim/st and no one cared
lame I'm spending a Friday night commenting on that useless stuff need to go make something instead.
01:09
I'm playing with promises
@Loktar Feel free to make me breakfast. I'm starving.
hah
Anybody know why an Express cookie from express.cookieParser would expire after about 5 seconds?
maxAge is at 3600 seconds...
RFC
please and thankyou
If I refresh the browser, it seems to be ~5 seconds before the cookie with the auth data seems to be unset somehow.
01:14
there might be stupid mistakes, I've been drinking
@rlemon immediate feedback, get a diff code formatter
yea i'm getting a new theme
content wise, that is what i'm after RFC for
@rlemon Moar pease
s/reall/really
hah yeah
was just about to paste that
> It really is this simple, after we've calculated the positions of the puffs in the cloud we should probably figure out how large it is.
if you want to keep that maybe a ! after instead of a comma?
but yeah not much feedback it seems fine to me, the main thing is the code formatting obviously
01:19
well I'm going to use mikedidthis's theme
also I suck at writing and suck at giving feedback on it :P
bounderies => boundaries
he's finishing them this weekend
well yeah but what about a code plugin?
one that color formats and shit
Really, theres only minor typographical issues. You'll probably spot 'em when you're sober
01:20
@taco thanks
like alexgorbatchev.com/SyntaxHighlighter (not meaning that one in particular but one like it is what I mean)
np
@Loktar i'll look into that
thanks
yeah np
there are some for WP that pull in gists and make them look all pretty
might be some that aren't dependent on WP
Let's say I have an image that I need to load into memory. Later, I don't need that particular image anymore. Can I remove it from the memory?
Yes, by removing all references to it
m59
m59
If you're following decent practices, it's pretty likely you wouldn't have to think of it specifically.
Like setting it to null, or what would be the best way? Pretend it's just var myImg = new Image()
m59
m59
It depends on the lifespan of its scope.
02:08
If myImg goes out of scope, it'll be freed
Alright
thankies
If it's a global variable, set it to "goat"
m59
m59
lol
The browser will then teleport it away
Does this code look weird? pastebin.com/b4cAsSfg
Also, I think it's derp that scripts have to be in the DOM to be loaded, but images do not.
02:21
@NickDugger A bit, yes
A script that's not in them dom doesn't make sense, an image does
Any way I can make it look a bit less "yes"?
Well, I wouldn't handle multiple elements, because there are only around 2
And also not creation of the path plus filename
That makes sense
And an element probably shouldn't insert itself
m59
m59
02:59
@Loktar I'm pulling some templates from several places with gulp src. I want to change them all to the same path before running them through angular-template-cache. The only way I can think to do it is with an intermediate gulp-copy, which is quite the waste. Any ideas?
eh yeah I mean normally you would try to pass them as a stream
but since they are coming from diff places Im not sure how to do it
m59
m59
hmm, maybe just a matter of finding a plugin that can remap them? I'm not too solid on how streams work.
actually gulp-rename might be the key
Yup.
.pipe(rename({
  dirname : 'tmpl'
}))
@Loktar quite easy! ^
nice!
m59
m59
That was pleasant. Sometimes those kind of improvements go undone for months =D
03:52
happy birthday rob @rlemon
It's lemon's birthday?!?
m59
m59
RLEGEND
04:19
Anyone know of a good resource that explains the pros/cons and philosophies of using media queries inside CSS selectors? For example:
h1 {
    @media {...}
}
my son made another game
well "made"
he created it in roblox
lol its awesome/hilarious
the image for it is great
people do some crazy stuff in roblox its insane
Do I need Rupies to try the game?
kind of :?
you need robux
he made it pay to play
which is also funny, almost 100 people have
so he's making decent "money"
Oh, yeah, he is relatively successful
m59
m59
04:29
no friggin way, how much?
robux is currency in roblox
m59
m59
Ohhh
you can trade it for real money like 100k == $250 irl
he has roughly... 1.2k :P
m59
m59
100k LOL
whats crazy though is there are a few people who have made 10,000 in a month
m59
m59
04:30
Ohh, I thought that was a typo and you were saying he made 100k
oh no haha
m59
m59
/quit-my-job-now
lol
haha
nah he is just happy since he's been working on it for a month or so, released it tonight
was happy he got almost 100 players playing
m59
m59
that's cool - yeah money or not, that's really awesome
the scripting is done via lua, I was looking into it tonight helping him out with an issue he had
m59
m59
04:31
that's more people that have ever viewd my github, so...
tons of freedom in the editor
@m59 lol
m59
m59
except maybe JavaScript Hardcore Mode ;D
yeah thats a cool one :P
you ever make it delete the repo when they mess up as well?
m59
m59
Someone asked me to make it for grunt. I finally got around to that the other day.
Ohh dang, I forgot all about it
nice
m59
m59
04:33
delete's your GitHub account
hahahahahahaha
LOL
m59
m59
Well, guys.... the company is over. I forgot a semi-colon.
user2620028
wah wah wah
m59
m59
heheh, @Loktar I should add music ^
that would be cool
lol "Shit I hear the music noooo!"
m59
m59
04:49
;D
m59
m59
05:26
Can karma show me some nice summaries like Jasmine was doing by itself?
I'm guessing that's what reporter/logger is?
any guidance on setting that up would be really helpful
I see some stuff for saving files, but I'd like to just see it in this big karma window
m59
m59
05:52
I think I got it all figured out. Exactly what I wanted isn't possible, but whatevs.
Is there a JS function which allows you to select an element in an array at random but with an exception... aka any element in [] from position 0 to 9 except 7.
m59
m59
that's mighty specific =D
well the numbers are example purposes :P
m59
m59
Right, but the functionality altogether is rather complex
easy to write your own, though
well yeah i can add a simple loop just wondered if JS had a function that did it already
05:54
do{i=~~(Math.rand()*10)}while(i===7)?
m59
m59
I just mean it wouldn't be useful enough to be a part of the JS api.
for(i=7;i==7;)i=new Date%10
i'll be using array.length :P
@copy not good enough for code review ;-)
looks like im close to finishing my first guitar interactive excercise :D
05:57
*warning: grammar nazi mode enabled*
think I might add difficulty levels to it for the more experienced players
06:09
@JanDvorak Engls grmr orr jawashcrypt gramr?
@AwalGarg wat?
@JanDvorak wat wat?
@AwalGarg I mean, I can't understand your blabbering.
@JanDvorak By the way, it is "What?". Please use proper spellings.
@AwalGarg misspellings that have reached memetic status are OK
06:13
ok
"wat" = this makes no sense whatsoever
o_O A mod came in...
Maybe to play with the funky chatbot :P
@Dave Generate 0 to 8, shift upwards on >= 7
This only works for one exclusion, though
or more, if you know their order
@minitech that won't be random anymore.
06:18
Does it? Anyways, I’d just use the famous Fisher‒Yates shuffle for more than one
@AwalGarg it sure will
hope I got that dash right
@JanDvorak the probability of the element after 7 would be more than others.
@minitech shift by the lowest exclusion forst
(nope, used a figure dash)
06:18
@AwalGarg no
@JanDvorak explain please.
@AwalGarg The key here is “generate 0 to 8”, not 0 to 9
@AwalGarg 7 picks #8, 8 picks #9
m59
m59
This is my first go at testing. Suggestions welcome! github.com/m59peacemaker/angular-pmkr-components/blob/master/…
Night all!
Peace out
06:20
Are you asking for suggestions and leaving?
@JanDvorak wait, we are talking about the indices of array, right? Or the literal numbers?
@AwalGarg Either or works
m59
m59
well, I don't have to if there are some at the moment :)
I thought someone might ping me
In case of literal numbers, then ignore my previous statements... but I don't think what Jan said would apply in case of selecting from an array.
Sure it would. Indices are just literal numbers
m59
m59
06:22
My only other option is to stay up all night in case someone wants to review my code =D
@AwalGarg *then
@minitech yes, but it could select number 9. Then what would it point to?
@AwalGarg No, it couldn’t, since we’re picking in [0, 8]
@JanDvorak ^_^
@AwalGarg you can only select #9 by rolling 8
06:23
@JanDvorak We are picking in [0, 8], and if 8 rolls, we select #9... wat?
@AwalGarg, if it helps: when picking randomly from 9 elements but excluding 1, there are 8 elements to pick from. The question becomes how to map 8 elements to 9
Adding 1 to elements after the exclusion(s) in order is a fair way of making that mapping
ok got it now @minitech
btw @minitech that nazi guy had left some threatening funny tweet for you guys...
@AwalGarg link?
you can try to block me or make me ban but I'm coming back like michael jackson and I'm tor expert
I'm wondering if he manages to get the entire tor network blocked
06:30
lolol
> tor expert
!!s/tor/troll/
@AwalGarg troll expert (source)
good morning everyone
s/(?<=ll)/ing/
06:32
i prepared my presentation
morning
combining 5 awesome youtube videos that i have seen and adding ideas of my own
and loads of demos. [and your videos that i hope are incoming]
mOrning
watch them two one after the other... i think the second one just adds up more (Cause the jobs talked in second video are "good careers" )
I am bored of these now. Maybe some other time... bookmarked.
06:38
lol
i am fascinated by them
They are good to watch if you are feeling bored or depressed, to get some motivation to work. Otherwise, they are not really realistic.
And today is Saturday, I am full of energy. I don't need them for now.
xD
these two are exact opposite though.
But I don't know what is happening with my nginx local server right now. Behaving weirdly... double requests... wtf.
nvm
browser trying to look for favicon in root
@AwalGarg lol that reminds me few years ago
same thing xD
me too. But I usually put a dummy favicon in root, ain't sure why I forgot this time.
07:08
about my simcity-like game: should I let the player put buildings anywhere, or should I build a predefined grid?
Can 'mags' be a valid shortform for 'magazines'?
@AwalGarg yes
07:35
how do these guys get the font url from google?
Magic
!!google google fonts
Bam!
oh sweet
> cue on did bridal celebration particular
wat
Looks like an average Drupal developer
2
@AwalGarg Markov Chain
lol why do people waste their time in spamming with such shit... people don't have lives or what?
@AwalGarg robots don't have lives
@JanDvorak why would someone put their time in making a spamming robot?
07:55
@AwalGarg guess why ;-)
@monners re:tweet, I use element based media queries all the time, super helpful. I can't image much cons to them, except the extra code, which is meh.
08:31
@mikedidthis Yeah, I'm working on a styleguide at the moment and thinking about how to approach media queries in a consistent way. The more modular the components get, the more it makes sense to nest the media queries within the component itself
Working on typography at the moment. It's a bitch.
08:53
morning
@mikedidthis Do you have a base typography rhythm you use at the start of projects?
09:27
much better coding track... or work out track ... or whatever track :D
Buuu
man I can't dance to that
09:52
are there any good code formaters for jade?
I find webstorm doesn't do a good job
@AwalGarg Stop that
7 messages moved to Trash
' Error: lastmessage is undefined

« first day (1421 days earlier)      last day (3752 days later) »