« first day (2489 days earlier)      last day (2457 days later) » 

1:01 PM
guys in react 15.6, is this an okay strategy for loading data which may throw an error?
  async loadData() {
    try {
      this.setState({ error: null });
      await Promise.all([this.props.getDomains(), this.props.getProjects()]);
    } catch (e) {
      if (e && e.response) {
        const msg = await e.response.text();
        this.setState({ error: msg });
      }
    }
  }
 
is there any guarantee the state will be set before the promises are resolved? or failed as it may be.
 
^ This is what you get when javascript tries to become a real language
 
lol
 
Not sure, actually, I think react 16 has the componentDidCatch which feels more ideal for this situation
 
you already building your i9 box?
 
1:13 PM
@corvid no, use a disposer pattern
@rlemon definitely no
@corvid no, just try/catch
Also, I think it's fine, it is guaranteed err won't be set to null after it has been set to {error: msg} (setState is ordered).
 
@rlemon do you remember sending me a few SO links an hour ago or so?
 
Also, your components should likely not make ajax calls.
 
yes. but you can just ask the question
most people in here are good with promises.
 
I implemented async function in that link
 
@BenjaminGruenbaum It's redux actions, but I manually throw the error again if an unexpected error occurs. Also, your answer is the top one for "disposer pattern" when googling it
 
1:14 PM
but I'm writing a Node.js app
so it didn't work
 
how did you write it? and what is 'didn't work'
are you getting errors?
 
112
A: Resolve promises one after another (i.e. in sequence)?

Benjamin GruenbaumUpdate 2017: I would use an async function if the environment supports it: async function readFiles(files) { for(const file of files) { await readFile(file); } }; If you'd like, you can defer reading the files until you need them using an async generator (if your environment supports i...

 
yes. I want your code
not benjis
I've seen his
 
export function getProjects() {
  return async dispatch => {
    try {
      dispatch({ type: REQUEST_PROJECTS });
      const projects = await axios.get('/projects');
      dispatch({ type: RECEIVE_PROJECTS, payload: projects });
    } catch (e) {
      // handlers here for specific responses
      throw e;
    }
  }
}
 
1:16 PM
1 message moved to Trash can
 
don't have a variable named Array :D
 
@jason Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
1 message moved to Trash can
 
you want a generator?
 
      async function generalfunc(Array)
      {
        for (var i = 0; i < Array.length; i++)
          {
            const single= Array[i];

            await myIterator(single, i);
          }
      }
I want to iterate on Array one by one..
I want more like an iterator
 
Array is a reserved word, pls don't
 
1:19 PM
yeah, it should be myArray
 
 
@jason create an object that behaves like an iterator then ...
 
I have no clue what you are trying to achieve tbh
 
fn1().then(fn2).then(fn3).then(fn4)...
is my understanding
 
how can I do that inside a loop? :S
 
1:23 PM
he has a series of async calls that rely on the previous reply
 
Literally my answer does for..of
 
jesus christ, I hate Skype for Business so ungodly much
 
that's why I'm not touching it further.
Anyone successfully put Android TV on a rpi?
 
Hi, i need a little help with Angular
 
@federhico 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.
 
1:29 PM
@rlemon I've recently done some tests on Android TV, but i don't even know what rpi is :D
Oh, the Pi, no idea then, sorry
 
raspberry pi
 
I'm having problems when import one 3rd's module into Angular2 App
 
@GNi33 did you have clicked on that "X" in a red box somewhere right above? :D
 
no, I pasted something out of my editor
 
I've tried two builds. first one the video was blue for some reason (just the streaming, not any of the menus) and second build never got past the 'ANDROID' splash screen
 
1:31 PM
of course it takes the complete formatting, which is great with a dark layout in the IDE
 
@rlemon I actually tried it last night after you mentioned it, I got it booting and working fine
 
... bullshit
 
I'll find the rom I used when I get home
 
thanks
 
rpi3 yeah?
 
1:32 PM
rpi3 with a 7.1 based rom
 
there's no "remove formatting" and "insert without formatting" just basically fucked up my standard message format in general now
 
Actually, let me see if I can find it
I got it off reddit
 
chrome://history :D
 
I could go on, but I'm just sitting here asking myself how it is even possible to fuck up something so basic like a messenger so much
 
Work PC, different account :P
 
1:33 PM
lame
 
@GNi33 I remember that :S
SFB is just shit
 
that actually got to me right now
the absolute worst "feature" is message archiving within outlook
 
@BenFortune which actual rom?
seems like the download section has a few
 
@rlemon r17
 
1:35 PM
this is such an extremely stupid idea and its executed even worse
 
@BenFortune ugh
DRM is going to bite me in the ass likely.
 
No blue artefacts, I'll show you when I get home
Someone got around that for netflix
 
I want it for cravetv
 
Is there a kodi addon?
 
my tv has a netflix app. cravetv only has browser (flash) and android apps
I couldn't find a kodi addon for it
 
1:37 PM
that's a shame
 
I could buy an android box, but like.. I have a few rpis
 
Have you tried running it in chrome?
 
so why not try that first.
@BenFortune you got chrome for rpi?
chromium uses different flash.
 
@rlemon It's just android isn't it?
side load it
 
it's "android TV"
yea, I could side load it
if it worked.
hrm. apparently there is chrome for arm now
why did none of my googling yesterday inform me of this
 
1:40 PM
Yeah, Chrome runs on Android just fine - real Chrome too.
(On arm)
 
Chrome on android on pi, I can't see that running well
I don't think bluetooth worked either, for a mouse
 
^^--
My parents has a smart tv at their home but they don't use those functionalities. :|
 
My car has android, I love it
 
they could get a non-smart, but better res TV for the same price
that annoys me somewhat 🤔
@BenFortune can you use it for phone calls or just android apps with networks ( do you need to get a separate SIM ? )
 
@KarelG There's no modem, just GPS and wifi
 
1:45 PM
the SIM is for the 3/4G network
 
@BenFortune okay I'm not getting the gapps instructions.
 
but how are you connecting when there is no wifi :o
 
> Just clone then edit the ip address in the script then run it your rpi will reboot few times
the ip I assume is of my pi, but does that mean the pi should have a base OS on it to begin with?
 
Android is pretty bad to be honest. I still think that iOS is a much more solid operating system.
8.0 is a huge improvement in stability and usability though.
 
it's more flexible tho
 
1:49 PM
@KarelG Connecting to what?
 
internet ?
to launch eg spotify ?
 
Wouldn't buy a phone I can't program for without spilling a few hundred dollars on special hardware.
@towc You disappoint.
 
@BenjaminGruenbaum that might well be the case, I can't get myself to like it though
 
@littlepootis <3 you too
I just literally had a dream in which I had a slept a bit, and come back from sleep to do normal tasks, but it was later in the day so I could get on with more things. Turns out it's still early
such a boring dream
I was so disappointed when I woke up
"do I need to go through this again"?
> groundhog evening
 
2:04 PM
@towc stop sleeping in the middle of the day hurr durr
 
can i play factorio on windows 7 32 bit?
it says: MINIMUM:
OS: Windows 10, 8, 7, Vista, XP. (64 Bit)
 
you can use doctor google with that "can i play factorio on windows 7 32 bit?"
 
@phenomnomnominal Harder, daddy.
 
@KamilSolecki I really had to catch up
I probably slept around 10 hours in total since friday
well, a bit more than that
holy shit it's wednesday
fuck
@Abhi try and see?
 
my doods
 
2:11 PM
our lemon
 
@rlemon Oh my god. I was just going to start queuing up today's Colbert too.
 
Stephen can't take the heat
 
@rlemon I mean, he broke out two soft pitches to him.
 
anyone here into deep learning stuff?
 
2:16 PM
@BenFortune dammit y u no answer
does the rpi need a base os?
before I put the gapps on it
 
@rlemon Lol, his reaction to Da Bomb
I wish he'd have brought The Last Dab.
Hell is the absense of god's love, and I wanna to ask god that whatever I did, please forgive me @rlemon lol
 
@rlemon this 'Hot Ones' seems like a fun format generally
if the conversations are interesting as well... oh, there's one with deGrasse Tyson. Let's see
 
@GNi33 There's quite a few good ones, and a few not so good ones. I highly recommend you watch the Steve-O, deGrasse Tyson, Coyote Peterson, and Rob Gronkowski.
 
sounds good, thanks
 
2:28 PM
Waiting for vikings season 5
 
Anyone coming to IBC?
 
@ShahnawazAalam 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 got it
 
@BenjaminGruenbaum looks interesting. I'm in Amsterdam 2 weeks before that though
 
@rlemon Yeah, sorry
busy
Needs to boot into android, then you ssh in and run that gapps.sh script
 
2:37 PM
well fuck.
mines not booting
I'll try another sd card maybe
@BenFortune so why does it need the pis local ip? If it's running on the pi
 
@rlemon it doesn't have a terminal does it?
 
boots into the ANDROID splash screen
keyboard doesn't do shit
this is two images now doing it
 
@KendallFrey great..
 
@rlemon First boot might take a while
 
@BenFortune waiting over an hour :D
 
2:45 PM
oh lmao
It should definitely boot, just without play store etc
 
well, right now my card won't even read on my pc
so.. cards fucked.
 
Might've just broken the partitions, have you tried reflashing it?
 
> card won't even read
gparted can't see it, fdisk can't see it
 
welp, is the adapter showing in lsusb?
 
nope, I've already got a new card
it's slower tho :(
so I'll have to fix that one eventually.
my guess is it'll work in windows and I can re-table it there
sd/usb on linux is a crapshoot
(in my experience)
 
@BenjaminGruenbaum reasons?
 
The resize option is great
 
> windows or mac
I'm on Linux
 
I meant for windows
I just use dd in linux
 
doesn't help me now tho :D
 
2:51 PM
@William what?
 
@BenFortune that's what I do on linux. but dd doesn't help with a broken sd card :)
 
I don't get why they haven't created a flashable image for android tv
 
@BenjaminGruenbaum why is android worse then an iPhone. I have both curious
 
with all the partitions already created
It's not like anything needs to be installed
 
the iPhone does get better battery life hands down at least in my experience
 
2:52 PM
@BenFortune the first one I tried was that
but its the one with the wonky colours
 
ah
If you want I can image my sd card if you can't get it working
 
also are you running a Google phone those seem to be more stable in my experience
 
My LG is absolutely solid
 
iPhone users don't get to shit on iPhone users
 
@William in Android, it's super easy to crash and mismanage memory, mostly.
 
2:58 PM
Your probably right. Don't know enough about the internals. Not really an Android developer. Android has gotten better significantly better though. I had a 1st generation iPhone and it was much better then the 1st Android phone.
 
Yes, 8.0 makes a lot of good improvements in architecture and doesn't default to leaking or crashing as often
 
I have a form with a custom, non-input component whose data I want included in a native submit. I can think of a couple of ways to do this, all involve hooking into the `submit` event listener and getting the value of my custom element:
1. onSubmit, get value and assign it to input type hidden so form can be `.submit()`ed naturally.
2. onSubmit, get value and append it to serialized form data, create dynamic form and submit that.
3. Serialize data like in *2.*, but then use some type of AJAX or something (idunno) to post it like a traditional form of `target="_blank"`. That is, to a new tab
Any ideas on which is best? Or if there is a better overall solution?
this SO post seems to indicate that it's impossible to do without an actual form component. Is this accurate or has something changed?
If nothing has changed, then option 3 is out.
I guess functionally there's not too much different from dynamically creating an input type hidden element and a whole form, and I don't see a reason to have two forms where only one ever submits, so I'll probably go with option 1.
Thanks guys lol
 
2nd sounds like the worst but it depends how you do it
 
@Vap0r Why not just create a hidden input? Why are you making it so complicated?
 
@BenFortune ummmm I am? I just said I'll go with option 1...
 
3:13 PM
No, you're assigning a value on submit, why not just have the value ready in a hidden input element?
 
As I'm in react, that would involve an onChange updater shared between the input hidden and my custom element. I don't see any problems with this, but I don't see any problems with assigning the value on submit.
 
You're assigning a value to a "custom element"?
 
@BenFortune yes
 
What's this custom element?
If it's not an input, it shouldn't have a value.
 
It's a multiselect of sorts, but kind of expandable so it's also a checkboxfield solution for us, since many of our uses of checkboxes are incompatible with the way they encode data.
It's a custom input element. That has no inputs.
 
3:16 PM
You mean like a tag?
 
Yeah that's probably approximate to what I'm trying to do in a broader sense
Different element and data, but same idea.
No custom user input though
 
When you add the element, just add a hidden input with it. You shouldn't need to overcomplicate
I can't fully tell what you're trying to do without an example though
 
Oh, the hidden input is part of my MultiSelect component? That makes sense. That way I don't have to do anything too complicated.
That's the mock of my component, with pretty much no functionality other than allowing you to see the selection
 
That's not what I'd think of when you say multiselect
 
@BenFortune what do you imagine?
 
3:21 PM
I was thinking more of a dropdown type deal
EG: <select multiple>
 
Ahhh I see. This will have a scroll functionality if it exceeds a specified height.
But not quite a dropdown, though that would probably be relatively easy to implement too.
 
Where you have your fake checkboxes, add an actual checkbox with a value...?
 
We are trying to avoid checkboxes altogether.
They're bad, IMO
 
You're imitating their functionality...
 
inconsistent CSS selectors across many browsers, inconsistent behavior with display: none and visibility: hidden across different browsers, the Name="blah" serialization for checkboxes is completely different than most elements.
This makes our code a lot leaner.
appearance: none the CSS prop that makes creating custom checkboxes from default ones isn't supported whatsoever for IE.
 
3:28 PM
your going to have a bad time making that accessible
 
@KendallFrey mate, try these for the last time. i will stop after this. youtube.com/watch?v=Vmb1tqYqyII ... here's another one youtube.com/watch?v=Vmb1tqYqyII
 
lol ok fine those aren't blocked
 
finally..
 
one more up vote to break 8,000! Yeah!
 
3:40 PM
@phenomnomnominal good point. I don't really know what to do here, I think checkboxes are shit, there's even a click lag in IE (of about a second) that isn't present in any other browser, and doesn't happen with my custom element. I might have to see if it's possible to render a view meant for accessible readers
 
we move the checkbox off the screen
and use the label with pseudoselectors to render our own
that way you get all the native goodness
 
@monners yeah basically no final weigh in = disqualified IMO
 
@SterlingArcher Are you prejudiced against dead people?
 
you should write a memo about that
 
@phenomnomnominal ooh, nice I might do this. Thanks for the idea
Is monners dead?
If so someone should tell his chat SO profile
 
3:48 PM
did you like it?
 
@Abhi It was mildly amusing, but I've got the second half of a season of Letterkenny to watch :)
 
@SterlingArcher Some of us don't have personal access to a scale. I used the plasma center's when I donated, lol.
 
> Hey monners? Sup? Btws, you're dead
 
@Trasiva not sure where you live but a lot of grocery stores near me have scales
fish too
 
@Vap0r ....we're talking one that works for humans.
They don't have that kind of scale here at our shops, lol.
 
3:51 PM
ok.. i will remind you to watch it in a month or two.
 
Oh darn. Yeah we have Publix down here and they have one I think at all of their stores. Dunno, maybe a gym/rec facility? Go donate more plasma?
 
I don't see the scale when I do plasma, and my gym doesn't have scales interestingly enough.
I don't keep one in the house. You get too stuck trying to watch for progress when you do that.
 
Guys
 
@V.David 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.
 
@Trasiva agreed
@V.David I identify as a firetruck, thank you very much
 
3:53 PM
i was gonna say that i love you all
 
I'm an A-10 Warthog, so go Brrrt yourself.
 
@Vap0r i feel ya
 
@Trasiva you think you could start a fire with that big gun of yours?
 
user1596138
user image
2
 
user1596138
3:55 PM
Warthog down
 
user1596138
It scared the rhino when it landed lmao
 
@KendallFrey that offended my sensitive ears
@Jhoverit probably because he's not used to them coming back down.
This was animal-based testing of kenya's space program
Come at me KSP
 
@Jhoverit omg that was brutal xD
 
@Vap0r A-10s don't start fires. They just level everything and bury it again with the displaced rubble.
 
I mean, KSP does have an engine named Rhino...
 
3:57 PM
@Jhoverit They have terrible eyesight, lol. He was probably worried it was a predator, lol.
 
or he's just an asshole and wanted all the food for himself.
 
> A-10s don't start fires
 
This guy has the balls to continuously interrupt me and talk about complete irrelevance when I'm sitting here playing damage control to his mistake that he wouldn't even tell me about.
 
@rlemon I mean on landing, it mighta thought the warthog was a predator jumping out of a tree, lol.
 

« first day (2489 days earlier)      last day (2457 days later) »