« first day (2054 days earlier)      last day (2880 days later) » 

12:33 AM
@Neil following up, I ended up writing my small class
it being a microwrapper has less bugs and is fairly smooth
@GNi33 UP, DOWN, UP, DOWN, LEFT, RIGHT, LEFT, RIGHT, GOOD NIGHT?
@AwalGarg You have broken the continuum of space and time.
 
I've got a function in a namespace. Do i do My.namespace.function() ?
to access it
 
If you mean a method on an object, then yes
 
I've created a new instance of my namespace in a different file like so: var g = new GLOBE.Globe(); and then tried to access my function inside the namespace by adding .set(p, v); but it (chrome dev tools) says it's not defined when it clearly is.
 
78.90s user 0.29s system 99% cpu 1:19.45 total
9.58s user 0.11s system 99% cpu 9.707 total
 
My IDE also doesn't find the function. Do i have to somehow make it 'public'?
 
12:46 AM
Guess which one's Rust and which is JS?
 
Rust is 2nd?
 
you'd think so
but it's actually first
 
What
 
(admittedly I'm a total Rust beginner)
 
Should I use the name streams.io on NPM?
 
12:53 AM
I've been trying to access the set function by creating an instance then doing GLOBE.Globe().set(param, val); but apparently set isn't defined. hastebin.com/qukopiriro.js Any ideas? Why isn't the function 'public'?
 
1:08 AM
@SomeKittens I am using baddsert!
 
@Abhishrek awesome!
 
@SomeKittens github.com/mochajs/mocha/wiki add it there maybe?
 
nah, it's not ready for primetime
 
any mods online?
@Madara?
 
Does anyone wanna clear up my concepts on some things?
 
1:21 AM
@ThiefMaster ?
@qaispak depends on what
 
I thought I knew what a framework was. But now.. I'm slightly confused again.
I don't understand what AngularJS means and does.
 
lol
no one does
 
:(
 
please please where are the mods when you need them??
 
I thought a framework was like a set of libraries that help you make a website.
What framework do you use @thepiercingarrow
 
1:25 AM
@qaispak vallina js?
@qaispak idk I don't normally use frameworks - I just write the js from scratch
 
I'm not really understanding
 
1 message moved to Trash can
@AndrewL Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
nice
Finally I know how to
What
 
Is it possible not to use a framework? hehe didn't even know.
 
1 message moved to Trash can
@AndrewL Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
1:26 AM
I hit Ctrl-K
 
@thepiercingarrow mods don't take kindly to random pings & whining
 
@SomeKittens sorry...
woah - caprica can automatically move stuff to the trash?
 
If I want to understand javascript better, should I start without using a framework? or should I just use a framework?
 
@qaispak idk
 
GRRR!!!!
 
1:29 AM
@qaispak I normally just use a framework if there is a feature I specifically need
for example, socket.io client when I need websockets...
 
there's so much info. Don't know where to start from :'(
 
otherwise I try to stick to normal js
 
dhaara@1.0.0 test C:\Users\abhis\streams.io
> mocha --compilers js:babel-register

module.js:341
    throw err;
    ^

Error: Cannot find module 'node-stringify'
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.Module._load (module.js:290:25)
    at Module.require (module.js:367:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\abhis\streams.io\node_modules\baddsert\dist\badd-fs.js:9:17)
I think you forgot to add something :P
@SomeKittens
 
uh
that's in devDeps
it should not be
 
vOv
I did import {baddsert} from 'baddsert'; and it exploded in mocha vOv
 
1:38 AM
@Abhishrek fixed
 
Just a question regarding semantics
how should I setup tests involving creating a server
and then talking to it?
mocha#before?
or just have things linger in global namespace?
 
Those aren't unit tests
baddsert does best in unit testing though it can work elsewhere
 
@SomeKittens oh no i am using baddsert for unit testing
its different question, where should I initialize the socket.io server and connect to it?
My library simply allows you to use simple node style Duplex streams over websockets
 
  before('Initialize socket.io', function(){
    return new Promise((resolve, reject) => {
      const PORT = 2674;
      const server = SocketIO.listen(PORT);
      server.on('connection', function(socket){
        global.serverSocket = socket;
        resolve();
      });
      const socket = ClientIO(`localhost:${PORT}`);
      global.socket = socket;
    });
  });
this feels really really really hacky and makes me cringe that I used global :-|
 
2:06 AM
@AndrewL JavaScript has namespaces?
@qaispak yes
 
Yeah
 
Oh, okay ._.
 
@AndrewL I don't think it's called namespace. JavaScript have context and objects, which people use to mimic namespace, but they are not language feature like Java package or PHP namespace.
 
Yeah. It's a 'mimic'
 
Looks like just an object, in your case. So that namespace function is just a normal js object method.
 
2:24 AM
!!s/freedom/oil/ <twitter.com>
 
ye
 
hey
anybody familiar with teeworlds, or minecraft, or that sort of game?
with a map involving blocks of different types?
and servers?
@littlepootis yeah I think js has namespaces
they talk about them in the socket.io docs
 
Why @thepiercingarrow
 
just organize your modules in directories.. and rename them as necessary when importing.... at least for es6 modules..
 
OMG
@AndrewL I am trying to implement it
@AndrewL and I'm not sure how to do it
 
2:32 AM
Implement what
servers?
 
OMG WOWOWOW GIT HAS A GUI JUST RUN git gui !!!!
@AndrewL yeah - over websockets
 
lol
 
lol I literally found out about it by accident!!
 
thru js?
wait what
 
yeah
I typed git git
 
2:33 AM
Sorry bro
 
by acident
 
@thepiercingarrow google opensource minecraft
 
then it said "did you mean gui"
@AndrewL why sorry?
 
I don't know
 
2:40 AM
@littlepootis remember a scrabble game shared last week?
 
@cswl Which is not well supported.
 
gaa
is it a bad idea for a map file to be in the .json format?
if the game is written in js?
 
Not necessary. Unless the map is big.
 
ha!
found out - they are called tilemaps
@Sheepy is tiled good?
mapeditor.org is this useful?
 
@thepiercingarrow Pardon?
 
2:52 AM
@Sheepy sorry... do you know of any good file format for tilemaps?
 
imagine a world where javascript exists without polyfills and transpilation
 
json do fine for 2d tilemaps because they are dense. 3d... should be a bit harder. If you actually tried to google opensource minecraft as I said before, you will find many clones, in every major language. Better ask them than me...
 
@Sheepy I did - but I'm not making minecraft...
@Sheepy and 2d is fine, thanks!
@cswl polyfills?
 
@cswl That'd not be the JavaScript we love and know, so can we still call that JavaScript?
 
!!wiki polyfills
 
2:54 AM
In web development, a polyfill (or polyfiller) is additional code which provides facilities that are not built into a web browser. It implements technology that a developer expects the browser to provide natively, providing a more uniform API landscape. For example, many features of HTML5 are not supported by versions of Internet Explorer older than version 8 or 9, but can be used by web pages if those pages install a polyfill. Web shims and HTML5 Shivs are related concepts. == Origin == The term originated with Remy Sharp who required a word that meant “replicate an API using JavaScript (or Flash...
 
polyfills are cool
transpilation is sort of cool...
 
3:09 AM
morning guys.
does this not work?? need help. thanks.
var bomb = () => {
	this.message = 'Boom!';
}

bomb.prototype.explore = () => {
	console.log(this.message);
}
 
@Ming The rule of "this" works differently in arrow functions. That should be noted in most proper ES6 tutorial.
 
For those who want to use node.js streams from client to server github.com/darkyen/dhaara, supports objectMode and whatever.
 
what is => called?
 
Fat Arrow <- personal favorite
 
@Abhishrek but on wikipedia if I want to look it up
 
3:14 AM
!!wiki "fat arrow programming"
 
@Abhishrek The Gods of Wikipedia did not bless us
 
I see
 
@thepiercingarrow It has been called fat arrow ever since the specs is being drafted. It doesn't has any formal name since it is part of the arrow function syntax.
 
!!wiki Lambda Function
 
3:15 AM
The term lambda function may refer to: In mathematics: Dirichlet lambda function λ(s) = (1 – 2−s)ζ(s) where ζ is the Riemann zeta function; Liouville function λ(n) = (–1)Ω(n); Mangoldt function Λ(n) = log p if n is a positive power of the prime p; Modular lambda function; In computing: Lambda calculus in computer science; Anonymous function in programming. See also: In physics: Lambda point of liquid helium;...
 
Fat comma (also termed hash rocket in Ruby and a fat arrow in JavaScript) refers to the "=>" operator present in some programming languages. It is primarily associated with PHP, Ruby and Perl programming languages, which use it to declare hashes. Using a fat comma to bind key-value pairs in a hash, instead of using a comma, is considered an example of good idiomatic Perl. In CoffeeScript and TypeScript, the fat comma is used to declare a function that is bound to this. == Subtleties == === Perl === The "fat comma" forces the word to its left to be interpreted as a string. Thus, where th...
 
Sheepy he asked =>
 
Ok. So wiki calls it "anonymous function". Fair enough.
 
3:16 AM
not () => {}
 
@Abhishrek Don't we call that fat arrow?
 
im guessing its this?
class Bomb1 {
	constructor(message='hello my friend') {
		this.message = message;
	}
	explore() {
		console.log(this.message);
	}
}

var bom = new Bomb1();
bom.explore();
 
Yeah
 
@Ming Looks good.
 
Exploration with Nuclear Bombs, new thing I must try out in civ5
 
3:17 AM
hastebin.com/sizikuqupe.js Why is set not a function? I've done function set() but it's giving me a typeerror because it's not defined
Argh
 
@Abhishrek Already done that in Alpha Centauri.
 
is it recommended to do this.
Bomb1.prototype.hi = () => {
	console.log('hi')
}
 
github.com/darkyen/dhaara/blob/master/test/test.js#L61 fails because the .end is not passed can someone help :->
 
@Ming I should have stated it pretty clearly above. No. If someday someone add this into this method there'll be a bug. But this steps into personal opinion - the code as it is written will work fine.
 
I'm doing this to call it: hastebin.com/bepezinuse.js
 
3:20 AM
I am unsure how to handle .end
for a duplex socket, should I just outright close it or leave it half open?
 
@Sheepy so you mean put everything within the class?
class Bomb1 {
	constructor(message='hello my friend') {
		this.message = message;
	}
	explore() {
		console.log(this.message);
	}
	hi() {
		console.log('hi');
	}
}
 
@Ming Either that, or use the proper function. I'll say it again: arrow function is not same as normal function and you should read some real tutorial because it won't take you much time.
 
@Sheepy thanks. ok. but my point earlier was is it recommended to do Bomb1.prototype with a normal function.
 
@Ming Not my style. It was popular before since it is necessary in the age of ES3.
 
ok. Thanks.
 
3:27 AM
@AndrewL set is not a prototype method..
 
what do you mean
 
@Ming Use an arrow function where you'd otherwise use an anonymous function and either: 1. Don't care about using this as a reference to the function, or 2. Want this to refer to the parent scope that your arrow function exists in.
 
Ohh! Thank you so much!
 
jsbin is inferior to jsfiddle
 
3:31 AM
@monners thanks for that. any links for reference for your points 1 and 2
 
@cswl But can I set it as function set(.....) {....} without having to do the GLOBE.Globe....
 
@Ming google es6 arrow function explaination
 
@Ming Not that I can think of, but basically arrow functions don't have a this, so any calls to this from within will traverse up the scopes until it finds something that does. Hence, don't use an arrow function if you need to explicitly use this as a reference to that function.
 
alright. thanks very much for the help.
 
3:36 AM
HI MING HI DO YOU REMEMBER ME?
@Ming hihihihi!!!
 
@Ming why are you so merciless?
 
@thepiercingarrow ya. i remember u. lol.
 
ha
@Ming remind me when me met? I remember your name but not what we talked about?
 
@AndrewL you'd have too pass g to set then... you wouldnt be able to do g.set .. that
 
3:41 AM
Oh. So I guess I just do var something = GLOBE.Globe.prototype; then something.function = function(blah) {blah}
 
@thepiercingarrow nope unfortunately
 
Object and prototypes.. you know them?
 
@Ming do you use node or nightmarE?
 
I was reading up on em
 
@thepiercingarrow oh yeah. i remember you used nightmare too.
 
3:43 AM
@Ming cool
 
I understand them @cswl
 
3:55 AM
globals, function declarations and enums... you just want to use C.
 
;-;
 
4:09 AM
;-;
 
effectively knowledgeable or effective-knowledgeable?
or effective and knowledgeable
 
4:36 AM
!!tell thepiercingarrow google ming the merciless
get an education, you pleb
 
o/ Hello Shmiddty
 
is there any alternative to git hooks where I can make the git status info easily available to grunt/gulp...?
 
4:53 AM
good morning everyone
 
@BadgerCat I went on a date tonight!
 
@deostroll if you want to read/write from Git programatically, you need to find suitable "plumbing" commands git-scm.com/book/en/v1/Git-Internals-Plumbing-and-Porcelain
 
5:11 AM
o\ Shrekabs
 
@deostroll what do you need from git-status? if you just need info on the last commit, you can open a subprocess and call git-rev-parse git-scm.com/docs/git-rev-parse (there are examples at the bottom and on SO); alternatively, you can find a NPM package... looks like git-rev does only that npmjs.com/package/git-rev
 
    exec('git status -s', function (err, stdout) {
        if (!err) {
            if (stdout.length) {
                var unstagedCommit = function (line) {
                    var flags = line.substr(0, 2);
                    return flags[1] === 'M' || flags[0] === 'M' || flags[0] === 'A';
                };
                if (stdout.split('\r\n').some(unstagedCommit)) {
                    grunt.warn('Please commit all changes first.');
                }
            }
            done();
        }
@FilipDupanović I did something like above...
 
Hello guys,
any one can help me to solve the issue to read binay content with ajax
here is the question
1
Q: Download zip file from binary return in header asp.net web api

Kob_24I try to return ByteArrayContent in header to the client to download zip file. bellow is an image of my returned header content: And here is the javascript Code $.ajax({ url: url, type: "POST", data:"testing stesing", contentType: "application/x-www-form-urlencoded", dataT...

 
8
A: Programmatic git status

VonCUpdate: as mentioned below by toupeira, you can use the --porcelain option of git status (since commit 6f15787, September 2009, git 1.7.0). I mentioned in my answer "What does the term porcelain mean in Git?" that: Perhaps the meaning of --porcelain here is "produce output suitable for consu...

 
I need a job
 
5:22 AM
looks like you can use git-ls-files to see if there are any modified, but unstaged changes
there's probably a quicker way to ask if the index is dirty
 
@Shea ( ͡° ͜ʖ ͡°)
 
sometimes you just gotta put your startup dreams on hold, and go wash dishes at a restaurant, or ring up and bag some items at a retail store, just to make ends meet.
 
Or prep adult film stars before the shoot
 
5:43 AM
I tried that before but never again after having to prep your mom for that asphyxiation fetish
sorry, that was too much. she was amazing.
 
let's move on to a different line of work
@Shea hey, you can always prep for future trends. idk if I got brainwashed on Google I/O, but they said web components are going to hit clients in 2017
 
hi guys. are these the same? feel like missing out on some lines.
class MusicPlayer extends events.EventEmitter {
	constructor() {
		this.playing = false
	}
}
function MusicPlayer() {
	this.playing = false;
	events.EventEmitter.call(this);
}
util.inherits(MusicPlayer, events.EventEmitter);
 
@FilipDupanović that's a good idea. kinda like the stock market
 
@Kob_24 You may want to read how browser handles file download first, and then read how it can be done with ajax. This part is independent of server side language.
 
@Shea wait for the void to open up and then jump in on the market, sword in the left, shield in the right
 
5:57 AM
I'm gonna look into getting web dev credentials without schooling
and maybe possibly actually try for a web dev job for once
 
@Shea Why without schooling?
 
because too cool for school
I never really got along well throughtout school
always way too hyper active, disruptive, and didn't get along well with the kids
couldn't ever finish a school year
 
you can learn on your own, though, right?
 
I'm sure I've grown out of it, but I'm afraid to find out
yeah definitely
 
Web dev is not very different from classical school subjects. You need to memorise lots of rules, facts, and names, make sense of code that don't seem to make sense, and come up with your understanding and formula. It is a team work effort that demands patient. Too cool for school is a counter proof of your ability to do these from a hiring perspective.
 
6:02 AM
I actually learned/understood things real fast at a young age
had no problem learning, just couldn't sit still and shut up
 
School's too slow
 
^ exactly. I got unbearably bored, very easy
 
!!wiki MOOC
 
A massive open online course (MOOC /muːk/) is an online course aimed at unlimited participation and open access via the web. In addition to traditional course materials such as filmed lectures, readings, and problem sets, many MOOCs provide interactive user forums to support community interactions among students, professors, and teaching assistants (TAs). MOOCs are a recent and widely researched development in distance education which were first introduced in 2008 and emerged as a popular mode of learning in 2012. Early MOOCs often emphasized open-access features, such as open licensing of content...
 
MOOCs are boring.
I'd rather read a few books.
 
6:06 AM
Technical skill is important, sure. But you'll need to work with designer, tester, project manager, boss, and client as a web dev. And other colleagues that supports you (HR, Admin) or just happens to share the office. Don't count on technical expertise to save your ass.
 
of course
 
I can work with a team, and be very effective. problem is I don't have very good social skills, and can have very assertive ideas.
 
Have you contributed to other people's open source projects?
 
which consonantly has led to acceptance issues over the years.
here and there
 
A good rule of thumb is, before you say something that might be questionable, ask yourself am I being an asshole?
 
6:12 AM
yeah I thought I did that, but trying to fit in and all makes it hard sometimes. I often feel misunderstood.
 
Communication is hard for everyone. You're not alone
 
no reason you should feel uncomfortable
 
I've come along ways though
 
If you feel misunderstood, say that, and try to rephrase after you formulate your thoughts better
 
yeah, it's just hard for me is all.... it's my fault, not anyone else's
last time I felt misunderstood, I was living with a group of people who would hold their thoughts, and by the time I knew something was wrong, it was some big ordeal
 
6:18 AM
lel, that's rude
 
Hmm. Before we go too far, would you say social issue, rather than academic performance, is the main cause of too cool for school?
 
that's the ironic thing, the whole time they were just trying not to be rude
oh yeah, definitely
the adults would try to figure out what was wrong with my in elementary school, they considered bumping my up a grade. suggesting it was too easy for me, and calling me borderline genius.
 
Interesting. If you're also doing well academically, then it's very serious.
 
I don't like making excuses for myself, but I've come to believe it's all just classic adhd
 
Genuine ADHD don't really result in good academic performance. Can't remember things and make too many mistakes. They have problem with homeworks, much less exams.
So... just being young, I guess.
 
6:27 AM
tbh, students of all ages can consider themselves lucky if their institution has someone on staff who is knowledgable enough to recognize learning disabilities
 
that's the thing though, I had all of the ADHD symptoms, but still absorbed all of the information and my surroundings.
 
Well, build your portfolio first. Social skill mostly matter after you landed a job. If you can work on it now before it blows up on a big project, good. If not, well, failing is the best way to learn ;)
 
I want to job
any one help
 
@MadhukaDilhan Welcome to the JavaScript chat! Please review the room 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 do good with meeting new people though, it's just making friends that is the problem
 
6:29 AM
lol
 
I would excel in customer service
 
@Shea Do you know what the actual problem is?
Misunderstandings?
 
@MadhukaDilhan There's a guy who wants a job. You want to job. So hey.. (⌐□_□)
 
@SomeGuy I know what the problem is, I just don't know how to label it.
 
@Shea I understand
 
6:30 AM
I think differently than most people
 
@Shea If you don't get a cert from a doctor saying you really have ADHD, then don't blame ADHD.
 
poor social skills are me having different opinions, and trying to explain the thought process, and other people taking it as being argumentative
@Sheepy I've been diagnosed ADHD three times
 
can't take medication for it, because I self medicated and now I'm a drug offender.
 
6:32 AM
@Shea Customer service? Not when you have "very assertive ideas" and "can't sit still and shut up", no way! Don't ever try that! o_O
 
@Sheepy I did amazing as a Dollar Tree cashier
 
Ok. That's not the kind of CS job I have in mind.
 
@Shea well, so what's wrong with stating beforehand that this is an issue for you in discussions? no reason to feel uncomfortable about that
 
however for some reason whenever I worked with a certain manager, I would be something like exactly $5 over or something
it's the long term relationships that bite me in the ass
 
@Shea Kinky
o/
 
6:35 AM
hey guys. is process.nextTick() synchronous?
as it seems to run to completion before running other code blocks.
 
\o
 
@Shea Ok. You have no problem making a long and good conversation with us, though. Which is good. Hope you will master web dev and join us soon. :)
 
@Ming you might be looking for setImmediate()
 
@Sheepy thanks me too. you guys are living the dream lol
 
6:38 AM
I always wanted to be an expensive RNG
 
@FilipDupanović Uh, what?
!!urban RNG
 
@Sheepy RNG Random number generator.
 
@FilipDupanović thanks. it was good post. so it seems like process.nextTick is blocking? as it waits for the code to finish.
 
user3119231
good morning
 
@FilipDupanović That's an... interesting... dream. Hope you'll be an, uh, expensive RNG someday.
/me trying to be supportive
@Maurice morning~
 
6:43 AM
You never know what to expect from @FilipDupanović...
 
For all I know Filip may be an Artificial Intelligence. Then aspiring to be an RNG may make some sense. ;)
 
6:54 AM
reduced myself to random interactions that can help you move money faster relative to someone else using jQuery
 
seems like that's the first step to achieving choice and becoming skynet
 
And somewhere between the starting point and ending point is "collapse world economy"? Yes I am starting to see the dots now...
 
@thepiercingarrow ?
 
@FilipDupanović pick a number between 1 and 9
(you'll know he hasn't achieved it yet if he picks 5)
 
6:58 AM
oh no
 

« first day (2054 days earlier)      last day (2880 days later) »