« first day (2048 days earlier)      last day (2903 days later) » 

7:00 PM
@Trasiva everything in china does :P
 
@MadaraUchiha even if changing dom structure wasn't a limitation, then changing semantic markup for styling is not very developer friendly
 
somewhat long question, but... in all the angular code i've ever see, when templates are referenced, it's like this: templateUrl: 'dashboard.html'. i don't understand how this will work if deployed with a project name (i believe that's the term) in the url. because of this, i have to inject a baseUrl into all my directives which i declare in my MVC layout like this: <script>angular.module('testApp').constant('baseUrl', '@Url.Content("~")');</script>.
am i doing something wrong here? why don't i ever see this in code examples with templateUrl?
 
evenin
should I be keeping the build results in /dist or /build ?
 
@ton.yeung so if i use a gulp tool like gulp-angular-templatecache, i can just reference the template by name and not have to inject a base url?
 
Figured out, that was because it was a cross origin request
 
7:07 PM
is that something i need to do in my gulpfile?
 
@tereško flip a coin
I prefer dist
but build is perfectly fine as well
 
@rlemon and how did you pick? I mean, what was your reasoning there?
 
it is my distribution files -- they happen to be a result of a build.. but they are for distribution
 
thanks @ton.yeung. i'll give it a ry
 
@rlemon that actually makes sense, thanks
 
7:09 PM
@AwalGarg got it
margin-top: auto on #bottom
 
i did it!
 
gulp + handlebars
 
fuck angular
 
@tereško what page of the kama sutra covers angular boinking?
 
7:12 PM
page 69
 
I mean, I am happy it's not Ember, that everyone uses, but it's still broken by design
it will age poorly
 
can someone do npm install leetreveil/musicmetadata
and check if that even works?
 
1 sec
@Abhishrek no
 
it should though :S
 
@ton.yeung * might not represent reality or be based on any really data
 
7:14 PM
React looks decent.. but it has a silly learning curve imo
 
@Abhishrek it's stack on "normalizeTree → install"
 
you have to change your entire mindset
 
Just use angular
 
@rlemon ya
 
git -c core.longpaths=true config --get remote.origin.url
to me it says this failed
 
7:15 PM
they added too many things and explain them all in too much depth
 
Angular 1 is disgusting and perpetuates bad code. React is decent, but there's a lot that they don't tell you out of the gate about how to keep it performant. Angular 2 is, well, a step in the right direction...
 
:30767732 that isn't failing
that is a warning you have no package.json in your folder
 
I guess npm can't work on winblows
 
@Abhishrek it went through
worked ... eventually
 
try @ton.yeung npm install what i said
 
7:18 PM
in typescript, i want to declare a method within my constructor
ok
 
@Abhishrek it can
it works pretty well
 
so within the constructor, just call a method from within the class?
 
Its failing for me with every github repository
 
npm3 works better in windows than 2, but they both work
 
@Abhishrek how are you running it?
 
7:20 PM
lets try npm update
This is npm 3
 
does anyone here know dojo toolkit?
 
npm install leetreveil/musicmetadata
 
export class place {
	config: string;
	constructor(config: string){
		this.config = this.getConfig();

	}

	getConfig() {
		return "myID";
	}

}
 
This was interesting
 
7:22 PM
@Abhishrek works here
 
this.config = this.getConfig();
is giving me error
 
Let me update NPEHEM
 
@JoeSaad you shouldn't call instance methods from the constructor
it's an anti-pattern at best, disallowed by the language at worst
 
ok, so how do i call a method from constructor
 
That shit really fucked me up in college
When we used Java
 
7:23 PM
@JoeSaad you don't
 
if I want to use webpack to transpile ES2015 code to "common javascript", should I be using github.com/babel/babel-loader ?
 
you can either make it static (static getConfig()) and call it on the class, or you can use deferred initialization
 
If your method doesn't need instance properties
It shouldn't be in a class
If it must be in a class, make it static
 
@Meredith that's called a static method m8
 
A what?
 
7:25 PM
^
 
Never heard of it
 
you have so
24 secs ago, by Meredith
If it must be in a class, make it static
you said it right there
 
Wat is happening
 
:^)
 
you are the worst liar @Meredith
 
7:25 PM
@SterlingArcher That's enough internet for you.
 
@tereško do you want to output or get it runtime
 
@rlemon just output
 
@Trasiva but that was nifty D:
 
@tereško then yes, babel-loader
runtime is also neat (more for backend than front) with babel-register
 
@SterlingArcher So scripted
 
7:27 PM
public getConfig() = ():string => {
this line is still giving me an error
 
@JoeSaad that's not right at all
 
is that some crazy TS stuff?
 
you've got two real, workable options: static method or late initializer
 
():string
??
 
i just followed @ton.yeung
so what's the best way to do a return function within the constructor.. if not in the constructor, where
 
7:28 PM
export class place {
	static getConfig() {
		return "myID";
	}

	constructor(config: string){
		this.config = this.getConfig();
	}
}
 
Make it static or remove it from the class
 
just do that
 
unexpected token
 
especially since you're returning a static string in your example
if it won't actually be a static string, you need to do a different thing
export class place {
	constructor(){
		// nop
	}

	initialize(config: string) {
	  this.config = this.getConfig(config);
	}
}
otherwise you do that and call p = new Place(); p.initialize(...)
7 mins ago, by Joe Saad
export class place {
	config: string;
	constructor(config: string){
		this.config = this.getConfig();

	}

	getConfig() {
		return "myID";
	}

}
 
npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:202:12)
npm WARN addRemoteGit     at emitTwo (events.js:100:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:185:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:850:16)
npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:323:11)
npm WARN addRemoteGit     at emitOne (events.js:90:13)
 
7:30 PM
he already posted it
 
stuck there
 
now the error is: property getConfig does not exist on type place
 
@JoeSaad which snippet are you using?
 
@rlemon in past two years, JS (professional-ish) development has become a lot more complicated
 
@tereško ohh yea
 
7:31 PM
@tereško you mean we've actually gotten build and test tools?
 
in 2012 you could call yourself a "pro" if you knew what "a closure" is
 
it's more complicated but so much less janky
 
the build tools are/were shitty to use tho @ssube
 
@tereško you mean its actually sane to write js now?
 
export class place {
	static getConfig() {
		return "myID";
	}

	constructor(config: string){
		this.config = this.getConfig();
	}
}
 
7:31 PM
@rlemon I disagree, they seem pretty nice, especially compared to Maven.
 
@Abhishrek sane - I wouldn't go that far
 
@JoeSaad yeah, I screwed that up. Replace this.getConfig with place.getConfig
 
@tereško san(e)ta?
 
hi Meredith
it's been a while ago
 
Hi
 
7:33 PM
@Abhishrek Clear npm cache, retry
 
@ssube I suspect I am getting this impression, because I wen off to the "deep end" right from the start
 
@OliverSalzburg scared with my internet am scared if it will install anything beyond this point
 
@tereško part of that is because we don't have a good archetyping tool.
 
@ssube still there's an error
 
you have to put together a project from scratch with all the build scripts, which are ugly
 
7:34 PM
how are you?
 
Oh dear lord that damned repo is 46 MB :-@
 
still complaining about javascript's mutability?
 
place.getConfig under that . it says ';' expected
 
/me mad
 
How do you use html entities in a function in react, anyway? I tried { __html: "&whateverCode;" } like their docs say
 
7:34 PM
@Abhishrek which repo ?
 
@tereško Meh, no more complicated than Java's imo
And "real developers" have been dealing with it for years
 
@JoeSaad then fix your syntax
 
github:leetreveil/musicmetadata
 
@KarelG We started experimenting with immutable classes this week
 
@MadaraUchiha that means nothing
 
7:35 PM
@MadaraUchiha far, far less complicated
 
hostKey(letter) {
    return window.navigator.userAgent.indexOf('Mac OS X') > -1
      ? { __html: `&#8984;${letter}` }
      : { __html: `ctrl+${letter}` }
  }
 
Maven uses indecipherable XML that occasionally becomes magical
 
the mantainer forgot to update on npm
 
Gradle is just a clusterfuck
 
@MadaraUchiha a medium Mars lander is less complicated than Java
6
 
7:35 PM
with exotic bugs
 
what is the issue?
 
@Meredith with javascript? or in another languageN
 
it does dependencies weird and can rewrite itself as it goes
 
Yeah with js
 
@tereško How did he put it? Java is a DSL to generate long stack traces from XML files.
 
7:36 PM
@ssube I had to use ant to build the source code for an assignment when i did my CS studies. That was even more awkward than Maven
 
@KarelG aw man, Ant is a... hell of a thing
you're better off using make
 
To be fair, my one pet peeve is that dependencies can change beneath your feet automagically, then your build/app gets broken over a regression
 
The assistant refused to use an other build tool. (i suggested cmake)
 
@KarelG using ant instead of cmake is a solid choice
 
Unless you use shrinkwrap, which comes with its own set of STDs.
NPM really needs to sort that out
 
7:37 PM
I've used cmake on a few things and it's the worst build tool to get running
 
@ssube is cmake so bad ? it integrates the make and nmake commands
 
wake and bake
 
@KarelG the way they define projects has always caused problems for me, writing or using them.
 
it's detection of the platform/compile is not right, but if you set it up right, it does the job
 
@MadaraUchiha one thing that PHP was lucky with is that they have "one true package manager"
 
7:38 PM
@tereško That doesn't totally suck, yes.
 
@MadaraUchiha running a package proxy helps with that quite a bit
 
while on JS side of fence the battle is still raging
 
Now quality packages are the issue, really :D
 
@Meredith I'm intrigued. Please tell me more when possible :-)
 
@ssube Got linkz?
 
7:38 PM
@tereško JS uses NPM packages almost exclusively.
 
Have you used immutable.js?
 
bower is pretty dead
 
no
 
@ssube Except if you use polymer
Then you're screwed.
 
never heard of that library
 
7:39 PM
we run a big old (maybe 100GB) nexus server here
 
They use classes to make immutable data structures
 
proxy all our maven and npm packages through it
 
any idea what am i doing wrong?
 
So Map.set('key', value) returns a new map
 
our office can fall off the internet and builds will still pass
 
7:40 PM
Instead of mutating it
 
@ssube We use Artifactory here
But I bet it has that feature as well.
 
@MadaraUchiha We used to, until it exploded on us.
 
i declared a static method and trying to access it from constructor
 
It's honestly way less flexible than elixir-style modules but it has a nicer api
 
The way it stores artifacts on disk is impossible to clean up if the database ever goes funny, which it will do daily if you have more than 500k artifacts in a repo. :D
 
7:40 PM
Then what? How do you freeze your versions with it? (as in, do you need to write code, is there a plugin?)
 
So we ended up with like a TB of bullshit artifacts that should have been cleaned up and Artifactory kept watching them, so the whole thing just froze.
The UI and repo URLs all stopped responding or took 50s+, it was bad
so we switched to Nexus
Nexus 3 is adding Docker and for some reason Bower as well
 
@Meredith just checked this
 
@ssube We actually moved the other way around
From Nexus to Artifactory.
 
and there's a Puppet module to set it up and manage the files
 
Don't ask me why, I'm not well versed in package managing or Java.
 
7:42 PM
@MadaraUchiha why?
oh, damn
 
the only problem we've ever run into with Nexus is the OSS version not caching LDAP auth info, which nearly crashed one of our domain controllers (because Nexus was getting 50 req/s and AD got like 450 q/s)
they're slightly behind Artifactory in raw features, but much faster and use the filesystem instead of a bunch of scattered DBs
 
@ssube Honestly, if your product does what it says it does, and does it well, it's worth a lot more than another that has 2 times the features, but sucks at the core.
 
@MadaraUchiha that's why we moved over.
artifactory kept screwing stuff up and was taking a lot of time to manage
 
@Meredith the implementation is actually facade on a class that wraps the given mutable class. It just abstracts the complexity from a user to ensure that there is no mutability.
 
7:45 PM
Package managing is something I don't want to deal with as a dev
I don't care about the piping
I want to write application code
Not deal with environment or boilerplate
 
write em
 
The less for me, the better.
 
ok
 
@MadaraUchiha that's my job :D
 
something's confusing me again
 
7:46 PM
got bored of being a dev so now I run the CI tools
 
I have a code fragment let foo = 1
 
your knowledge in virtualization is very impressive @ssube
 
when I push it through babel, sholuldn't it become var foo = 1 ?
 
@KarelG It's not mutable unless you go against the grain
But that's all you need
 
7:47 PM
@tereško In most circumstances, yes.
 
then something's wrong :(
 
@KarelG ? I only know the basics, I don't manage our OS setup here at the office.
 
It's really hard to a) maintain immutability and b) make it easy to interface with
 
@tereško What's the exact code you're transpiling?
 
When you get into actually setting up a private cloud, I'm mostly lost.
 
7:47 PM
ah i was going to ask you if you would go further in becoming a sysadmin or VM manager
 
can someone telling me what i am doing wrong in this gist? gist.github.com/joeSaad/…
4
 
@MadaraUchiha let foo = 1;
 
Also, can you reproduce it in the babel repl?
 
i just declared a static method which i'm calling within my constructor
 
@MadaraUchiha no
 
7:48 PM
@KarelG I am technically a sysadmin (went from software engineer to systems engineer). It's what sales people like to call devops.
 
@tereško OK, how are you invoking babel?
 
as I said, something's wrong
 
@Meredith it's not hard if the specs specified that objects is immutable by default
but it didn't :/
 
@MadaraUchiha through webpack:
 
@Meredith It's really not.
 
7:49 PM
module.exports = {
    entry: "./src/main.js",
    output: {
        path: __dirname + "/dist",
        filename: "ler.js"
    },
    loaders: [
        {
            exclude: /(node_modules|bower_components)/,
            loader: 'babel',
            query: {
                presets: ['es2015']
            }
        }
    ]
};
 
@ssube not fun?
 
@KarelG it's a ton of fun. Right now, I'm writing a script to kick off a docker image and mount tools into it so devs can mimic CI builds locally.
plus moving to autoscaling CI
 
someone wants to paly overwatch with me? :D
 
autoscaling CI ? :P
 
some day
 
7:50 PM
as a developer, you rarely get to write a bunch of python and yaml, then throw half a TB of memory at problems
 
@Neoares I want to, but I am on linux :(
 
i suspect a painful moment ;)
 
unless you work in big data
 
@tereško You're missing a test property on your loader object
 
@MadaraUchiha How would you do it?
 
7:50 PM
I assist the sysadmin at our company because he's a good friend and we like to troll each other
 
@SomeKittens Spah-loosh
 
@Meredith I don't use Immutable.js daily
I just treat my stuff as immutables
 
This isn't about immutable.js
Just immutability as a concept
 
he once routed all my browser visits to porn sites
 
I still don't properly understand what it means to be immutable
 
7:51 PM
You can't mutate it
 
^-- lel
 
@Meredith Start with immutability at the function level
 
@KarelG gitlab's CI with docker. You attach docker-machine to openstack, give it the image to spin up, and it will start up build agents as needed.
 
@ndugger if you modify/edit/adapt an object, you get a new object returned, not the former.
 
Yes, but what does that mean in the context of writing actual code?
 
7:52 PM
That is, if I do const a = fn(b) I'm guaranteed that b will not change before and after the execution of fn().
 
developers put a YAML file in their repo and when they push, it builds
across however many machines it needs to use
 
@MadaraUchiha Now suppose you have the pure functions a, b, c, ..., z
 
@ndugger instead of myArray.push('foo'); you have to do myArray = myArray.push('foo');
 
And you want to apply them all to some input A to get Z
 
@MadaraUchiha yes, and I was missing module: {} wrap for the loaders
 
7:52 PM
@ndugger if you're pretty functional, nothing
 
works now
 
@Trasiva pewpewpewpew
 
@tereško \o/
 
i.e. Z = z(y(...(c(b(a(A))))...))
 
@SomeKittens It felt a little cheap because of the blatantly obvious 3d printing done for the pieces, but meh. I can live with it.
 
7:53 PM
@Meredith Yeah?
 
It's hella ugly
 
@Trasiva you're complaining about production values on a fan video?
 
@Meredith that's why languages have helpers
 
Especially when some of the functions have different arguments
 
@Meredith even in mutable language, a dev writing that is an ashole
 
7:54 PM
> I can live with it.
 
so you can do Z = A::a::b::c::d::e::f::g
 
In Elixir, you have the pipe/bind operator
 
although if you're calling that many things at once, it will always be ugly
 
So Z = A |> a |> b ...
 
const compose = (...fns) => input => fns.reduce((acc, fn) => fn(acc), input);
 
7:54 PM
@MadaraUchiha that doesn't prevent me from doing const r = Math.random()
 
@Meredith here's a oneline compose function
 
Or in js you can do Z = A.a().b().c()
 
const Z = compose(a, b, c, ...., z)(A);
Might need reversing the order, I wrote this on the fly
But you get the idea.
 
/me compiles node
let's see what strange errors pop up!
 
@MadaraUchiha That doesn't really help that much
You'd have to partially apply some of the functions
 
7:56 PM
@Meredith Why not?
 
Which, again, is ugly
 
@Meredith Partial application is also trivially written in 1 line
 
@SomeKittens build errors, yaaay!
 
@MadaraUchiha can I use same webpack config to build both normal and minified files?
 
@FilipDupanović wrong type of xcode!
@tereško no, as the config will specify if minification happens.
 
7:57 PM
@tereško I think so, haven't used webpack in a while, sadly.
 
@tereško actually, you could specify via command line flag
 
@Meredith Partial application in JS: Function.prototype.bind()
 
@tereško Webpack comes with built-in support for UglifyJS
 
so .. basically I should use a separate command to minify shit
 
Currying is pretty simple too
But you're reading too much into it.
I'm not saying everything should be pure function.
Just treat the data you pass around as immutable, that's all.
 
7:58 PM
I know how to partially apply functions dude
 
@tereško compile --> bundle --> minify
is the order I do it in
 
yeah, that's what I was getting to
 
but I use gulp or just npm scripts
 
You'll either end up with a lot of text on one line
 
Listen here, dude. I'm the dude that tells the dude to listen, dude.
 
7:58 PM
Or data that technically isn't immutable
 
@Meredith It's not immutable.
 
@tereško but for production only... it's super slow, UglifyJS traces it's own AST
 
Your convention treats it as such
 
Seriously dude that's what I've been saying
 
You don't get a guarantee of immutability, unless you enforce it yourself
 
7:59 PM
@FilipDupanović ugly isn't that slow. :P
 
@rlemon I am doing a fast-forward JS education here ... sometimes it takes a minute for me to arive at some conclusion :P
 
Which I do.
It's worth noting that I don't like functional programming for JS
There's an astonishing lack of tooling
And debugging is hell.
 
Like I said
 

« first day (2048 days earlier)      last day (2903 days later) »