« first day (2464 days earlier)      last day (2709 days later) » 

11:00
@CrystalPaladin the room name changes frequently
right now its journey to adulthood via javascript..:P
@CaptainHere What do you think?
@CrystalPaladin autism?
The chatbot "Caprica Six" warned me not to continue any unwanted conversations... so I'm zipping it...
Sadly Im not using SVG. so I set the zIndex to 100 and that solved it. :D
Im still in school. SO Im not allowed here r what?
this chatroom hasnt gone full autism yet so you can be here :3
11:05
guys... anyne know how to trigger page download from javascript alone?
looked at moz developer network and found one... but it seems they've deprecated and dropped it...
@Zirak Ah. Gotcha. The autism is creeping up on me slowly :(
@CrystalPaladin did you try this stackoverflow.com/questions/8701432/…
@Zirak well, it is doable though, right? The inside logic may not be the same as the normal switch, but syntactically it can exist
@towc Everything's doable, the question is how well-understood it'll be
You don't want to add things to the language people will have a hard time using when the alternatives aren't difficult
Allowing only expressions now paves the way to a do expression
conceptually, it seems easier to understand as a developer I'd have thought. I don't base my knowledge of an understanding of how javascript actually works though, so I see how that could be something that people laugh about when they think "javascript"
11:16
var foo = match (something) {
  case { a, b }:
    for (var i = 0; i < a; i += 1) {}
}
// foo = ?
What's the value of a statement is the general question, and people don't know the answer to that question
The value of the statement depends on the memory it allocates?
what?
nevermind. I didnt understand your question though
What's the value of a while statement? What's the value of an if? What do they conceptually "return" if you could capture it?
// e.g. if this were possible
var foo = if (...) { ... }
// I'm fine with adopting whatever this returns.
// Maybe there can be a shorthand expression, like ternary, but extended

var foo = switch( something ) {
  case 'a': ...; break
}
11:20
Do you know what that returns, though?
oh wait, I see
I had a similar question a few months ago.
Is a For loop actually a function?
@CaptainHere no
for== function name
it introduces no scope
and parameters are expressions separated by ;, not values separated by ,
11:21
(var i=0;i<4'i++) atr the arguments
It's a piece of syntax
But do you know how it wrks internally?
@towc It creates a block scope
@CaptainHere It's not a function, it's syntax
@Zirak wait wut
You can't do var anotherIf = if
@towc for (...) { let blah; } // no blah outside for
11:22
!!> var a = 1; for(var i = 0; i < 10; ++i ){ var a = 2; }; a
Just like you'd expect
BLOCK scope
oh right! let behaves like that
I understand now
ok
thanks
who even uses var aymore
Im still convinced that for internally creates functions to perform its job
gotta do some research.
11:24
What it does internally is not important
v8 can run a spidermonkey instance and call that and you'd never know
hello
@Mustafa Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
@Mustafa welcome to the adult content room.
anyone understand the apache server for music?
ampache
sorry
11:35
Isn't it PHP?
php
web application

PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
ampache sevrer for music
hm;
thank you
coherent
sentences
do
you
even
you're welcome
12:13
what's a really good AP name?
there's no starbucks around, I can use "Starbucks WiFi" and make americans lose their mind
uuuuh! I could set up some sort of service on the internet where anyone can change my SSID for 10$
That sounds like a great idea
"Nazi" and "Fuck Jews" would be a favorite I guess
I don't know if there are laws about that
I mean, for 10$, I don't mind. At most I could use them myself to change it back
I was mainly thinking about advertisement
"visit <whatever website the person who pays will say>" or something
it will appear on people's phones in one of bratislava's main streets...
a whole new kind of spam
then set up a rpi to bluejack (or whatever the unsollicited messages via bluetooth attack is called) everyone around
and sell the message as well
@towc I had this guy nearby who had 'cyberpolice' as his ssid. So I changed mine to 'cybercriminal'.
guy/girl. I never found out.
~> sudo iwlist wlan0 scan | grep ESSID
                    ESSID:"wifi"
                    ESSID:"ANDREA"
                    ESSID:"UPC Wi-Free"
                    ESSID:"UPC1979931"
                    ESSID:"TPLINK"
                    ESSID:"ADB-D04951"
                    ESSID:"HP-Print-34-Officejet Pro 8620"
                    ESSID:"Typhoon"
                    ESSID:"ZTE-5JAPTP"
                    ESSID:"ah"
                    ESSID:"ah-visitors"
                    ESSID:"lucia"
                    ESSID:"ADB-727A51"
I'm "wifi", obvs
I haven't found a shop/bar/restaurant around that would be acronymized to (or whose fulled name is) ah
the people I was staying with before getting the apartment had an SSID of "Lord Vojeldort", which is an anagram of "cake fucker" in slovak
and their password used to be "fourzeros"
just so they could confuse people who asked for it
oh, GoT starts again tomorrow
12:41
oh nvm
13:11
What's a good choice for logging from node?
good = commonly used, stable, and moderately feature-ful, not the fanciest
bunyan seems to be the common google result, so probably going with that unless someone has a better idea
it probably really depends on the stack you're using
> from node?
well, a specific framework?
are you doing server stuff? Native stuff?
that shouldn't matter..
logging is logging.
then how about console.log 😛 that's about how agnostic/stable as it gets. Well, and have it just add a line to a log file
13:21
Something's free on steam
No thanks. I don't want to re-write features like log-levels, timestamping, etc.
@Luggage Look up winston
that was the other name that came up with bunyan. i did a search in this room and saw ssube recommending bunyan so I started with that one. Does winston has some specific advantage over that, or just the one you like/use?
bunyan's also neat
Nothing too special really, try and see
13:38
@Zirak haven't seen you in ages - when are you coming by?
He's right behind you!
I replaced a shitty half-broken windows VM (didn't transfer from VMware to VBox well) with a windows server instance in google cloud that I only spin up when I need. Much better.
also, frees up a lot of space on this 256gb ssd
@BenjaminGruenbaum I'm still down south for the month
@Zirak ok, come visit my new owrk
work
I will
13:49
right after the video cut there was a crash of glass.
@rlemon why are there cups inside cups in that gifv
The Jägerbomb is a bomb shot mixed drink that was originally mixed by dropping a shot of Jägermeister into a glass of beer. Later, beer was replaced by Red Bull or other energy drinks. In German-speaking countries, it is called a "Turbojäger" or a "Fliegender Hirsch"/"Flying Hirsch" (Flying Stag)—where "Fliegender" is derived from the slogan "Red Bull verleiht Flügel" (Red Bull gives you wings) and "Stag" originates in the Jägermeister logo. A long drink mixed with Jägermeister and Red Bull is called "JägerBull". In Finland, it is called an "Akkuhappo" (Battery acid, with the energy drink used...
@rlemon wow
> js-joda has a lightweight footprint, only 43 kB minified and compressed, no third party dependencies.
How is 43kb gzipped "lightweight"
marketing.
14:12
@BenjaminGruenbaum lol, that's bigger than react
@FlorianMargaine yeah
You can just do:
 class IDate extends Date {};
  const wrap = fn => function(...args) {
    const d = new IDate(this);
    fn.call(d, ...args);
    return d;
  };
  const setters = Object.getOwnPropertyNames(Date.prototype)
                        .filter(m => m.startsWith("set"))
                        .map(d => [d, wrap(Date.prototype[d])])
                        .reduce((o, [n, fn]) => Object.assign(o, { [n] : {value: fn} }), {});
  console.log(setters);
  Object.defineProperties(IDate.prototype, setters);
Immutable date, tada
might not work I just wrote it in the console
pretty sure it's just a port of C#'s joda, or w/e the name of Skeet's library is
gitlab is down :(
I have noticed as good names disappear people resort to things like the following
- js-name
- name.js
- name-js
Can't wait until people start combining them
hey, hi guys, any react redux gurus around ?
some react component composition aspects trouble me this days
14:28
js-name-js.js?
^ definetly a good idea
js-leftpad-js.js
name/index.js should do it :D
@DanOchiana No on ever responds to the "is anyone good at this topic?" as it's a pre-commitment. Just ask, please.
But weekends are pretty dead around here, so you'll only have a few eyes on your question.
but i'll tell you you have a few people that know react lurking, but I don't see anyone that I know uses redux.
I think I'm about done with my JS date library
clear();
{
  class IDate extends Date {};
  const wrap = fn => function(...args) {
    const d = new IDate(this), ret = fn.call(d, ...args);
    return d;
  };
  const setters = Object.getOwnPropertyNames(Date.prototype)
                        .filter(m => m.startsWith("set"))
                        .map(d => [d, wrap(Date.prototype[d])])
                        .reduce((o, [n, fn]) => Object.assign(o, { [n] : {value: fn} }), {});

  for (const time of ["Time", "FullYear", "Year", "Month", "Hour", "Minute", "Second"]) {
Feedback welcome
14:30
thanks @Luggage
Use by running in console and then doing var d = new D() and playing with it
@BenjaminGruenbaum
is that suppose to produce a immutable date type ?
Yes
That has all the regular date type properties
hmm, gaved it a shot
was able to call setFullYear, setMonth and mutate the date
No, it returns a new date instance
14:35
I like it for it's simplicity and I see the value of the addX() functions (I use them all the time) but it doesn't replace all the reasons I use moment.js (and the reasons I may use date-fns.org in the future).
var test = new D()
undefined
test.getDate()
15
test.setFullYear(2016)
1468593179831
test
Fri Jul 15 2016 17:32:59 GMT+0300 (EEST)
test.setMonth(2)
1458055979831
test
Tue Mar 15 2016 17:32:59 GMT+0200 (EET)
the setX() methods are from the built-in date.
No, it overrides them and they return a new date
@DanOchiana ^
@Luggage read the code
14:38
yea, i missed that part.
I think it's a lot smaller and neater than moment or date-fns, but you can use functions you need from date-fns and they'll work most likely (like format etc)
Moment is 16kb gzipped - that's also pretty big
yea, it is.
date-fns is 10.8kb and relies on your ability to do tree shaking which webpack doesn't do
This is under 20 LoC and does the most important part anyway
yea, it doesn't cover my formatting cases, but most of what I would need.
Formatting is pretty easy with dates anyway
14:43
I use the formats like "4 hours ago" and all those types of friendly ones for the UI
oh, that's timeago
You don't need moment for that
but formatting / timeago / calendar is a separate need anyway.
and even then, I'm not sure I'd bring a whole library for it since it does all locale
yes, i know, but i picked moment a long time ago and just stuck with it. it wasn't priority to change.
14:44
hence date-fns which lets you import single functions :)
Yeah, I wonder if people will use this silly date thing I wrote - hmm
It's the same thing with moment/jquery. The existence of a much slimmer library that does 95% of someone's needs doesn't win against the known names that people think they need at first and by the time the realize they don't it's too much hassle to change.
@BenjaminGruenbaum depends, how big is it when gzipped?
lol
might be bigger
@FlorianMargaine about 1kb :D
14:53
That's too big, no thank you very much
Oh well
I added timeago for @Luggage
What did you mean by calendar by the way?
You actually use that :O?
sometimes, yes.
15:05
@KendallFrey youtube.com/watch?v=pHJmSvAUoPA&feature=youtu.be at least his priorities are there, quick proposal, then back to the ice.
games gotta get going
516 bytes gzipped
:D
(Including timeago)
15:49
@rlemon insane luck that it didn't hurt him
I like how happy he is when he realizes he didn't lose half his face
@Luggage oh, ok, good luck :)
@Luggage what's the job like if I may ask? (you can answer by email if you prefer)
my old place. new project.
(the place a left a few years ago)
16:00
such missed potential
ohh, because part of me feels like I am taking an 'easy way' with going back to that job. Even though, i'll be on a decent project.
:/
good luck Luggage
16:02
you always give splendid advice in chat. Chances are whatever your choice is, it's the right one
user6560716
Is it OK to eval user input like this: eval(prompt().replace(/[^0-9*\/+ -]*/, "")) or is there security issues?
@programmer5000 hmmm what's your end goal?
unless you're doing some kind of repl, it's never a good idea to use eval
are you just trying to get a number?
try Number(prompt())
looks like trying to allow basic math.
user6560716
@Luggage yep
let's see, how to break that
user6560716
16:05
Does allowing ( and ) change anything?
user6560716
I might do that
though.. they can alsways open a console..
user6560716
I don't allow [ or ].
user6560716
And it's node.js, not browser-side
for one, you can break past safe integers
16:06
where is the source coming from? prompt() is client-side, right?
user6560716
So what?
if it's on node, you can sandbox it. one sec, i'll link
user6560716
@Luggage it will come from a URL param , prompt is for testing on client side
if it's on the backend, I recommend importing some form of maths expression parser
user6560716
@towc So what? I will wrap in try/catch
16:07
so you can also add better things for the user
ok, then you definateyl don't want to eval on your server from a url, but there is a safe way.
@programmer5000 that's not all there is to it
user6560716
I only need basic math
user6560716
@towc what else is there?
going past safe integers doesn't give an error
I'm trying to think :P
give me a second
you can definitely break it one way or another
you can hang the whole server I think, by exploiting long chaining of exponents or whatnot
16:08
You can use node's vm module.
user6560716
@towc Really? Can you give an example?
Then as you allow more things like (), you won't need to worry.
@programmer5000 I'm trying to think damnit
user6560716
@Luggage that says Note: The vm module is not a security mechanism. Do not use it to run untrusted code.
well, good thing is exponents only go up to infinity and don't try to evaluate further
16:09
ohh. doh.
good on you for reading docs. :)
are you giving the string a maximum length?
still.. i thought you could deny it access to your global scope and require() and such, making is fairly effective
way more than eval()
I can't think of anything, it's a really interesting problem :)
() don't introduce any kind of entity, so should be fine
adding [] will give issues
the safest is just parse it. the example for peg.js uses basic math as it's example parser
16:14
then you know that everything is only used how you define
there's some stuff to worry about in second-order parsing
but as long as that's the first time you're using the string, you should be fine
and somehow using $1 and other regex stuff. I think everything should be covered though
I wouldn't use that replace, but I can't think of a way to break it
that is very far from "there isn't"
16:31
ohhi
starting a less modded survival fo4 playthrough, so maybe i'll be less overpowered
regex is mindbending stuff
17:07
Hey Guys I have a question
I have a div with scroll set to auto
But when I scroll and reach the end, the parent div starts to scroll..
@CaptainHere that's normal (and annoying). You might be able to 'stop propogation' to prevent it.
Oh Thank you Luggage. My Buddy Luggage is always there to help. :D
@KendallFrey Wow You wrote your own language!? Awesome man
It's not a complex language, but fun to play with
17:25
fun in the 'dwarf fortress' way?
@KendallFrey When is a bool not a bool? Nice article
oh geez not my old blog
Cody is a fucking wizard
17:56
!!rimworld or ksp
@KevinB rimworld
Do you need to call webkitRequestFileSystem every time before you write or read a file?
@McLemore Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
huge raider attack in progress
Is that a vertical entrance?
17:58
wut
Or where's your base
it's in the middle of the map, they'll be coming around one of the sides
but it's a mortar attack
so i dunno what they're gonna do
so not on the screen?
What's that thing in the middle of the screen?
just ruins
oh boring
18:00
none of my turrets are wired up yet either
whats this game?
!!rimworld or ksp
@CaptainHere rimworld
looks like pokemon leaf green
gonna be a big mess to clean up
Why are the characters so tiny
18:10
hi to all
could i ask a question regarding a question and two asnwers?
!!welcome NinaScholz
@NinaScholz Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
ok, thanks. it's this question: stackoverflow.com/questions/44691619/… and the potential answer of the acepted answer
as i see the question, the solution is not more to shorten the condition, because of the nature of two areas who are affected.
I need some help adulting? Anyone got any ideas?
Go balance your personal budget.
19:04
so ... is Rimworld worth buying?
19:26
resounding yes from people in here
ok. adding to the wishlist
19:42
don't trust people on the internet
they might not have pants on
I just realized I don't have one of those drying things for clothes
19:55
17 hours ago, by Kendall Frey
user image
I was able to research a tech in under 10 seconds with this
Is that vanilla?
so not vanilla/
Right, I prefer chocolate
Or modular sub-factories as the case may be
20:01
ha
room topic changed to JavaScript: Topic: JavaScript, ECMAScript. Read this: javascriptroom.github.io/rules. Before asking inform yourself on the XY problem goo.gl/taIqf | devdocs.io Documentation™ Helps. Room meta discussions: github.com/JavaScriptRoom/culture [ecmascript] [ecmascript-6] [javascript] [nodejs]
Anyone knows of a service like camelcamelcamel only for all amazon regions at once?
20:54
❤️
@KevinB is that plains? I usually go small hills or large hills for that reason
If this get really bad, my drop pods are in a cave, I can retreat, grab some survival meals and bug out
21:14
@Luggage which gamei sit?
rimworld, of course
do you even room17?
I do but I conciously ignore screenshots
just raided by sappers. I am going to find the guy with the best shooting and use my 'phyic insanity lance to turn him against his peers at the right time'
wow Rimworld is expensive
so many DLCs (paid)
yikes it costs > 20% of my salary
what? there are 0 dlcs
ohh, those are just wayts to get extra bullshit like "name in the game" the base game is all you ever need/want
21:36
guys
I need a new name for a new project
halp
I already have a prototype
esQuery
it's an HTTP proxy that lets you inspect the request/response and change them, all in the terminal
ideas?
Request Diddler
Requester Molester
WhiteVan
... that's a weird chain of thoughts
I was originally going to go for a forgery theme, but couldn't think of anything
RequestShop (like PhotoShop)
or chop
21:44
@FlorianMargaine httpickle
naming things is hard
naming things is hard
alternative facts requests
iphone
sydyk it is
21:46
roax: request + hoax
why don't you use a thesaurus
I use power thesaurus
best thesaurus ever
@rlemon I like that, actually
@rlemon can I steal it and never mention you?
yes
and I'll use HTMLemon
or HTMElvis
21:50
Anybody remember @RyanKinal's $.makePage? github.com/ryankinal/makePage
That was some great collaboration
I do!
I thought it was rlemon's tho
is it bad or good to post huge chunks of code in here?
bad
ok well I posted this in code review codereview.stackexchange.com/questions/169354/…
It is reduce heaven, for those who like reduce

« first day (2464 days earlier)      last day (2709 days later) »