« first day (2601 days earlier)      last day (2572 days later) » 

03:00
seriously, though. Most devs I have met in the field don't know server config, or even build scripts.
many don't want to.
some want to but should never be allowed near sudo
is there a way to configure (a particular instance of) express.static so that it only serves files on a subroute. e.g.
app.use("/demos", express.static(path.join(__dirname, 'dist/')))
hmm, how should I pass a message from a spawned process to its parent?
How can you get into being a developer without knowing anything about build scripts?
Oh yeah, not so long ago I was designated the nuget expert for our team
@monners .NET
@KendallFrey I stand corrected.
03:02
Or some static web server where you just upload js
@monners i'm an iOS dev. so are many i know. only maybe 1% know how to write a build script.
I learned to write code before I started liking and learning the tools involved.
Also this happened once
in C#, Mar 19 '14 at 18:30, by Kendall Frey
I am officially the Unit Test Czar of our team.
the only person on the iOS team who knows build scripts just moved to back end
Ditto, but it became very quickly apparent that, at least in the JS community, you're not gonna get to play with all the cool toys without knowing a little about build scripts
03:04
exactly.
@Luggage When I started writing code, "build" wasn't a thing, you wrote code directly into the finished project.
(VBA)
My first paid programming job was in VBA
My first bit of 'writing code' was fudging Lisp scripts in AutoCAD.
My first time working for money was VBA
but not a real job
my first was flashing machine codes into volatile memory ;)
03:06
lucky
its nice when you don't get schocked
does it make a lot of sense that installing from npm is a lot faster than copying node_modules?
and debugging requires an electron tuneling microscope
@Mosho not to me
well it is
03:07
how much is "a lot"
copy how? through a UI? cp -r?
xcopy
11 seconds for copying and 1.5 seconds with npm
copying with the UI in windows
so does anyone know why chrome might be adding a trailing "/" to requests? i'm seeing this behavior a lot and i notice a 304 javascript response in my dev tools / network tab
well, that paper flying through the air animation takes a lot
it must have, in windows 98
03:09
I bet the right kind of copy from the commandline would be fast.
windows sucks like that.
it's not like npm circumvents windows
At this point the most plausible explanation I can think of is you're using a hard disk and it's choking
Or Windows UI is just terrible
wouldn't it choke with npm too?
no, but the ui doesn't always use the same api as all other methods of copying
That little paper animation in Windows was the coolest thing when I first saw it.
03:11
I call shenanigans
it does it's whole merge folder things and all
@Mosho The idea is that downloading from npm is only writing to disk, whereas copying is reading and writing simultaneously
@Luggage no conflicts in this case
@KendallFrey it's not actually downloading anything, it's in npm's cache folder
so it's also a copy
but I mean, it's 10 times slower
what is it doing :|
In that case wat
@Mosho must be the progress bar :P
must be
it justifies its own existence
03:12
and that it tells you all the files, and a progress
by slowing everything down
the most basic api call to copy a directory does not do all that.
I dunno, doesn't sound like something that would take that long
if done properly
@Mosho Neither did the npm progress bar
the code that facilitates it probably has a few decades of technical debt though
03:14
I agree that it's stupid that HOW you copy or delete files in windows makes such a huge difference in speed.
But it always has been the case.
in my experience
@KendallFrey true
@ShrekOverflow upgrade/downgrade from high sierra to sierra today!
ok i think i've refined my problem. i want to serve static files ONLY for my /demos directory. however, the conflict is that i'm also using static file serving to handle sending my main bundle.js file for the react app.
so i have one line that covers the main bundle:
app.use("/", express.static(path.join(__dirname, 'dist/')))
so after i send the index.html (for all wildcard routes), the html auto-requests ./bundle.js and that middle ware properly sends it
however, if i go to /demos/ then it will fail.
which is why i want another middle ware like:
app.use("/demos/", express.static(path.join(__dirname, 'dist/demos')))
but both of these middleware are not playing nicely.
those two you listed are redundant
app.use("/", express.static(path.join(__dirname, 'dist/'))) will also serve /dist/demos as /demos
03:27
what url does not return what you want?
and is the code up-to-date on github?
ok this is weird. if i request "/test/" (chrome adds the trailing "/") and i look at my server logging i'll see that their is a secondary request for "/test/bundle.js"
that sounds like you left the path to bundle.js as relative in the index.htm
i'm now working on the actual codebase - github.com/AlexanderBollbach/hub
but wait.. /test/ should not respond with anything at all.
it will give an index.html
perhaps the static middle ware is not finding it.. so its falling through to the wild-card-return-index.html
right
03:29
and since you have ./bundle.js in your index.html, it then looks for /test/bundle.js
that should be absolute.
@William I might just switch to Solus
1 sec as I google Solus
Did you want ONLY "/" to return index.html, not "any other url"?
no i guess i want any (aside from the additional static file serving for demos) to
because my react routing will handle rendering 404s
ok, then we should be good, now?
03:32
Solus looks fine. Everything except video editing & adobe works well enough on linux.
how is your react routing going to respond to the url if you don't serve up the files with your routes in it?
there are several remaining oddities but some of the bigger issues are (at least temporarily) surmounted
he said he wants it to serve index.html for any. we're good with that, @david
@Luggage ah, okay good
but fixing the bundle path to absolute fixed the /test/, right?
03:34
one thing that is perplexing me is that if i am at "http://localhost:8080/demos" and i hit refresh it will append the trailing "/". now when i click on a react-router link ("<Link to="demos/one/">one</Link>"), then i'll wind up fetching "http://localhost:8080/demos/demos/one/"
that's another relative url
see a trend? :)
sure, it made it return the main bundle on those unknown paths. however, thats a bit out of symmetry with how i was specifying script src's in my demo html files e.g. i'd have it be "./bundle.js" so that on fetch its /demo/one/bundle.js . and not /demo/bundle.js
if the trend is url's w.r.t. dots and slashess are confusing and my ignorance of urls isn't helping then yes
no, the url in the <Link>
all the examples I see in the docs are absolute paths
your relative paths are 'adding'
ah
and yet the main bundle should be absolute?
or the main bundle as specified by the index.html's script's src
the bundle is absolute because it can be fetched from any url
so it must be
the Link url needs to be absolute for the same reason.
relative urls are only safe so use when you know the url. for an SPA, it's almost never correct.
like.. i see what you are saying after you say it. but i'm not intuiting any consistent rules about why and when to take a relative vs absolute approach.
i mean i'm beginning to.
but for whatever reason this isn't as intuitive to me as mapping over an array or something
so i'm using relative url's in the demo/<demoName>/index.html files
A K
A K
my shitty workplace let me go yesterday
it unclear to me why i do that except that the auto-generated request winds up having the /demo/<demoName>/ prefix when fetching the bundle.js
@AK sorry to hear that
A K
A K
03:40
it was way too toxic; they damnded that i work saturdays and sundays; attend weekly sunday 10pm meetings. work until 2 am
A K
A K
they also knew i was commuting 3 - 5 hours a day. got mad that i participated in dev forums like slack and stack overflow
did you make iphones for a living?
^ no not in california
A K
A K
and when i had free time, didnt want me to work on side projects
03:41
do they have suicide nets there?
A K
A K
my free time could only be towards work
in other words, if i worked on webpack stuff on my free time, they would be pissed
side projects like a porn site?
A K
A K
pay was horrible
haha i wish
ohh, ok
so, it sounds like they did you a favor.
A K
A K
or if i focused on learning new tools
like graphql or gatsby
such a toxic work culture
03:42
@AK I have heard jobs like that own all things made while you work for them. No matter if you are on the job or not.
A K
A K
i never got onboarded in my first month and they were mad i wasnt finishing tasks on time
so demos/one/ is relative. so is ./demos/one. but /demos/one is not.
A K
A K
despite having no one show me the architecture
they also didnt want me to go to meet ups
like, on your own time?
A K
A K
i coudlnt leave until 6:30 pm
03:44
no on theirs</sarcasm>
certain places are conservative w.r.t. code
A K
A K
well who shows off company code at meet ups?
lol
at one point i used promises which i felt made some async code very readable and it was rejected in favor of callbacks.
A K
A K
ewww why
async / await
for the reason that the promise library was a dependency and callbacks were not.
03:45
@AlexBollbach yes.
@AlexBollbach callbacks are obvious and won't deprecate. Libraries will. Not a great reason but yeah
A K
A K
hmm makes sense
get out
@Luggage also when i nav to a react-router link's "to" prop, i have to refresh to actually fetch the html. i think i can figure that one out though
promises are not a library
03:45
not even a good reason. promises are not a library. they are in the JS spec
@Mosho in the olden days yes
@William it wasn't like this library didn't have a ton of stars and active maintaining on github
are we in the olden days?
maybe. everything has been black and white all day
i should have a signature that appears w/ all my posts (i'm an iOS dev btw)
03:46
@Mosho he was referring to the past tense wasn't he? I'm explaining what went through their head there.
so it was a promiseKit for swift
sure
LOL but yeah you are right today there aren't really any excuses
@AK if it makes your feel better I consider programming more of a hobby of mine currently. I don't spend enough time upgrading my knowledge to do something like that full time.
I tried studying CS in college it was easy for the 1st couple of classes then got crazy hard
A K
A K
i love learning and solving weird-ass challenges
Not even to mention the math requirements for CS
A K
A K
03:51
and i destress by reading dev blogs, docs, or learning new tools
if i give you two containers one 3 gallons and one 5 gallons and...
A K
A K
and by participating in dev chatrooms like here or slack fe channel
if all that's taken away from me; how can i get better? or stay motivated
meth
A K
A K
it was a horribly toxic environment that doesnt support these things
we had 100+ outdated dependencies
no one bothered maintaining it until i came along
I can't put in more then a 5-6 hours of true thinking a day. My advice is get a grocery store job or some mindless job to survive and spend part of the day thinking and the other actually doing what you enjoy then.
A K
A K
03:54
@Luggage since you're using ts, are you also using webpack?
You'll think from 8a to 5pm with 45 minute lunch and like it.
ts does not imply webpack, but yes.
A K
A K
lol i wish we had 45 minute lunch; we only had 20 - 30 minutes tops
then straight back to work
are you using
https://github.com/s-panferov/awesome-typescript-loader
or
https://www.npmjs.com/package/fork-ts-checker-webpack-plugin
@Luggage lol yeah dream job definitely
awesome-typescript-loader
04:12
Hello
@FelisPhasma 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.
@Luggage thanks a lot for the help.
04:31
I am working with a very large canvas (about 2 million pixels). I'm using 32 bit pixel manipulation for increased performance, however it still takes my computer about 400ms to iterate over all pixels. Even though it is 2 million pixels, this still seems a bit slow. Any thoughts on how I could further optimize this?
04:56
wow this piece of shit modelsim program randomly puts up a server listening on 8080
what are you doing @FelisPhasma?
animations, static?
one immediate performance increase would be to use webgl
but hard to say much without seeing code
/me heads to bed
@Loktar Static. I'm rendering an image onto a canvas then doing some pixel manipulation on that.
Update: I've dug a little deeper and found that the call to `ctx.getImageData` itself is most of the problem
yea
that call is pretty slow
My pixel manipulation code takes about 70ms while the getImageData call is the other ~240ms... I think what I need to do is split up the processing into a bunch of chunks and then handle each one in a timer
Or a web worker
@Loktar good night!
see ya, and good luck! Check out webworkers if you're bored could split up chunks/data into those
05:14
@FelisPhasma is it not just one call to getImageData? i don't see how you can avoid the 240ms cost if thats that function's speed
@Loktar not necessarily
WebGL on its own will not do anything if his operations cannot be parallelized
06:02
how the shit do I tell docker to run my entrypoint with certain env variables
06:19
Ya gotta say please
06:38
@ShrekOverflow no, have docker start up the container with the env variables to run the entrypoint command
I want to do it from the Dockerfile
and ENV key value doesn't seem to work
That seems weird
yeah, but that's what I saw
I just uses arguments instead though
doesn't really matter here, but I was annoyed I couldn't do it
anyhow, off to bed
gn
hello, random question here
window.location = "page2.html" is not working for IE
but when i tested it in ff and chrome, it works
06:56
hi,someone please tell me how to specify the dateformat for datepicker ?
1 message moved to Trash can
@astrosixer Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
sorry
$('#fiscal_year_f').datepicker({
             dateFormat: "yy/mm/dd",
            changeYear: true,
            changeMonth: true,
            todayHighlight: true,
            // startDate: "+0d",
            autoclose: true
        });
I have tried all the format but no change at all, its showing in the default format
itself
@KevinB any link?
when you use jquery to get a height e.g. divWidth = $div.width(), it returns pixels (i think) is there a way to make it return a %?
07:18
Mathematics, usually works
although there might be a plugin written for it too
if not I think ($div.width()/$div.parent().width()) * 100 should work
if there is a plugin for that, then .... idk what I would do
@KarelG there is a helloworld plugin for JQuery I Bet
that is to explain how a plugin works. Kinda difference because i think that it is written as joke
07:37
Can somebody help with an example that is Iterable but not a collection(map/set)?
you have been here often. You should know that you do not have to ask for help. Feel free to ask your question. If one of us can help, we would assist ya.
@Zirak link to what?
gah, wrong target, damn chat always auto completes with a reply to zirak on my phone
wow apple, way to autocorrect my message to an insult
how is that an insult
Can I call a generator function, an iterable? as it is also not a collection
!!afk chat on mobile is awful
07:44
watup peeps
anyone else's chat bot died yesterday?
@overexchange uhm what do you want to ask?
@KarelG its samsung
I am calling 911
Although that is great news, I expect next gen laptop, phones to last much longer
however, there is a federal limit on how big a battery can be
let it be 10 cm x 20cm x 30cm 😀
@KarelG its in terms of Power
not dimension
power with a P?
07:49
yes W
IIRC its 99W for laptops
did not know that there are limits on the power usage of laptops
Wait i confused it
i meant WH or something
ah that
@KarelG I am going by the maximum as the maximum you can carry on the airplane
I only recall that power consumption should be lower than x value when a machine is in sleep mode like most TV are nowadays. They're rarely really off 100%
07:54
Macbook pro ships with 54.5 watt-hour
so, having a 99 watt-hour battery there will be just :wow: :D
I cannot power off my TV simply. The button is at the back. And the TV is placed on the wall.
lol convenience is not a key aspect
I am afraid though that apple might start shipping macbooks
with A11X Pro processors :|
@phenomnomnominal o/
Rust's generators are weird ||
@KarelG Learning about spliterator that provides a way to stream an Iterable that isn't a Collection.
08:12
You may be in a wrong room
spliterator is a java 8 feature
js does not have it methinks
Yes, my query was with regards to iterable and collection.
more like 7 hours ago, actually
@towc Good morning news!
Oh that's a sexy graph
08:40
Dear @AppleSupport, we noticed a *HUGE* security issue at MacOS High Sierra. Anyone can login as "root" with empty password after clicking on login button several times. Are you aware of it @Apple?
lul
What the fuck is that syntax
@ShrekOverflow hi
@BenFortune <> being desugared to <Fragment> ... well OK I guess?
08:58
@KarelG Yeah, rip syntax highlighters
So, big news today
Apparently Google has fixed the hamburger emoji
\o/
@OliverSalzburg did it become a whopper?
@KarelG The cheese was moved above the paddy if I'm not mistaken
ah that. I recall that
yeah
09:08
Will drop everything else we are doing and address on Monday:) if folks can agree on the correct way to do this! https://twitter.com/baekdal/status/924312294439444480
They also updated the holes on the cheese!
I feel so shitty now for not having Oreo on my device :(
Now I'm using outdated emoji
it's not much different to mm tbh
09:39
Dynamic Role Based menu and submenu In MVC any open source code?
please consult doctor Google for that.
So, you have no clue how to build it, so you want an existing open source solution, but you know that it must follow MVC pattern?
I'm not sure one design pattern of that scale is sufficient to implement a menu. Menus are a big deal
Oh hello
As a consultation, do you think advertising either according to the time (for example 1 month 5$) it better or according to the click (for example 400 click 5$)?
I'm trying to design my website policy about adv
Tfw you run a script directly on prod Just cause you dont have a way to test it thoroughly and it Just works
@Shafizadeh depends what your goal is
Ppv is something that mostly interests businesses that want to spread awareness about them
PPC is mostly used by those that want to maximize the conversion rate
09:54
well which one is more attractive for users?
Read what I said again. Either, depending on the users end goal
I see, thx
People who use ppv don't care that much if someone clicks their advert. They want to be seen, and seen as much as possible
HI, what is a right way to manage the nodejs api versioning?
Some might want to use a mixture of both
09:56
yeah got it
For different campaigns

« first day (2601 days earlier)      last day (2572 days later) »