« first day (1769 days earlier)      last day (3402 days later) » 

18:00
What's @S?
atscript
ohh, a TS extension
never heard of it before now and now that it's merged, I don't need to.
i just don't totally get the typescript thing.. i'm on the landing page, but it just looks like javascript
@TomCrews with types
Typescript.
18:03
It's javascript... with types...
> I don't really get the whole javascript thing.. I'm on the spec, but it just looks like jQuery
6
haha^2
made it even better
typescritp provides 'compile-time' type checking which is helpful when you are refacgtoring
vry funny
also the definitions allow autocomplete like languages like C#.
18:05
@Luggage arguably useful when developing to avoid bugs, too
!!urban omfneg
@AwalGarg omfneg Oh My Fucking Non Existent God: A replacement for OMG for atheists.
great, this is for me. nice
@TomCrews TS and most tools like that provided static analysis. They tell you something looks wrong before you ever run it.
Tests are all good and fine and will tell you what has actually gone wrong, but knowing that when you write it is even better.
A bug in prod costs $100, a bug in QA costs $10, a bug in dev costs $1, and a bug that never makes it out of your editor costs $0.
oh ok, that makes way more sense to me
18:06
or using a new library and getting a list of functions with thier arguments types helps you discover functionality and develop without constantly referring to docs
but when you say types, do you mean the standard data types? string, boolean, etc..
(intellisense)
@ssube I'm in a fuck-tonne of debt, then :p
@ssube a bug that never exists cost $1000
yes, and more complex types
18:07
@TomCrews yep, as annotations: function fooString(str: string): number takes a string and returns a number
@ssube if a bug goes out of my editor and I can frame it as someone else's mistake, it pays me
@Abhishrek um, no
@AwalGarg unfortunately, yes
@ssube I've seen bugs in production cost 100's of thousands.
um, yes - you will need a good developer that will cost $1000 to write very bug less code
@Luggage better as pugs :p
18:08
or pogs
@Luggage the exact number isn't the point, it's the factor
yea, i get your point.
> hey your code doesn't work says undefined is not a function. using IE.
> me: oh, that's because IE doesn't support `undefined`. Let me write a shim for it, will take $200
> _fixes typo silently_
@Abhishrek I don't think you understand the analogies
production issues cost 10x as much as QA issues, QA costs 10x dev, dev has a cost, but preventing bugs with analysis is free
18:09
except the one-time setup of the static analyzer, which you just justified
that's why having a good build system is important
I set up good build systems. Enjobulate me.
can you do tests, too?
If all goes well, my title is changing from software engineer to release engineer this week.
ohh, so you are already enjobulated?
yes, but I can always set up other stuff too
coming in and setting up gitlab or nexus for someone is pretty easy
18:11
i need tests, mostly. and someone that knows how to write effective tests to get me started
user406009
I made a Firefox port of my addon: addons.mozilla.org/en-US/firefox/addon/stargazer
so why did it take so long for something like typescript to become prevalent, js bugs have always been a huge problem, no?
> no restart
<3
user406009
You need to reload the page though.
@Luggage Not entirely sure what you mean.
18:12
@TomCrews why did it take microsoft 15 years to get their browser right?
js wasn't taken seriously for a long time. typescript solves a problem that just wasn't a problem in the past, managing large JS codebases
Do you have a test framework? Runners?
@ssube me either.
Have you looked at the testing setup in my web template?
That's what we use at work.
a bit, yes.
18:13
What do you have set up for testing, today?
@AwalGarg fair enough
Nothing.
@TomCrews "Because types are for idiots! We don't need types, or type checking, or name checking, AT ALL! WE, WRITE, JAVASCRIPT -- NOT JAVA" -- your generic JS guy :P
@Luggage What tools and languages are you using?
Coffee and ES6 (converting all coffee to ES6). The client is knockout.js and the server is just node/express/bookshelf/postgres
18:15
@Luggage Is there a DAO layer or some other library that controls client/server interaction?
home-grown, mostly.
@RoelvanUden so in that argument, the generic js guy is just being arrogant? aren't types unavoidable?? i don't understand why 'types are for idiots' would even be a reasonable statement for anyone in coding to use
Putting one piece of code in between your client and server is the most important change to support testing that I've seen.
I have my own code that exposes my objects on a rest-like interface and the same on the client.
@Luggage Make sure you can replace that code and you've effectively decoupled the client. That means you can run mock tests in Karma and Phantom without launching a server.
18:16
Hi All
@user1758013 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.
GitHub Education: *Aug 4, 2015 for @CallumBarclay – Pending*
Is there a specific reason GitHub likes taking so long to respond?
@user1758013 hai
@TomCrews I'm just bitter. Don't mind me too much. I use TypeScript because of all the advantages it brings, but talking to a typeless enthusiast makes it really pointless to talk about. Hence, I'm bitter about it. Those kind of responses is what I've gotten mostly.
looking at Date.prototype.getDay() makes me wonder if getDay() is defined like the Date prototype constructor has this.getDay=function getDay(){..} Or whether it has outside of the constructor Date.getDay=function getDay(){..} i.e. no 'this'? I notice that if I say Object.getPrototypeOf(Date).hasOwnProperty("getDay")
then I get false whereas if I do Object.getPrototypeOf(new Date()).hasOwnProperty("getDay") I get true - which suggests maybe it uses this, though I don't see mdn documentation indicating.. And it says Date.prototype.getDay, rather thna any mention of this.
@TomCrews A lot of languages, especially ones intended for small projects, are type-less. If you can keep all the code in your head, you don't need those checks.
user406009
18:17
@TomCrews Types make metaprogramming harder.
user406009
For instance, a generic JSON.parse.
Ruby and JS stand out for avoiding types.
@Lalaland JSON has a small, well-defined set of types, each with a different and unambiguous syntax.
@ssube io
user406009
@ssube I am talking about converting a JSON object to a typed JavaScript Object.
@Lalaland What is hard about that?
18:19
with any luck my food should be here really soon, so i'm gonna go, but if you remind me later, @ssube, I can give you access to my code to tell me where i need to start making changes to get a moretestable system. Like, for money. We can negotiate payment before you spend any real time.
If you have a well defined JSON, it can map to a well defined type.
@Lalaland no such thing as a typed JS object and if there were, it would be trivial
how to measure duration of the call with the call back? The parameters will be: (functionToCall, argumentArray, numberOfCalls). Which returns an object that would tell us the number of successes & failures, for each category: average time, min & max. The callback can be assumed to be function(error, result).Can any body give me a hint or alogrithm ?
I think maybe there is such a thing as a literal object maybe you mean that @Lalaland
@Luggage I'd rather look at the structure (with or without NDA) before we get into any moneys. It might be simple changes, might be impossible, but I can at least point you in the right direction without charging.
18:20
@user1758013 Hint: Use the start and end time.
If you actually want help with scripts and structure, then we can talk numbers.
I appreciate that, but I just want to let you know I'm not trying to use a lot of your time without compensaation.
3kg of honey, $30
user406009
@RoelvanUden Ok, how would you implement a typesafe JSON.parse()? In TypeScript or Flow, I don't care.
18:21
seems expensive
@Lalaland Have you checked the JSON spec?
@RoelvanUden yes i used var start = new Date (), var end = new Date() - start, How to know whether the function is successfull in execution or not
Solution: Go to costco
user406009
You need to be able to iterate over all the possible fields and their types.
@Lalaland Just like you do in any other typed language, sigh, why do I always end up on the side that has to explain types to every uninitiated programmer ~_~
18:22
@Lalaland JSON has very few types: number, string, object, array, boolean, and null.
You can match those from null, boolean, number, string, array, and object, without ever mistaking one for another.
user406009
Ok. I am clearly not doing a very good job here of explaining myself.
null and boolean are keywords, numbers are pretty obvious, strings and arrays and objects are delimited
user406009
Let me create a concrete example:
the small syntax and fact no types can overlap makes it very easy to parse and infer types
in fact, I'm going to try to throw together a parser with types before my meeting
@ssube though the function type is an Object
so is that a bit of an overlap?
@barlop no it is function
!!> typeof function() {}
@rlemon "function"
(function(){}) instanceof Object <-- true
@Lalaland You parse at run-time and use the type metadata to see if they can be mapped, and if not, you give a failure. Not that hard.
user406009
18:25
@RoelvanUden Things get more complicated with nested structures.
wow, feeling pretty buzzed for only my second drink. feels nice
@Lalaland No they don't. If it's an object, walk the object type metadata.
@barlop because in js everything is an object or a primitive
but function still claims its own type
You tried to say no when I said function is an object
no, you said function type is Object
that is not fully correct
18:25
But function is a special type if object. It can have properties attached like other objects
it's type is function
@Lalaland I mapped all kinds of trivial data onto actual types in .NET. It's not hard, nor magic, nor annoying, nor complicated. There are even thousands off-the-shelve products in pretty much any common typed language that does all that easily and trivially.
Okay, question for any promise pros here... how can I execute a series of commands on a callback? Eg:
user406009
@RoelvanUden I fully agree that it's possible to do. I am just trying to illustrate how typing can sometimes get in the way.
sendCommands: function (commands) {
  check(commands, Array);
  this._commands.write(`${command_at_index}\r`, () => {
    // write the next command, etc etc
  });
}
18:27
sometimes. .net has dynamic types for such occasions (but theya rn't that common)
@corvid Funky template string there. You could have just used command :P
!!> typeof (function() {})
@Luggage "function"
I said " the function type is an Object"
not Object itself
an object means an instance of Object
18:29
yes. it is an object.
but also a function
Function is special.
!!> (function() {}) instanceof Function
@rlemon true
@rlemon you said I said "function type is Object" I didn't
#rekt
.stack { overflow: auto }
18:30
6 mins ago, by barlop
@ssube though the function type is an Object
orly?
AN
an object..
i.e. an instance of object
it is also instanceof Function
I did not say "function type is Object"
everything equates to an object or primative
Function is special.
well i'm not disputing that
just saying I didn't say what you said I said
18:31
my bad
and that what you're saying doesn't disagree with what you quoted me as saying
no prob
found out I had a hidden ssd drive in my laptop
or rather.. what you said doesn't disagree with what I said.. (putting aside what you quoted me as saying!)
I want this
18:35
I don't, ew
@Loktar imgur.com/a/DyQZL you need this
3
is that what you oldes wear nowadays?
omfg @rlemon
that is amazing!!
inorite!
fully functional as well
god man its so pretty
18:40
looks like too much work
I didn't realize just how simple JSON is
I wrote Java -> JSON, but the other way around was hard...
@rlemon that thing is awesome!
On the TV, now (no audio): MSNC: Breaking News: Josh Dugger admits to viewing pornography
unless that's child prornography, it doesn't sound like news..
is anything on the news really news anymore..
18:47
@Loktar okay, tonight I'm starting a mint infused lemon honey mead. should be ready in 2 months
haha nice man
Wow that sounds amazing.
you have a house warming gift coming from me as well @rlemon
on the weekend I'll also be making a batch of strawberry mead.
@Luggage consider the audience. It will feel like news to old people and stupid people
18:48
so I'll bring you and teh wife one of each
mint+honey+lemon+booze
Cat and I planned on getting you one, but you finally moved into your house when we were in MI
there must be some other context that makes it shocking
so it slipped our minds
hahaha no worries man.
18:48
even old people know of porn these days
hell, they star in some of it.
my house warming can be getting to chill with you :P ha
haha
I can't wait man, gonna be so awkward for at least 2 minutes!
@Luggage he previously claimed to not?
@Luggage naah, most are extremely sheltered
nursing homes are just big fuck-hotels
18:49
@Loktar you know I'll be getting out of the car already in the horse mask
LOL
@rlemon should I buy a kit? Or just buy pieces separately? I don't know anything about home-brew, so I wouldn't know the parts to get.
"std? who fucking cares, i'll be dead in a year anyway"
@Nick what do you wanna make?
cider/wine is less work, and less stuff
beer is a little more involved
Well, I was thinking beer, but I could start with a cider
18:51
for cider/wine all you need is a carboy, a vapour lock, and some bottles
Actually, yeah, cider would be awesome
Realy?
Huh
and ofc the juice, sugar, and yeast
Yeah
Equipment is all I need--I can figure out ingredients later
you should be able to get a 5gal carboy in a wine store for $50
they will also sell the vapour locks ($2-3)
Awesome
18:52
they also sell yeast there
I suggest not using bakers yeast.
for cider use champagne yeast
I get yeast for $1/packet
3 packets for a 5gal carboy
@Nick the biggest challenge is finding unpasturized apple cider for cheap
if there are farmers markets near you those are usually a good bet
@rlemon what happens if it's pasturized?
if they don't add chems, nothing.
@ssube nothing ferments
you pasteurize it yourself.
@SomeKittens pasteurization keeps the natural yeasts from propagating
those can lead to strange flavours
you don't have too, but you take a risk if you dont
/everything I'm saying I learned from reddit posts. so ofc do your own research and don't just quote me
/r/homebrewing is a nice sub tho
@rlemon There's an orchard nearby. Not sure if they have their cider year-round or not, though
18:57
alternatively if you can find a place that will press it for you, you can buy apples from wherever
presses are expensive ($500 and up)
@rlemon a meadary near here does a ginger-mead that is awesome
yea I wanna start off 'safe'
and I've had mint infused lemonade
so I figure lemon mead infused with mint should also be good
500 dollars for a press to make cider?
How much cider does it make
my local favorite meadery: millstonecellars.com
@Cereal it is just the press
gets juice from fruit
I got to use one of those at the orchard. They let kids make cider
It's pretty cool
I have a juicer, but it leaves too much material behind
makes really good apple sauce :D

« first day (1769 days earlier)      last day (3402 days later) »