« first day (2737 days earlier)      last day (2216 days later) » 

4:07 PM
 
I feel like there should be an elegant way to dynamically require modules in js
like a restricted syntax to use in import, so you can import a static array of things, or something
I'm often ending up writing my own module managers so things are much easier to write, but then intellisense fucks up
a solution would be to have a quick transpiler with this restricted syntax, and running the intellisense on the output of it
but urgh
 
@towc what's wrong with import?
 
Your tools should just be able to automatically add and remove imports depending on your code and remove the entire work from you
 
@Mosho not dynamic. It's not wrong, it's just different
 
you have dynamic import too
 
4:14 PM
This is not something you should have to burden yourself with at all
 
// I'll humour you this:
const stuff = ['a', 'b', 'c', 'd'].reduce((acc, path) => { ...acc, path: require(`./stuff/${path}`) })
// same as
const stuff = {
  a: require('./stuff/a'),
  b: require('./stuff/b'),
  c: require('./stuff/c'),
  d: require('./stuff/c'),
};
I should only need to write the e if I wanted to add another module, right?
which works in the first scenario, but not in the second
does your intellisense expand that reduce?
mine doesn't
nor I think it should need to
it should be part of some meta-language within javascript that is super easy to parse and run, and see if something would change given a change in any of the characters
actually, could be done with lisp-like macros
 
@towc What is your problem with just adding another const e = require("foo") line though? The typing you have to do?
 
@OliverSalzburg yeah
it's not enraging, but it's added burden I don't think I should have to deal with
 
Just macro it up in your editor, why don't you?
 
I mean, sure
 
4:22 PM
VS Code code snippets are really neat for stuff like that as they are directly integrated into the default intellisense
 
huh, that sounds interesting
 
	"ESLint Disable": {
		"prefix": "ed",
		"body": [
			"/* eslint-disable ${1| ,arrow-body-style,camelcase,indent,new-cap,no-empty-function,no-useless-escape,promise/avoid-new,promise/catch-or-return,promise/no-callback-in-promise,promise/no-nesting|} */${0}/* eslint-enable $1 */"
		],
		"description": "Disables the given rule in an area of code"
	},
That's one I use often. As soon as I type ed, it activates
 
oh, I mean, I have snippets like that
 
Ah, okay
 
I thought you meant that the dynamic integration was considered by vscode
in retrospect, that doesn't make much sense
 
4:24 PM
Oh no no
 
because the snippets are for static imports
 
I just figured, get one that activates on req and then you just give it the name as an argument and use that. Then forget about the entire problem
I've had the same problem for years in several areas of our code and ultimately surrendered and started making all imports explicit. IntelliSense is still fucked though, because certain constructs still can't be resolved
 
it's still cluttery and makes you focus on the wrong thing :/
 
For JS that is
 
and disincentivizes you from adding more modules
 
4:28 PM
We had shit that would readdir all .js files in a directory to auto-import them. Like, to save time, you know. That is just fucking stupid. In hindsight, I don't understand why that even feels like you're saving time. It's just a pain in the ass in the end
 
but really, js macros would solve this and so many more problems
@OliverSalzburg you don't need to focus on the stuff you shouldn't have to focus on?
it seems reasonable to me
 
Yes, a lot of coders feel like that :D
 
@towc what's your use case for dynamic module loading?
 
const getModuleReducer = (name) => {
  const onChange = () => {
    log(`door-change: "${name}" changed state`);
    checkDoorState();
  };

  return require(`./${name}`)(onChange) || (acc => acc);
};

const modulePaths = [
  'clock-events',
  'from-user',
  'manual',
];
const moduleReducers = modulePaths.map(getModuleReducer);
 
But the rules are laid out by the tools you use. Don't try to rethink what others already have set out as the rules. Use what you get to build what you need to build. Don't rethink the tools. And don't build tooling to make your tools better. This will bite you in the end when the tools change. And importing modules is such a minute detail of an application, it shouldn't be rethought at all IMHO
 
4:31 PM
I could be doing this by fetching the modules first, and then acting on them, but it seems like kind of a waste. I'll agree it's a bit hacky
it's easily doable with static imports, it's just not as easy
 
@towc a little smelly, but not too bad
not close to being worth losing autocompletion for though
 
4:52 PM
I've run into an existential problem it seems :(
I've tried rolling my own user rights system. - Where each user is given a specified number of rights. Which then correspond to actions that user might perform. Now the problem I ran into is: one such right is the ability to create new users. And another is the ability to give rights to such users.

Now when I initially boot up the server the database is (obviously) empty. So no user exists nor do rights exist. This means that I am not given permission to actually create a new user....
And I'm at a chicken-egg system: I need the admin user to do stuff. But to create an admin user I need to log in as "an admin".
How is this typically solved? While keeping it clean.
 
Bootstrap it by creating a default admin user
 
Isn't that quite unsafe? Since it would mean a password is hardcoded somewhere, and even if changed an attacker might crash the server which would then recreate the default-admin and opening a window for attack.
 
5:10 PM
I still couldn't find any answer for my question
2
Q: componentWillReceiveProps method doesn't run anymore when using redux to call api

SandroI'm going to call api using redux: I used axios,history,react-redux,react-router-native,react-router,,redux-promise-middleware,redux-thunk component to make api call using redux: I made Reducers folder and put all my reducer file there in their own file and combine them in a main file like this ...

is there anybody that can help me
 
lol it's snowing
 
@Mosho I can almost skate on my back patio
 
that doesn't look like a lot
 
5:25 PM
couple cm
it's mostly slushy right now, but it'll get harder.
4
 
 
user6514554
Hello
 
@Linus 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.
 
user6514554
@CapricaSix Okay
 
Anyone knows a working whois checker?
To check the ownership of a domain
 
5:41 PM
Press Ctrl + L, type "whois", et viola.
 
oh I should've said: one that provides an API I can use in my application, for automated tools.
 
Press Ctrl + L, type "whois api", et viola.
 
6:05 PM
ctrl + L?
it locked my windows session
2
 
@Neoares what browser are you on?
 
firefox
but had the focus in the windows bar
 
finally vanilla Factorio is getting a research queue
 
There are so many node packages
I can't decide which to use. I shall just code my own, right? :)
 
yes.
 
6:18 PM
Is there a blog which curates node packages?
 
@rlemon I sure hope it will
 
@RaisingAgent nope, and worse: most packages do sometihng but just not the way you want to do it. And then the powers behind them never find it necessary to open up more options.
 
"Last published: 4 years ago"
 
@Neoares windows + L does that
 
@GNi33 oh
c:
 
6:33 PM
or whatever that key is called
so you probably just fat-fingered ctrl+L
 
@MadaraUchiha @BenjaminGruenbaum what is the name of that service we use(d) to monitor the app?
 
@Mosho Kissmetrics?
 
no, not analytics
 
@Mosho alertra?
 
Application Insights?
 
6:40 PM
yeah that kind of thing
but I don't remember those specific ones
was something else
 
sometimes I should be running node with & at the end to make it run in the background, but I forget, so I stop it and run the command again, with the & after it
is there a better way to do this?
for a lot of programs, pressing c-z puts them in the background, but in the case of node, it just kills it :/
actually it kills a lot of programs
is there something I can do to node so it just puts it in the background?
 
@Mosho those were the two services, and NewRelic
 
newrelic, that was the one
 
Liqour gives me the worst shits the next day
 
6:55 PM
Bye, have a nice night
 
Is there a "type of keyof" from another param in TypeScript? So.. I have interface IPropReact<T> with the function receiveChange(name: keyof T, value: ?): void; Is there a way to tell TS that value must be of the type that was provided for name?
 
@RoelvanUden just keyof
 
So, no go?
 
I mean keyof should get you what you want
no need for typeof
do you have an example?
 
also this looks like a scenario for a generic function
 
6:59 PM
interface Dog {
  isGoodBoy: boolean;
  name: string;
}

interface DogHandler {
  inspect(name: keyof Dog, value: any): void
}

var a = null as any as DogHandler;
a.inspect('name', 123); // Invalid. Should be a `string`.
@Mosho ^. This of course uses any for value so no validation of values for keys.
 
you mean should be string
 
Soooryy, yeah, should be a string.
 
@towc ctrl-z puts it into background but suspended
So you have to run bg afterwards
 
interface DogHandler {
    inspect<T extends keyof Dog>(name: T, value: Dog[T]): any;
}
@RoelvanUden
 
... Whoah. You're totally awesome at these weird advanced types @Mosho. Thanks a bunch!
 
7:03 PM
welcome :>
 
Guys my monitor is just like me! it came early 😱
Chair too. Gotta build it
 
@SterlingArcher Oh nooooo
 
@KendallFrey Would you buy an "ASMR" audio of me just doing things at my desk?
 
never heard of alienware screens
 
My new mic (for recording guitar) produces really cool results when I just type and click around
Or drag my pick around the table
 
7:10 PM
@Zirak Not real ASMR, I hate that shit
 
Not real ASMR
 
maybe ambient noise
 
I don't have that kind of quality
hang on
 
for maybe a buck or two
 
7:14 PM
can you remove the hum?
 
With some post-processing to get rid of the background static...
Imagine the things we can accomplish
 
/me imagines nsfw things
 
what it needs is either about an hour of audio, or some application that plays sounds randomly
 
and a mic stand
 
So I can imagine I have friends, but not friends that loop
 
you need to work on filling out that desk
 
It's so dope <3
 
so, how overpriced was it?
 
@KendallFrey haha I'm about to build the chair, and I believe I have another package to open, but the main event doesn't come until tuesday at the earliest
 
nah, jk, looks nice, man
 
7:18 PM
@GNi33 actually it was about $300
240hz
 
oh that sounds quite reasonable actually
I'm pretty sure I paid more per frame than that
 
I actually don't know if Alienware is still this overpriced
 
pro-tipp: don't use css filter() in any real world application/website
 
most mobile browsers totally screw up things if elements have applied filters, especially on scrolling. Besides that, it smashes cpu/gpu usage even on desktop devices
 
7:21 PM
is the halo new?
 
new for this season
 
The other package was the dp cable, mousepad, and headset
 
what is it for?
 
the halo? driver protection
 
oh, so a sort of roll over cage?
 
7:26 PM
Well it isn't for rollovers, more for flying objects or obstacles in a crash
 
ah, I see
how is the new season? good so far?
never really follow F1. MotoGP is amazing though
 
It started after Bianchi's crash into a crane, which hit him in the head
@GNi33 looking good for a Ferrari/Mercedes battle
Vettel got a lucky win in Australia and a non-lucky win in Bahrain.
Bahrain was a good one if you like strategy battles
 
youtu.be/DIm2cqy7-AI?t=6m28s is that Gerhard Berger?
 
@SterlingArcher is it the 25' one?
 
7:34 PM
oh, and Vettel's post win radios are still as annoying, I see
 
I think the finns are the only ones that don't babble after winning a race
 
"Mamma mia, mamamama mia"
you're german, for fucks sake, just stop it
 
@KendallFrey holy thats so cool
 
@GNi33 Hey even Gasly was speaking Italian
 
with a fake italian accent as well?
but who am I to tell a highly successful sportsman how to celebrate his wins. good for him
did you ever watch moto gp?
 
7:37 PM
I wish they could do donuts
@GNi33 Nothing more than scattered highlight clips
 
if you like motorsports you should give it a shot I think
it's amazing really, constant overtaking and close fights
 
I just started watching RX more closely this year
It's what F1 should be
 
oh yeah
don't know, F1 just started to bore me pretty quickly
RX is the real fun in cars
 
I'm just glad it's not a Mercedes parade anymore
I started watching in 2015
one of the worst seasons
 
I did watch it a lot more in the Schumacher times
but at some point just lost interest
@KendallFrey I just love stuff like that: youtube.com/watch?v=JY9mrKR5SkA
 
7:49 PM
Chair is done 👍
 
@GNi33 I wonder who the idiot was that proposed the ass cam
 
@Loktar it's coming together <333
 
haha, it's actually better now, as it stays in plane
 
@SterlingArcher So are your mom and I
 
nice @SterlingArcher!
you got your computer?
 
7:51 PM
No D: almost literally everything but
 
@SterlingArcher that's a sweet chair
 
The monitor came 2 days early (giggity) so I'm hoping the tower does too
@ssube I'm usually incredibly picky about chairs and comfiness, but I took a gamble on this one. it's very comfortable!
And I mean.. how could I resist a 2 tone chair lol
 
yeah, that pattern is the best part, but if it's comfy that's even better
 
amazon.com/gp/product/B075YT6L1J/… if anybody is curious. initial score: 10/10
 
I need a new chair soon
 
7:53 PM
The leather is soft, so we'll see how it wears over time
 
@GNi33 tbh it looks more like dancing than racing. like what's the point of passing the guy if he's just gonna pass you back?
 
My apartment is a fucking trainwreck of boxes and packaging
 
putting on pressure, trying to push the opponent out of ideal line. Some of those maneuvers do work out if you're able to cut your opponent off then
 
Not looking forward to hauling that downstairs
 
put it all in one of the boxes, m8
 
7:55 PM
basically you get overtakes at most if not all corners of a track, not only 2 or 3 as in F1
 
rollsafe.png
 
there's too much lol but most should fit into the chair box
 
@GNi33 yeah, it sounds like a really dynamic race. Having small vehicles and more maneuverability. My dad used to non-professionally do motogp.
 
those motogp bikes are just ridiculous
 
yeah, he had one for most of the cold war, it was stolen from our appt complex when I was a few years old
 
7:58 PM
Especially dirt tracks, ruts are made, if you miss that, you lose so much speed
 
put some very talent drivers on top of them with seemingly zero fear judging by the few cm they leave between them even when doing top speed... and you get a fun race
 
it's also fun when they slide out (as long as they slide, the tumbles look painful)
 
high siders are what make me gasp every time still
 
high siding sucks
 
I can't imagine wearing one of those leather suits for a long time, they're heavy and hot
 
8:01 PM
Imagine that on a track too
so much heat
I tried on a full leathers... boy if you gotta pee you better not wait
 
(@ssube since you're the only one interested in these things)
 
hehe. I read about that last night, they were seeing whoamis coming into the honeypot installs.
 
Ew drupal
 
the article ended with "if you run an unpatched drupal installation, these might be your last few hours in control of it"
 
8:06 PM
wtf
 
I'm still trying to figure out that video
 
Hi, quick question, is there any particular reason something might work in a JSFiddle or chrome directly, but not in an electron app/instance?
 
 
Oh Jesus the hot wings are fighting back
 
8:08 PM
@Annabelle any console errors?
 
@ssube That's the thing, it didn't seem to want to give any console errors. For reference I am trying to make an electron page either redirect to a new page, or hide a form once information in it has been validated, however it does not do so at all.
 
what's the usual way to generate shasums for an entire directory?
@Annabelle can you attach a debugger and step through, or use logs to help diagnose it? an unhandled exception logger might help
 
Hmm okay, thanks!
I'll try doing that.
 
!!pizza 1920 1080
 
@copy ooooh nice
 
oh past 10 o'clock time for diner
 
Y u do dis, I got the egg pizza again :(
 
thanks for reminding me rlemon :P.
 
@GNi33 i find it amazing how good those suits work
you could win a bobsleigh match just diving into the glide with such a suit
 
8:20 PM
it's mostly abrasion
you can still die from getting run over
 
ye, but most slide out of the road pretty fast
... and then back on the road at the other side
 
@Mosho it does happen, sadly
 
on a side note, completely related, what is the most common 3d printing filament?
pla?
 
What should I error on "first"? - forbidden (no credentials/session) or badrequest (required parameters are missing)?
If a call to the server has both these problems, what would you expect it to return?
 
@Zirak Cool, I can also see the requests in my honeypot
15:31:20.450	1	0 B	115.74.121.123
adsl.viettel.vn
Thu Dau Mot, VN 	http@80
Sydney
method=POST
user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64)
path=/user/register?element_parents=account/mail/%23val
 
8:37 PM
@copy What a weird user agent
 
are you intentionally running a drupal honeypot?
 
I'm intentionally running an http honeypot
 
cool
 
Man WoW music is super soothing
I never imagined
I just rolled with it in game
 
8:52 PM
Anyone here by any chance experienced with pgadmin (the new client)? I notice that when I close pgadmin it still keeps the connections alive, which are thus "leaked" and I have to kill them manually.
 
I hope to live to the day when PGAdmin doesnt suck
 
we'll get a good git gui and pgadmin around the same time as the singularity
but only because it won't be a true GUI, we'll just be visualizing the data stream
 
good point on git gui
 
holy shit, bob's top tier bots don't consume power :O
 
9:09 PM
I have had a problem where I leave it.only in tests and commit that
so our build only runs 1 test
oops
chai.expect(numTests).to.be.greaterThan(400);
boom solved
 
Now you just need another test that checks this test
 
do I
 
It might be faulty
 
I tested it manually
by setting it to 10000
and seeing that it throws
because I'm smart
of course, that will only be a good test if we have less than 10000 tests
 
9:41 PM
Gotta get down on friday
 
9:59 PM
> a test to thest this test
 
10:09 PM
I just ate a pound of bacon
 
10:32 PM
Does the VR system have game compatibility?
Or can you use vive/rift or an off brand?
 
@SterlingArcher What do you mean?
Many games work on multiple headsets
 
More or less will I be restricted by the headset
I'm planning a future VR purchase and starting to do research
 
@SterlingArcher Somewhat, but not much
Steam is pretty good for games that support both, and sometimes even OpenVR
I have a bunch of Oculus exclusives, but tbh I don't play those much
 
So basically all major games will have open vr support mostly?
 
idk, but they'll normally at least have Rift+Vive
Obviously check the details of the specific games
 
10:48 PM
which one do you have?
 
Rift
2 mins ago, by Kendall Frey
I have a bunch of Oculus exclusives, but tbh I don't play those much
surprise
 
oh right lol
 
What genre are you interested in?
Don't be afraid to just say porn
 
That's a good question. I really enjoy horror games, but I'd like to play like skyrim, or other FPS/RPG games with it
lmao
 
I've never really heard of FPSs that work well in VR
 
10:53 PM
Yeah I can't see call of duty working lol
But like Alien Isolation? Hell yes
 
You get ones where you can't run, but that's a pretty big difference
Robo Recall is a pretty good one but it lacks depth
sports games work quite well
 
Really? Interesting
 
Yeah
something like soccer or hockey that's based on movement not so much
 
It looks like there's a lot coming to VR this year
 
Super Hot is quite cool in VR
 
10:56 PM
but Rec Room has a bunch of sports, like frisbee, dodgeball, paddleball
@copy oh yes
 
Frolf?!
 
yeah
 
This video just mentioned super hot
I'd like to try that
 
(Rec Room is multiplayer too)
 
@KendallFrey I think this is more a case of devs not being experienced yet with the immersion added by VR.
 
10:57 PM
@paul23 Well I think the typical run and gun has some pretty fundamental conflict between the "run" and motion sickness
 
@KendallFrey how do you have your trackers setup?
 
maybe with an infinite treadmill
 
Reviews say HTC tracking is better but how much better?
 
@SterlingArcher just normally. two on either side at the front of the play area
 
So like on my desk would be fine
 
10:58 PM
Oculus doesn't really let you place them just anywhere
@SterlingArcher Ideally they're elevated
 
I mean, I don't really plan on straying far with it
 
@KendallFrey that's what I mean, motion sickness is caused by the screen showing motions it shouldn't be showing. - you have to design your fps around this.
 
So the desk doesn't block tracking if you reach down or something
@paul23 Yeah, then you end up with a pretty different type of game
The closest I've seen is the teleport mechanic
 

« first day (2737 days earlier)      last day (2216 days later) »