« first day (2592 days earlier)      last day (2362 days later) » 

morn
 
At my dinner table doing 3D printing and then this guy comes up.
 
you have such a snake problem you have a dedicated snake decapitator handy. Good thing you are prepared.
works well on cigars, too
 
snek!
 
Exactly, I plan on smoking him after I remove his head.
 
1:01 AM
and a dell laptop
 
Hello everyone
can someone explain why this doesn't work [1, 2, 4, 5].filter((x) => {x !== 1})
 
then you have {} around the function body, you need a return
 
@hilli_micha Hope you brought your interpreter
hyuhyuhyu
 
Without the curly braces filter works [1, 2, 4, 5].filter((x) => x !== 1)
 
I used to have a corn snake
 
1:02 AM
@BenFortune My wife is evidently a death eater so I think we can work something out.
 
@danidee that is correct. Without the curly braces it will implicitly return the result
 
I always thought the curly braces were syntatic sugar (Since they can be omitted most times)
 
13
Q: Arrow function without curly braces

dkimotI'm new to both ES6 and React and I keep seeing arrow functions. Why is it that some arrow functions use curly braces after the fat arrow and some use parentheses? For example: const foo = (params) => ( <span> <p>Content</p> </span> ); vs. const handleBar = (e) => { e.prev...

 
@david Well it got me :-) i've been stuck for more than 30 minutes
 
1:04 AM
wondering why filter was returning an empty list
 
Wrong section, sorry for double ping
 
I thought writing drivers for Windows will be easy :/
 
Evidently it must be hard enough for AMD to never get it right hoyhoyhoy
 
@BenFortune No probs
 
if I'm cherry-picking, and there's a conflict, and I resolve it, do I have a shortcut to commit again using the original commit message?
god why is git doing this to me
has anyone ever got git to think the entire file, every line has changed
is that a line endings thing
 
1:23 AM
That ought to show up in the diff.
 
doesn't
just every line changed
no specific difference
 
tabs to spaces?
 
encoding?
 
I know what it is
 
m59
@Mosho That happened to me recently! I forgot how I fixed it :/
 
1:27 AM
at least what causes it
 
m59
also, hey
 
which is a real shame
 
m59
what is it?
 
@m59 :o you alive
 
m59
werd up
 
1:28 AM
how's it going ^^
been like a year
or two
hasn't it
 
m59
at least :)
I lurk around
just busy
 
that's what causes it
 
m59
so, you're switching to vim?
xD
 
nah, just not using that "feature"
 
m59
I guess you could do that
 
1:32 AM
I wonder how they got that to happen
@m59 what have you been up to then
 
m59
Writing code and we have a baby working on getting born :)
Having fun with flyd, ramda, and svelte (svelte doesn't belong with them, but whatever, I do what I want)
How about you?
 
gratz on baby :)
I'm back in canada
not much else
still working with react/redux
 
m59
props to ya
(pun intentional)
I appreciate react/redux. I make disasters with it, though.
 
I like what I ended up with after a year
 
m59
I still never got smart enough to deal with a lot of side effects and asynchronous state changes from various sources. I seem to be onto some good architecture using observables.
 
1:41 AM
observables were nice in theory
in practice, super hard to debug
 
m59
I think I did worse with react and redux than I did with angular!
 
will wait until they are implemented natively
 
m59
I don't need to debug them, i don't think.
 
what if you have bugs?
 
m59
Tests!
My tests are freaking gorgeous right now.
 
1:42 AM
still, you might end up with a bug
something you haven't thought of
 
m59
Sure, but the way I can tests my stuff is quite powerful.
 
what way is that
 
m59
It would take a while to explain it, but it's somewhat like cycle.js on principle. Not much like it in practice.
I keep state/logic separate from the view, like redux
but instead of stores and such, I have components that are a lot like cycle models
You can compose those and map them to a view
those components create observables up front for anything coming from the outside world (again, like cycle, but without drivers/sinks)
and they take a thing they can pump requests into
 
smart components then
 
m59
which is pretty similar to cycle drivers/sicks, actually
now that I think about it
 
1:47 AM
don't really know about cycle.js
 
m59
the point is, it receives all info from the outside world through observables it has upfront
it can hand those out when it sends requests out
 
observables left a little bitter taste for me
 
m59
So, what happens is that you can call any of the component's methods and see all the state recompute, and see it requests side effects, and pass it side effecty things and see what it does
 
but if it works for you
well, that sounds like any reasonable modern MVC framework
 
m59
Maybe. But I've never figured out how to do such things with anything else.
I see a lot of people doing some pretty annoying stuff to work around their side effects
 
2:37 AM
I apparently attempted to google a song last night and screenshotted it
@Mosho happy belated buddy ❤️
 
thanks love
 
user image
2
Why do I always end up meeting bros and never remembering
 
so literate
 
Considering I remember nothing it seems like the type id meet. I’m a total bro when I’m shithouses
 
i have a webpack build that compiles and runs successfully locally, but when i push to heroku it has a few "missing module X" errors
i checked that none of my dependencies were dev
 
2:53 AM
have you made sure that these 'X' modules are in your dependencies?
check them by name
 
you may have installed them without --save
 
it appears that one error was because i was importing the module from a file case sensitively
locally it allows this
which is odd because presumably heroku is using the same webpack config (which is what partially/fully? determines module import resolution)
 
ah, yeah... make sure cases match
 
perhaps npm is being stricter in prod
 
2:54 AM
are you on a mac locally?
 
running an express server on macbook yah
 
it's nothing to do with npm/webpack, it's an OS level thing
osx uses a case insensitive file system for some fucked up inexplicable reason
 
the other error was important from './folder/` where the modules name is 'folder/index.js'. again that seemed to fly locally, but prod was stricter
ahahahaha
 
"prod" will be linux
 
thats hilarious
damn u osx
what a failure to propagate errors up too
somehow i also can't do import './folder/ to get a module names "index.js" in linux/prod too
 
 
1 hour later…
3:59 AM
@SterlingArcher you end up exactly the reverse aswell.
@david that is indeed weird. I guess they are doing that to avoid you doing FileName and fileName and Filename?
 
well osx would treat all those as the same file
but would store it as whatever form you first used it
 
webpack can fix it by converting all files to lowercase on osx
 
it has a built in thing for that?
 
can, not does.
 
ah, seems kinda sad to have to use a webpack plugin for something the filesystem should do
 
4:03 AM
@david I don't think files should be case sensitive
 
i assume it changes imports, but does it rename the files on the HDD too?
 
it has mostly lead only to confusions on windows
and SVCHost.exe
 
you don't think they should be case sensitive?
 
@david as of now webpack does nothing
neither does node
it'll simply load each version (string) file
as a separate module
 
they will behave differently on mac and on linux
 
4:04 AM
yep
which is why I follow a case when I am making files
 
if you have a file called main.js and import Main.JS it will work fine on osx and then fail when you deploy it
it should fail all the time
 
I don't think anyone should even do it, I mean would you ever do
import "kappa-alpha"
import "kappa"
where you are supposed to do
afaik newer versions of Webpack warn you when you have inconsistent file imports, thats the way I expect it to be
@david ^
 
that's good
 
I have had that warning when a package I was using imported react as React
 
i get those warnings locally. didn't see them in heroku cli output
see them in chrome console
 
5:03 AM
sup
 
5:23 AM
howdy
 
 
1 hour later…
7:20 AM
@BradleyWilliamElko need a bit more work to answer that SO question but you can look to the neighbors when creating the array. Or apply a path finding algorithm on the generated array and use it to clear out 2's
 
@KarelG How do I make a path finding algorithm?
 
such thing exists already for years :) google "path finding algorithm" or look into A*
I think that you can use a modified A* to combine path finding and array generation. But that algorithm requires lots of memory
 
What's A*
 
!!wiki A*
...
In computer science, A* (pronounced as "A star") is a computer algorithm that is widely used in pathfinding and graph traversal, the process of plotting an efficiently directed path between multiple points, called nodes. It enjoys widespread use due to its performance and accuracy. However, in practical travel-routing systems, it is generally outperformed by algorithms which can pre-process the graph to attain better performance, although other work has found A* to be superior to other approaches. Peter Hart, Nils Nilsson and Bertram Raphael of Stanford Research Institute (now SRI International...
!!alive
 
@KarelG That didn't make much sense. Maybe you meant: live
 
7:29 AM
@KarelG does a solution to my problem require lots of code?
 
well. that requires some implementation yes. Lemme see if I can fiddle something in 5~10 minutes
if not. then not. I have to continue with my work
brb fiddling
 
hellou.
 
7:59 AM
@KarelG did you find it yet?
 
err no. What I was going to do was to create a 2D array with all 0's. Then created a directions object. Then started at first subarray, used a random function to determine the direction ect
here is my plan. But got distracted.
const len = 10; // ur array len
const a = ... // fill array, all zeroes

const directions = [
  {name: 'up', addx: 0, addy:-1},
  {name: 'down', addx: 0, addy:+0},
  {name: 'left', addx: -1, addy:0},
  {name: 'right', addx: +1, addy:0}
];

function getNextStep(prevStep) {
  // random choose between directions with a rule: it may no go inverse
  // eg if prevStep is 'up', then return may not be 'down'. Same for 'left', no return 'right'. No arg = does not matter
}

var pathX = 0,
    pathY = Math.trunc(Math.random() * len / 2);
do you see what I was going to do?
hmm, I need boundary check too...
just check if pathX and pathY does not go out of bounds
 
@BradleyWilliamElko did you look into maze generating algos?
 
if not, assign 2 otherwise choose something else. The condition is the most difficult part :p
 
unless im misunderstanding since I only skimmed the question
 
I skimmed it either :|
back to work
 
8:18 AM
@BradleyWilliamElko oh, so you just want to generate a continuous path, and not have any noise in the path array, right?
 
9:17 AM
how do I install a package from stretch on jessie
specifically chromium 62
 
Any idea why this div is greater than 50% width in terms of screen size?
  position: absolute;
  bottom: 10px;
  width: 50%;
  top:70px;
  margin: 10px;
  box-sizing: border-box;
 
@Zirak You mean something like Array.from({length: 5}, (x, i) => i)? I'd still use a loop probably - well, a generator.
 
fuck it I'm using ubuntu
 
@Mosho install puppeteer :D
That install chromium for you automagically
 
will it ;o
 
9:23 AM
Yeah
 
yeah makes sense I guess
screw apt-get
npm 4 lyfe
 
box-sizing: border-box; should make the width not more than 50% right?
 
why am I getting permission denied as root
 
@SuperUberDuper seems it should do 50%
 
hello
i have a problem with my css in reactjs
 
9:27 AM
@Mosho woof woof, a belated happy birthday
 
thanks :)
 
when i run my app there is all my css (<style>...</style>) in my header
happy birthday *
 
@Mosho stop entering those weird porn sites
Oh, happy Birthday, was Saturday right @Mosho?
 
omg haha
yesterday, by Badger Cat
YOU POSTPONED?!
 
9:30 AM
@BenjaminGruenbaum yeah, 18
and where would I go
normal porn sites?
 
I would see the reaction on your face @BadgerCat
 
@Mosho respectable sites, such as wikipedia.org
 
@KarelG how'd you get all the way up there?
 
sorry didnt save, jsfiddle.net/Fy8vD/3670
here it works, but in another case it didn't
 
@towc kendall's 3 starred msg
 
9:32 AM
I'm making a dashboard btw, flexbox isn't great for that
 
and noticed your conversation with badger
 
welp, fair
 
in jsbin, overlapping
In the fiddle, you can see that the margins overlap
 
1 message moved to Trash can
@KamilSolecki Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
9:38 AM
cap you getting a pounding
 
yeah @KamilSolecki, jeez
 
.body {
      margin: 0;
      padding: 0;
    }
 
apt-get is amazing
thanks for giving me node 4.2.6
 
> screw apt-get
@SuperUberDuper generally just add that at the beginning of any css, will make your life easier
 
ehm you need to remove that dot though
jsfiddle does it natively in its iframe window AFAIK
 
9:49 AM
@Mosho get a better repository?
nodesource is a good one if you want to get an up-to-date node
 
I just used nvm
 
you shouldn't
otherwise, yes, apt-get is a pretty good package manager, generally speaking
better than npm, at least
 
what's an example of a really good package manager?
 
depends upon which os you are using.
 
@thakurinbox 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.
 
9:52 AM
regardless
 
I'm not sure there's one.
it's hard.
 
@KamilSolecki that doesn't effect my question
I wonder if I can accomplish the same with flex box? I was having trouble getting the height to take a specific location of the viewport
 
Fucking Jetbrains software...
 
@KarelG Yeh accidental
 
YouTrack sends their test emails from a different SMTP host than the ones it would send when they are not tests
wtf
 
10:01 AM
@OliverSalzburg but They all succeed!
Always!
 
@OliverSalzburg it is likely that both servers have same environment setup. Only the difference is the domain. Should not be a big influence in its reliability :o
*should not lead to a
 
@KamilSolecki Actually, the test emails are the ones that are failing, because their host is not allowed in the SPF record
 
They are connecting directly to the target MX instead of relaying through the configured SMTP host
And their support assured me that that is not what happens
But I can see the email headers pretty clearly
It's always the same story with Jetbrains
 
Speaking of SPF, I remember once that I was provided only one out of 7 hosts
At that time I had No idea there were 6 more
So Every some time Id have to add one
 
10:09 AM
The worst part about stuff like this is that nobody has any clue what they're doing. You talk to Office365 support, they have no clue what the difference between -all and ~all is. You talk to Jetbrains support, they have no clue about anything
They only assure you that it's all your fault
This fucking company has cost me so much time and money :P
 
@OliverSalzburg the consultants are too scared to press the big defcon 1 button on their desk
 
Maybe I should at least move from their "in-cloud" to a self-hosted setup. That might make troubleshooting a lot faster at least
 
@KendallFrey HOW DID I NOT KNOW ABOUT SUCH AN INVENTION EALIER
 
where do we start
there seemed to have been a lack of knowledge about the invention, and you're trying to find out the root cause?
by taking a random arbitrary object, then chance any of us (except zirak maybe) are aware of it are 0
 
Yay maths
 
10:20 AM
now, in the more specific subcase of human-made objects across space and time, we need to find a way to categorize the objects
is one thermite launcher the same as another thermal launcher with a pin on the opposite side?
regardless of the analysis of the context, it seems that the cause is that you simply never encountered that object in a way that made you recognize it and jump in excitement before
you can't prevent not encountering arbitrary objects, but you can maximize your chances by being a weird random fuck and jumping around everywhere asking people what cool stuff they know about
 
wat
 
Just matei.
 
did I answer your question?
 
Probably.
 
somewhere in there
 
10:35 AM
The real answer is: It's because you touch yourself at night
 
^
 
10:52 AM
class A {
	constructor(...) { ... },
	someProperty = 123
}
this is not a thing in javascript, right? :/
I must have been fooled by typescript
I can still do A.prototype.someProperty = 123, but urgh
but in that case, I guess what I can do is this:
I actually wanted a static property, and was looking up the syntax
Object.assign(
	class A {
  		constructor(...) { ... }
  	},
    {
    	someProperty: 123
    }
)
actually, weirdly enough that doesn't define A on the top level
but I can still do this:
class A {
	constructor(...) { ... }
}
Object.assign(A, {
	someProperty: 123
})
but then it's weird because the rest of the static methods are still in the class. I can port them over as methods in the second Object.assign argument, but urgh
 
WTF is it with VSCode suddenly adding garbage import statements to my code?
 
s/e .+/e/
 
keh, a co-worker just complained about a silly bug issue
> problem: error msg shows "Coult not remove the flag: internal error". Could is with a 'd'
 
metabug
 
Tell him that's how you have to write it, so people don't confuse it with "cloud"
#notabug
 
11:19 AM
saw this link on HN: Modern IRC Client Protocol. I thought, "may be interesting. So opened a tab with that so that I would read it when I am slacking 10 mins off. Now, I went to that page and it is god damn huge
 
@KarelG Wow, someone wasted a lot of time on that
Must be close to the amount of time I wasted implementing client code for IRC :P
 
short read before bed
 
dhS
Hi
is there any way in which we can pass the data from controller to jsp page and back from jsp page to controller
using javascript
anyone pls guide me through this
 
Could you be less specific?
Because that would make it even more challenging to answer the question, which is what we are looking for
 
dhS
i need to add a text box on jsp page which loads all country name as i type first character
the list it fetches of the country is from the controller
and give it back according to the letter typed in the text box
 
11:37 AM
do you know how http requests work?
 
dhS
@GNi33 yes i know
 
do you know how to do one using js? "ajax" might be the keyword here
 
dhS
yes i know
 
so you basically know everything to accomplish what you want to do
 
dhS
could you pls explain how we can actually do this
i need to discuss the same
with ajax we can send the parameters to controller after that what we can do
all things are not very clear
 
11:41 AM
you listen to the typed in characters in your field (event handlers)
you send the typed in characters to your server using an http request
you get the response
how you present this to your user heavily depends on your implementation on the frontend side then, there's no standardized way here
 
dhS
can i use JSOn anywhere
 
yes, you can
 
dhS
where
 
basically, you want your server to respond with json data to you
 
dhS
so we can use json in controller
am i right
?
 
11:43 AM
you can make your controller method return json in the http response, yes
 
dhS
that's all i want to know
Thanks @GNi33
 
no problem
 
@OliverSalzburg I'm not even past the 2nd "PgDn" page and I already see bottleneck possibilities
 
11:59 AM
@GNi33 I don't find it weird
it's not really an unreasonable request
 
it is not
 
the request is to move it from "recommends" to "suggests"
 
I'm just constantly amazed as to which problems arise in the world of software
 

« first day (2592 days earlier)      last day (2362 days later) »