« first day (2293 days earlier)      last day (2878 days later) » 

17:01
Can anyone recommend a build tool that will take me far away from my (shameful) current workflow: gist.github.com/jakeNiemiec/5b1a1612e49b1c95a6243e9d8d6c1d67
It begins with: npm run build-init && concurrently -k -p '[{name}]' -n 'WWW 🌍, JS 🤖,SASS✏️,PCSS✒️' -c 'blue.bold.inverse,green.inverse,yellow.bold.dim,yellow.dim' 'npm run http' 'npm run tsc:w' 'npm run sass:w' 'npm run postcss:w'
Hello nerds
hello cat
Wes
Wes
@rlemon JS doesn't have these elephpantgettingsome.wordpress.com i repeat
@Wes thanks. I was just fired.
Wes
Wes
lol :P
17:13
why did i click lol
@rlemon format your code, man
I blame jsfiddle. Did it all there
is there any easy way to run a check for any unused dependencies in a project?
It's a poor craftsman that blames his tools
No it isn't. A shitty tool is shitty.
17:18
is console.error caught by window.onerror ?
@BenFortune it does, but if you're writing a big node app I wouldn't hesitate to use it and fix it when 8 lands.
@tereško things that invoke HostReportErrors end up in the error event (prefer addEventListener as you already know). console.error just writes to the console.
@Luggage
I blame the tools.
roll eyes
don't buy hammers made out of bike handlebars
I had that hammer for years
@Loktar can I pass a variable to webpack, when compiling?
17:25
@rlemon I...did you do that trying to take a nail out or what?
I want to toggle between devel/prod versions
alternative would be to just have two webpack configs
@tereško yea
No I was hammering with the claw
Of course I was pulling g a nail
@tereško webpack.config.js is jsut JS.
I actually have 2 configs based on dev or prod
but they both are imported into a common config
17:26
you can have any JS code in it to modify the output. see: github.com/luggage66/boilerplate/blob/master/…
@Luggage hos wo you change NODE_ENV ?
"dev": "webpack --progress --watch",
"lint": "eslint apps/**/*.js",
"release": "set NODE_ENV=production && webpack --progress --config webpack.production.config.js"
how I do it personally in package.json
it's an environment variable.
NODE_ENV=production webpack
may be different on windows
17:27
same in windows
const NODE_ENV = process.env.NODE_ENV || 'development';
prod config on mine just calls in the base config, so then I have 3 files base for everything dev for dev, prod for prod
easy to maintain
yea, i've seen that method, too. That works.
I used that somewhere.. I forget. require('webpack.base.js') and modify.
node env differs between OS, on linux you can set it within the code, windows you need the env variable
like luggage said
yeah exactly @Luggage
the "release" part above is setting the env var in windows
it's just SET whatevervar=whateverval
17:29
my version was the linux/osx version
nice
I said what what
Guys, what do you think the idea to try to "drop" the CSS and go to JSS =) We have preprocessors like Sass and Less but they are preprocessors still.
I was thinking on a new structure the all css could be done using json objects directly from javascript code
I hate it :p
css/preprocessors for life.
so we populate a json object and then output them as an CSS, this can be very powerfull
17:41
sure but you're still using css in the end
user406009
@GarouDan I mean, you can sort of do that with inline styles.
we can extend, measure things better too
seems better to just use css from the get go.
user406009
I think people have tried this before, especially with react.
17:41
for now, becase drop completly immediatelly will be impossible
yeah look into the existing implementations, there are many
aphrodite, radium,
css is so limitated
user406009
There are also people who try implementing new layout algorithms from scratch.
and the w3c is another limitated one
user406009
There was one that was really "popular", but it seems to have died. Just forget the name.
17:42
what I hate is anything beyond basic styling it gets ugly fast
if we could have at least a javascript and css repository the all comunity can work on github will be better
user406009
@GarouDan There are a lot of new features now though. Flexbox is a big change.
user1596138
limitated
user2620028
if you think css is limited then you haven't ever used css, nor a css preprocessor
user2620028
17:44
because css is powerful alone, add a preprocessor and you almost run out of complaints
I think a lot of the problem lies in people not even attempting to learn css
they get whatever they want styled and move on
user2620028
ehh i would admit to not keeping up with everything at times
I dont know if it is just an impression of mine, but looks like the things goes on a very unnorganized way. For example, if I would like to use python, ruby, etc is there just these ones. But when we go to css and javascript, w3c standards, all browser implements different and problematic things
not even talking about new stuff
just in general how to organize/build/ect.
user2620028
i didn't know about flex when it came out... and then i knew about flex and ... <3
user1596138
17:45
@GarouDan That's like. Old poeple stuff
user1596138
Mostly
like why does afloat behave this way, why should I use border-box here?
stuff like that.
when to use different position types, ect, ect lol
ran into a lot of people who don't even understand the flow at all, like what happens between relative and absolute positioning
You can teach CSS to a 6th grader in 3 hours of focused instruction.
@Loktar I'm not a css expert in fact, but I used it a lot. media-queries, complex selectors, cal new function, constants, display:flex and this kind of stuff, but comparing it with the resources that we have on a programming language is so so limitated
@Loktar Sounds like that belongs in a sex ed class
17:46
People should just learn it once, like HTML and carry on.
yeah just dedicate the time to learning it exactly @BenjaminGruenbaum
user2620028
you know something that really fucks with me? all the different values
user406009
HTML is much simpler than CSS.
user1596138
@BenjaminGruenbaum Challenge. Go
user2620028
when people use em, rem, pt
17:47
ah yeah just have to read up on appropriate use for those
Count me among those that like modern CSS and like a pre-processor (less or sass) even more.
rem > all
@Luggage nice :) wasn't sure where you would fall
wasn't sure if you'd be on the js css react bandwagon or not
@GarouDan literally: colors and fonts (20 minutes), backgrounds and borders (20 minutes), width and height and how they work (20 minutes), display block/inline/inline-block (20 minutes), position relative/absolute/fixed/static (20 minutes), flexbox (20 minutes), media queries (10 minutes),
Pretty sure that's almost all of CSS.
@ndugger almost convinced my to like aphrodite (inline css -> generate <style> tags) but.. only almost.
idk what rem means in CSS but as a Windows developer I'm pre-traumatized
user2620028
17:48
@Loktar now heres the kicker question, rem for font sizes or rem for everything?
@BenjaminGruenbaum haha I think you are over simplifying things a bit
Maybe 20 minutes about relative vs non-relative units (px vs em vs rem etc).
@KendallFrey It's a deep sleep you fall into after looking at CSS for too long
@Loktar yeah, but you don't really have to learn things like !important, super specific specifity. Maybe I'd add transform/translate and pseudoselectors (20 minutes each).
variables 20 minutes, functions 20 minutes, datatypes 20 minutes you know JS!
17:49
Any "JSS" tool will just use css properties but in a JS object. You get nothing other than an alternative syntax.
huhu
async functions take a bit longer
user406009
@Luggage There are some actual JavaScript layout engines. Like GSS.
perhaps, will look that up
@HatterisMad it depends I guess, we use px values for fonts because they want them exact
learning css is not hard, as Benjamin said, children can learn the principle quite easily. But bringing it all together, know all properties, what they can do, what they can't do and all that stuff, takes months
maybe years
17:50
@Luggage for now, just to start. But the browser could if it wants, render this special kind of json. Take a look. CSS valid files is almost a json one
I use px values for fonts, unless it's a style sheet for print, then pt values
I also use inch or cm in print style sheets
user2620028
@Loktar no i mean, do you use rem to make a website responsive. i personally use percentages and px for doing my dirty work. But i have run across many websites that use rem for everything and i can't say i am a fan.
margin: 0.25in;
user1596138
@Loktar Exactly! hahaha
In my opinion with we have more freedom to change the things is ugly ones in the browser or put new features in css would be very very nice
17:51
@HatterisMad oh hah just depends I guess lol
no solid answer really
we need to wait to the limitated w3c
but rem > em if you have to choose
user1596138
Why is everyone so bad at CSS then :hmm:
this bothers me
@GarouDan limited
17:52
@GarouDan I suggest learning sass / scss. It will let you make "functions", calculate values, etc.
that plus css modules to prevent style leaks and you have a solid foundation
heck yes
and some of that is coming to css as it is
even though I hate the syntax (variables)
yea, css has calculated values
user2620028
i haven't gotten to use css modules yet but i would love to :(
@Luggage Yes, we can do that. And Sass and less was created just because what I saying. Try to save CSS because it is very limitated
user406009
CSS does have some bad features though. The original box model is just wrong. Border-box is much better.
17:53
@GarouDan limited
@HatterisMad huh? what's that
yeah I mean css isn't perfect for sure
You miss my point. Anything you write in JS will convert to CSS*. If you don't know css you will have your hands tied. Just like those people that only want to learn a control library and never the html underneath.
Would be better if we could create a native and powerfull css inside the javascript
@GarouDan lol sorry not trying to be a dick you are just using the word a lot and your spelling is incorrect
makes me read an extra syllable in my head
user406009
17:54
@GarouDan People are doing that. See GSS.
user2620028
@taco scoped css, so all of your selectors are scoped :D
even tho I'm quite familiar with scss, I never really loved it or understood its purpose. CSS was intended as describing visual behaviors, no logic at all, which was a great concept. I do understand that people want to create so awesome effects and animations and stuff, but it really hurts the separation of layers and logic.
the Shadow dom also provides that which is great
@Lalaland gridstylesheets.org? if not, link, please?
just as react :p
user406009
17:55
@Luggage Yeah, that.
@Loktar spelling problems happens in the best non-english families
@jAndy yeah I think it's mostly useful for variables personally
I mean it's useful in lots of other ways, but variables should have been in css since the beginning
user406009
@Luggage I think there were some other attempts before, but I forgot the name and can't seem to find them.
@jAndy scss doesn't encourage you to mix logic, but it lets you make styles that know about other parts of the app's style through variables. Like a shared "headerHeight" variable that is used multiple places.
Yea I agree on that @Luggage @Loktar
17:57
@HatterisMad ah, so like namespaces for css?
Same with react. React does not encourage you to mix your logic.. it's jsut that bad programmers keep doing that because it happens to be the same language. Enforcing two different language for layout and logic only tied the hands of us that know how to separate our concerns.
however, I guess the possibilities with scss and sass go way to far then. Like a toy which can turn into a monster
you can already do too much with css alone
you're a css hater. Shh. :)
I like messing around with css, but I hate trying to make a website look good
that has less to do with css, and more to do with me
user2620028
17:59
@taco not really... just localizing all of your css changes so they can be scoped to match building blocks of code like components
it is a valid point whatsoever. CSS became a whole different ball game as it originally was intended for. I figure it all began with transitions and animations. Sass and scss are just consequential bringing more "some what logic" into that world
but I guess ... it has to be that way?
besides some "css only" games I have seen as toys or demos, I don't really see any mixing of logic into scss in the real world.
Well, because of this I would like very much they implement assembly to the brower soon
JavaStyleScriptSheet
user2620028
18:03
what do you guys think about writing html like xml. Wouldn't it be nice to not have to use div for every generic container. I personally think custom named html elements would be a really nice readability upgrade for both your html and css
user406009
CSS is gradually evolving and improving though.
user406009
Flex makes a lot of things much simpler.
@HatterisMad you can do that. html has methods for registering custom elements
Very kind of new things will appear and CSS will be on target
user2620028
@Luggage i know you can but no one does. best reason i have heard against it is so you don't accidentally use a reserved name in the future
18:05
How does javascript run in HTML page?
is there a special runtime that executes it?
Would you like us to google that for you?
I tried, all I got were results explaining how to run javascript
maybe if I had the name of the runtime that executes it, that would help
Maybe you should google how to google?
JavaScript (/ˈdʒævəˌskrɪpt/) is a high-level, dynamic, untyped, and interpreted programming language. It has been standardized in the ECMAScript language specification. Alongside HTML and CSS, JavaScript is one of the three core technologies of World Wide Web content production; the majority of websites employ it, and all modern Web browsers support it without the need for plug-ins. JavaScript is prototype-based with first-class functions, making it a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles. It has an API for working with text, arrays,...
well to be fair I'm using Bing, maybe that's the problem
@Luggage I'm talking about the principle. 5 years ago, if some block on a website moved from there to there, you could be sure it was triggered by javascript, so you knew were to look. This simple separation of concerns between layout, style and code got softened up a lot.
18:07
That's it. Bing is for porn.
powerful tools can be dangerous to use.
user406009
@erotavlas Yes. Every web browser has a JavaScript engine. Chrome uses V8.
user406009
Firefox uses SpiderMonkey.
user406009
Is there something in particular which you are trying to do?
@Lalaland ok I was just wondering where it was located. I was trying to think of how it works in comparison to something like .NET which also has a runtime environment
@jAndy and ten years ago if you saw round corners, you could be sure it was an HTML table and some images
user2620028
i will admit i worked on something fairly recently that was using three images and a table to create a variable width header with endcaps :O
True, but that was just a lack of the style layer then.
My point is, the layer which is responsible for style, visualization should probably not move stuff around or bring in any logic in terms of interaction.
But yea.. one could argue here that animation belongs to that "style and visualization".
18:18
Isn't there an effort to allow compiled code to run in a browser going on?
@TylerStahlhuth 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.
@TylerStahlhuth what do you mean?
there are lots of compilers that output js, and js is compiled in the browser
user406009
@TylerStahlhuth Well, sorta. There is asm.js and webassembly. Not directly running native code.
@TylerStahlhuth yea. wasm.
That's it
user406009
18:19
Truthfully, I doubt they will change much.
wasm could. a compile target for other languages.
It could make a browser more of a universal runtime for lots of other non-js code.
and all the major browser-makers are working on implementations..
I feel like web browsers have become a operating system in an operating system at this point.
ChromiumOS
I figure that's what the purpose of engines like V8 is. Keep the script language, but transpile (JIT) it into machine code on the fly.
18:23
Don't get me wrong, I like the idea of WASM, I just feel like it is going to be a nightmare for security.
so you have both, good semantics and syntax, but almost byte level performance
it's a sandboxed environment. it's better for security
it's foremost for 99% of all webapps completely unnecessary, if the Jitter which transpiles your ECMAscript does its job well.
how often do you code a game engine for the web...
me? not very often. but many people do
^^ right. unity.
user406009
18:25
The main issue I see is that all the native APIs are in js. If you use another language, they all have to be wrapped. That's sorta a pain.
maybe wasm will turn into a bunch of nothing.. but it has potential.
If you are porting some other app to the web, then you probbly only care about canvas or webgl.
user406009
You are also going to have performance issues as for a lot of languages you will have two language runtimes stacked on top of one another
I mean, it opens up more possibilities for browsers to be sure. There are plenty of things I would do client side if I didn't have to mess with javascript. Plus, It protects your source code better I guess.
not always, if you can properly target wasm. not all languages even have a runtime
user406009
Yeah, but most of the ones people care about have a runtime
18:27
ASM to WASM?
Imagine all the old c code that can now be run on the web (they already can be, but this might be better)
user406009
Well, a significant runtime
c, rust, etc.
Well, you wouldn't have to run it on your own server.
meaning cheaper hosting costs.
That's the big benefit i see
18:28
i'm not sure how wasm changes anything with your hosting..
user406009
C, rust and c++ are probably the only languages which could run with without a second GC layer
I mean you wouldn't necessarily need super fast processors for things typically done server side.
I am thinking GIS
AKA Google maps.
still no change. we aren't defering client-side code to the server anyway.
I just read that typescript is transpiled into javascript - does that make it slower to execute typescript than javascript?
18:30
Transpiling isn't done on the fly
oh I see
typescript is just JS that can check it's types at compile time. Once it's JS, it's just JS.
Not true, ESRI GIS stores the images in the database as indiviual pixels then re-compiles the image server side before shipping it to the client
with true webassembly, there will be threads... and that will be our end.. THE WORLDS END
For what reason? bandwidth?
18:32
Not sure why.
the reason will determine if that moves to the client.
wasm may play a small role, if it's performance.
but my intuition says 'no'.
@Luggage eh
Wasm is great for latency, not speed.
At least until threads land.
AND THE WORLDS ENDING
ahh, threads. the thing people think will fix all their problems.
More like cause all the problems
Threading is hard
It will be messed up
18:34
don't get me wrong. it's necessary for wasm to really be a universal runtime.
but with all the misguided complaints i hear about js/node and threads.. It will be abused and/or misunderstood.
then again.. these probably aren't the people that are going to be targeting wasm.
I don't feel to search for the great speech Mr. Torvalds gave on threads, but he said it all .. especially why threads in current architectures shouldn't be used by 99.99% of all programmers :p
I'm not sure I can sit through one of his speeches anyway. :)
A very intelligent jerk.
haha yea I know
user406009
Doesn't Firefox already have prototype shared memory multithreading features?
He's the kind of person I imagine would be in favor of mass genocide against Microsoft users
18:38
As much as I love git, for example, his comments about other systems are youtube-grade.
I can only imagine
I never understood why TFS gets so much flack, especially now that it can do both it's version of source control AND git repos.
ohh, well, TFS deserves it all. :)
TFS with git is fine, but the TFS native version control was just a confusing broken mess. My experience is limited to working with a repo made by people that didn't get version control, so it may be tainted.
Probably the later to be fair
You can do horrible, horrible things to git.
sure, you can mis-use any system, but I have many years working with (and admining) Source Safe, CVS, SVN, Git and a tiny bit of TFS
and Git is the simplest, most flexible system
CVS <3
creating a branch was so awesome
18:43
I can use CVS if I have to.
I think it's the simplicity of git that wins it over for me
I chose not to go near it.. but I could live with it.
SVN was way better.
certainly
especially later SVN with fixed merging.
and GIT was way better than SVN
18:44
It is.. but I can see how some people would stick with SVN. It had it's own simplicity in thinking about how you manage a team.
the central model can work in a small corporate environment (so can git, of course)
if a function is a 'first class object' does than mean a string is also a first class object - according to the definition of first class objects (I wont write it here)
yes?
yes and no
String type can be both; A primitive value but at the same time, it can be transformed into its "Object representation" any time if necessary.
you are free to pass them both around as any other variable. That's what people usually mean.
but the latter 'object representation' of string is first class then
18:51
THE SUSPENSE IS KILLING ME... waiting for an offer to come through
just forget about it and go play a game or somehin
:p
easy for me to say
the string primitive vs String constructor is a JS oddity that confuses this. All you really need to know about functions being first class is it that they are like any other variable. You can re-assign them, pass them as arguments, etc.
ok I got it
thx
I'm at a coffee shop. I have a call in an hour with a different company that wants to give me an offer, but I'm not waiting for a different company to give me an offer that I'd rather work for isntead
function foo() {}
var bar = foo; //can do this
baz(foo); //or this
18:53
@ndugger btw what kind of interview questions did you encounter? anything that people post online?
var x = 'The',
      y = new String( 'Game' );

x.you = 'lost';
y.you = 'lost';
I dunno. Interviews are easy for me, I breeze right through them
you'll find that x won't have a property after that code
y will
Most of the questions are usually about trying to gauge what kind of person you are, and if you fit the company culture
There was only a small handful of actual code related questions
i'm worried about technical questions mostly
18:54
Just know your shit, and only apply for jobs that you're qualified for. It's simple.
Not me. I'm worried about questions like "is it ok to punch co-workers" and "how many drugs do you take?"
and... don't bullshit answers, they'll know you did. honesty.
@SterlingArcher is always worried about questions like, "How much food do you waste by spilling it all over your desk on a weekly basis?"
"I don't know, but if I were to guess.."
18:56
Listen here fucko
You must answer in Kilograms.
You must answer using angular 1 directives
@jAndy Why would you ever use the 'new String("whatever")' version?
ng-goldfish={Number.MAX_SAFE_INTEGER}
@TylerStahlhuth don't. ever.
18:58
there is no safe goldfish when @SterlingArcher is around
That was my instinct
@TylerStahlhuth awwwww..I don't know :D but if you want to have "first class object" from a string, you need to do it that way, which was the original question
Everything jAndy said was right, but just don't use it unless and until you have a reason.

« first day (2293 days earlier)      last day (2878 days later) »