**** BEGIN LOGGING AT Sun May 28 03:00:04 2017 May 28 03:56:20 anyone around?? May 28 03:58:38 hmm May 28 03:59:13 I don't know anything about how the default images handle wifi, sorry :) May 28 03:59:48 I didn't have too much trouble getting wifi to work (with a wilink 8 chipset) on debian stretch using systemd-networkd and wpa_supplicant May 28 04:10:20 sounds like an older image May 28 04:10:29 mine is 8.x uses connmanctl May 28 04:10:34 I figured it out May 28 04:10:45 8.x is debian jessie, debian stretch is 9.x May 28 04:10:46 but know I'm having an issue with good ol' apt-get ugh May 28 04:10:58 right May 28 04:11:05 oh May 28 04:11:16 well.. that's what was available on the site May 28 04:11:39 like I said, "I don't know anything about how the default images handle wifi" ... that implies I'm not using one of the default images May 28 04:11:48 https://beagleboard.org/latest-images May 28 04:12:00 you did say that May 28 04:12:04 i'm slow. May 28 04:12:19 what are the options for 'non-default' images? May 28 04:12:39 i don't know jack about linux. I'm default all the way. May 28 04:13:46 what we use was once upon a time based on one of rcn's jessie console images (rcn is who makes all the beagle images), but I removed any crud I found, upgraded to stretch, replaced ifupdown by systemd-networkd, and started installing stuff we wanted (and doing config along the way) May 28 04:14:22 you know what' you're doing May 28 04:14:30 so.. you have that luxury May 28 04:14:33 usually yes May 28 04:14:45 i'm just wanting to get this thing up and running May 28 04:14:49 either that or I just make it up along the way May 28 04:15:02 it was FINE a couple hours ago and for some reason I had the urge to upgrade the image May 28 04:15:24 its working for the most part, but now this apt-get issue... May 28 04:15:31 "this apt-get issue" ? May 28 04:15:33 can't 'update' May 28 04:15:36 can't install anything May 28 04:15:45 pastebin a log of what you're getting? May 28 04:16:00 read my mind May 28 04:16:24 https://pastebin.com/PfzCwyCr May 28 04:17:15 i know its going sideways because it can't even install 'tree' May 28 04:18:07 httpredir.debian.org should be changed to deb.debian.org May 28 04:19:23 in the sources? May 28 04:19:37 yes May 28 04:19:58 and dunno why you're having problems with deb.nodesource.com ... it's working for me May 28 04:20:20 strange that the image you're using doesn't already have httpredir fixed though May 28 04:20:29 httpredir has been broken for quite a while May 28 04:20:31 hmm May 28 04:20:38 what date's on the image? May 28 04:20:57 march 19 May 28 04:21:11 i'm running apt-get update May 28 04:21:19 maybe try a 2017-05-21 image? May 28 04:21:48 that's the latest one they have May 28 04:22:01 just got it today May 28 04:22:24 http://elinux.org/Beagleboard:BeagleBoneBlack_Debian May 28 04:23:04 if the image on beagleboard.org/latest-images still has broken apt repositories configured then they should really fix that... jkridner|pd ? May 28 04:23:11 no diff https://pastebin.com/2rBfVLbF May 28 04:23:37 some kind of firewalling in the way? May 28 04:24:11 pings cnn just fine May 28 04:24:14 nope.. no firewall May 28 04:24:56 well, obviously there's *some* reason why it can't connact to those sites... and it's not because of the sites themselves, they're working fine May 28 04:25:01 hmm May 28 04:25:09 yep May 28 04:25:30 I wonder if there's an issue with the usb wifi dongle driver in this new version of Debian? May 28 04:25:38 the light used to blink when it was conneced.. now its just dim/steady May 28 04:25:57 pings okay https://pastebin.com/ZkaLMagA May 28 04:26:02 well.. with packet loss May 28 04:26:15 ¯\_(ツ)_/¯ May 28 04:26:22 try an ethernet connection? May 28 04:27:06 i can do that May 28 04:27:19 does that require any config or will that just auto connect? May 28 04:27:37 it should auto-connect afaik May 28 04:27:51 man.. now i need to find an ethernet cable May 28 04:27:57 if i can remember what they look like May 28 04:34:08 lol May 28 04:34:18 wow that place must be noisy... https://www.youtube.com/watch?v=UxcJfaoK5xg May 28 04:35:41 hah May 28 04:37:05 i'm gonna try to flash it with the 5-21 May 28 04:37:10 what a pita May 28 05:34:02 zmatt where on the image is the kernel/version? May 28 06:46:19 hmm? May 28 06:47:25 the kernel version of current images is something in the 4.4-ti series May 28 06:47:51 4.4.62-ti-r104 for 2017-05-21 images (according to the wiki page I linked to) May 28 06:48:13 of course you can easily install a different kernel (when apt works that is) May 28 10:05:30 I connected by BBB to the router using ethernet and 5vdc, how do I connect to it in windows using putty? May 28 10:20:28 you need to set prober ip first May 28 10:20:40 or eg configure dhcp May 28 10:21:42 use a cable directly to it and set your ip to one within the bbb default range May 28 10:21:48 ssh into it and configure it May 28 10:22:15 uhh, no May 28 10:22:32 the bbb will default to using dhcp to acquire an ip from the router May 28 10:23:19 try connecting to "beaglebone" instead of an ip May 28 10:23:56 shame on me May 28 10:23:56 gives me "unable to open connection to beaglebone Host does not exist" May 28 10:23:57 most routers will also act as a local dns server and make that work May 28 10:24:21 I guess not all routers unfortunately May 28 10:25:29 you may be able to check in the router what ip address the beaglebone received, or if you have Bonjour for windows installed you should be able to connect to "beaglebone.local" May 28 10:27:27 bonjour.local worked, how do I now ssh into it May 28 10:28:25 actually May 28 10:28:27 dw May 28 10:28:34 used beaglebone.local in putty May 28 10:28:55 thanks guys May 28 10:39:20 cuba_: there's never shame on trying to help May 28 11:18:17 have anyone worked with Uniflash for BBB? May 28 11:21:12 you've been asking this over and over, might it not make more sense to ask for assistance related to Uniflash on TI's E2E forum? May 28 17:08:53 How can I set sample rate for TSC_ADC with IIO ? May 28 17:45:08 you echo it into one of those entries .. May 28 17:45:25 ah .. gone .. May 28 19:02:09 Hi, anyone here who can help me with a couple of questions? May 28 19:02:19 regarding beaglebone blue and ROS? May 28 19:04:48 bblueROS: no May 28 19:05:01 unless you ask one May 28 19:07:03 richardpotthof May 28 19:07:22 oops ! May 28 19:07:34 its getting more often :P May 28 20:28:41 oh wauw May 28 20:28:45 totally forgot about this tab May 28 20:29:06 I was wondering how easy/hard it is to connect pololu motors to the beaglebone blue? May 28 20:29:34 i have the motors with 4 encoder leads and +- leads, total of 6. I also have a motor driver May 28 20:30:50 motors: https://www.pololu.com/product/2272 May 28 20:31:40 motor drivers: https://www.pololu.com/product/2961 May 28 20:54:37 zmatt around? May 28 21:27:07 slightly. trying to wake up and get myself out the door May 28 21:28:51 * zmatt zombies around looking for caffeine May 28 22:54:08 Hi, I am using Ubuntu Linux VM and am having trouble using ssh to connect with beagle bone black via usb connection. I was able to do so in the past but now it fails to work. The board does pop up in my file explorer. I'm wondering if you know how I can check if something is faulty with the board, or if there is a better way to do this with ethernet? May 28 23:05:54 Orange_: that's a bit vague question May 28 23:06:07 Orange_: what changed between when it worked and when it didn't? May 28 23:06:40 if both the VM and the beaglebone are connected to an ethernet network, you should also be able to reach the beaglebone via the hostname "beaglebone.local" May 28 23:23:08 Someone else was working on it between the time it worked and didn't and they're unavailable for the next two weeks. The changes they made would be helpful. Sorry for this vague question. May 28 23:24:52 I'll tinker around with the ethernet and the "beaglebone.local" method you introduced May 28 23:24:53 heh May 28 23:25:17 Thanks May 28 23:25:31 if that doesn't help you could probably still regain control via the serial console May 28 23:30:53 I connected the microSD to my computer directly and noticed that it is completely filled. Could that be an issue related to ssh? May 28 23:33:34 hard to say without seeing startup logs, but having run out of space could definitely mess things up May 28 23:34:05 what error are you getting from ssh exactly? May 28 23:35:25 if it just seems to hang (rather than host not found or connection timeout) then you might try: ssh HOSTNAME -t /bin/sh (where HOSTNAME is whatever hostname or ip used to work) May 28 23:35:46 ssh: connect to host 192.168.7.2 port 22: Connection timed out May 28 23:35:54 hm May 28 23:36:44 without access to the serial console it's almost impossible to debug what's going on May 28 23:37:12 but yes, a lack of space can definitely be the root cause May 28 23:38:01 I can definitely recommend always making sure there's plenty of free space May 28 23:38:42 (and if you ever run out of space, try to avoid rebooting the system until you've managed to free up some space) May 28 23:38:42 I'll try to free up some space, and also get serial console working May 28 23:39:40 it would be helpful if the amount of space used and available were announced on login May 28 23:49:53 Yeah it would be helpful. Thanks for your help! I have to leave my computer for now May 29 00:20:31 so i'm now up to 2 different (working) wifi usb dongles that won't work with BBB. That is, they work for ssh. They attach to the local hotspot but they both can't seem to call out for apt-get, but they *do* ping external websites (cnn.com) just fine May 29 00:20:56 though the pings are considerably slower then from other computers on the same network.. which is weird, but anyway May 29 00:21:15 the BBB works as expected when connected to ethernet May 29 00:22:12 strange May 29 00:22:25 Both dongles are essentially the same rpi/bbb compatible chipset. Each (plugged in one at a time) is recognized, shows up on LSUSB, drivers installed... they both work with connmanctl scan wifi, services.. etc May 29 00:22:37 there's gotta be something else...... May 29 00:24:02 I still can't really think of anything that would allow dns and ping to work yet https requests fail other than some really wonky firewall in the way May 29 00:24:14 or bogus configuration of APT, like weird proxy settings May 29 00:24:50 nope.. neither May 29 00:24:54 apple airport May 29 00:25:19 and the first one worked perfectly yesterday, before i upgraded to the latest image May 29 00:25:24 really weird May 29 00:25:38 have you sacrificed a black chicken to the gods of wireless connectivity yet? May 29 00:26:51 googling for one now May 29 00:30:17 maybe also try: apt-get -o=Debug::Acquire::{http,https}=1 update May 29 00:31:09 what's that? May 29 00:31:32 apt-get update with debugging enabled for http and https fetches May 29 00:31:44 i.e. you'll get a lot of spam May 29 00:31:45 hm May 29 00:31:56 i'm throwing in the towel for now May 29 00:32:06 been at this in one form or another since yesterday May 29 00:32:16 its working just fine on ethernet and i don't need to walk around with the damn thing May 29 00:33:22 can't be 2 bad dongles.. the odds of that are... May 29 00:36:00 you can resolve hostnames and ping, that already seems to indicate they work May 29 00:36:36 hence my suggestion to debug some debugging for APT to see what exactly it's trying to do May 29 00:36:42 *enable some debugging May 29 00:53:03 zmatt hah! dangit! May 29 00:53:09 ? May 29 00:53:11 think i found it......... May 29 00:54:00 when i configured connmanctl for static ip i didn't bother passing --nameservers May 29 00:54:09 ... May 29 00:54:11 :P May 29 00:54:17 weird.. i didn't have any such issue with ethernet May 29 00:54:19 why are you configuring a static ip in the first place? May 29 00:54:31 the wifi is still ~ 20% as fast as ethernet May 29 00:54:54 because i'm lazy and i want an .ssh config line for bbb :) May 29 00:55:10 so? why would you need a static ip for that? May 29 00:55:21 bbb.local May 29 00:55:28 uhm May 29 00:55:31 (or beaglebone.local, assuming the default hostname) May 29 00:55:55 ok, that rings some bell in my head but... with everything clanking around up there.... May 29 00:56:07 or just "beaglebone" if your local router is also a local dns server, which is usually the case May 29 00:56:13 it is May 29 00:56:17 gotta try that May 29 00:56:41 beaglebone.local will work if both sides have avahi installed (or bonjour on mac/windows) May 29 00:56:51 (avahi should be installed by default on beaglebones) May 29 00:57:21 what's that? May 29 00:58:01 avahi-daemon is an implementation of multicast DNS (mDNS) May 29 00:58:16 coulnd't resolve May 29 00:58:17 Bonjour is another implementation (closed source, by Apple) May 29 00:58:24 how did you try to resolve? May 29 00:58:50 ........i take that back May 29 00:59:03 forgot i changed the name in /etc/hostname May 29 00:59:07 works like a charm :) May 29 00:59:22 :) May 29 00:59:23 now all i need to figure out is how to Un-Static-IP connmanctl !! May 29 00:59:45 can't help you there, I use systemd-networkd instead of connman May 29 01:00:27 bah! i'll figure it out May 29 01:00:51 ocd can be really useful May 29 01:03:08 any idea why wifi speeds would be 20% of ethernet? May 29 01:05:27 I can think of plenty of options.... 1. because wifi stick 2. because the musb subsystem and its driver suck and DMA is currently disabled in the driver 3. because the wifi stick is perhaps being adversely affected by power supply instability due to lack of decent output capacitors on the usb host port of the bbb May 29 01:05:57 i'll accept it :) May 29 01:06:09 its still giving me > 3mb/s May 29 01:06:15 so i can live with it May 29 01:06:19 not exactly streaming video May 29 01:06:36 I just use ethernet whenever possible May 29 01:06:37 i'd love to get my hands on the beaglecore May 29 01:06:46 the beaglecore? why? May 29 01:06:53 it seems utterly pointless to me May 29 01:08:11 argh, and their site is so horrible /o\ May 29 01:10:46 their site is a utter disaster i'll give you that May 29 01:10:53 do you know their kickstarter tanked? lol May 29 01:11:07 their campaign was all coolness-wannab May 29 01:11:47 the concept itself is an obvious product but i don't know about exectuion May 29 01:12:31 BBB's are cool to play with, but its essentially TI's "dev kit" for their Sitara (or wtv's in there now) May 29 01:12:55 you aren't going to design a product around bbb May 29 01:13:01 plenty of people are May 29 01:13:06 us included May 29 01:13:13 i'm not saying you 'can't May 29 01:13:53 of course for the longer term we are evaluating doing a custom design, but right now it's pretty convenient to just design a board the bbb plugs into May 29 01:13:54 but depending on the product, the idea of dropping a core into an existing base is very inviting May 29 01:14:48 if you've got a product that fits that then you're good May 29 01:14:58 but you're paying $$ for it May 29 01:15:21 $50 for a retail board... you can bring that way down if you design your own pcb May 29 01:15:26 iirc the beaglecore was not really cheaper May 29 01:15:50 and actually the bbb is very cheap thanks to being quite high-volume May 29 01:15:59 the bcore is opensource. you don't have to buy theirs.. you can pick up the schematics, tweak them a little and product that thing for way less than they are selling it for May 29 01:16:16 for low to medium-volume products it's not at all clear that you can get a substantially lower price if you go custom May 29 01:16:33 what's med-low? May 29 01:17:04 I have no idea, other than that even the bare pcb cost was apparently already "yikes" May 29 01:17:26 how many layers? pieces? May 29 01:17:36 pcb's aren't free but they are a lot cheaper than they used ot be May 29 01:18:03 bbb uses 6 layers, and at eurocircuits could not be batched together with pcbs from other customers (which normally lowers the price) May 29 01:18:50 so that means you got a significant minimum order quantity, which makes prototype runs quite expensive May 29 01:19:09 prototyping isn't cheap, i'll give you that.. May 29 01:19:23 but then, all that should be factored into your sales model May 29 01:19:26 *should be :) May 29 01:19:34 and my wifi dongles *should work :) May 29 01:19:39 hehe May 29 01:20:05 i do almost exclusively product development and prototyping (thing breadboard, wires, shit everywhere) May 29 01:20:11 think* not thing May 29 01:20:25 i wouldn't touch production standards if you paid me May 29 01:20:33 that's like looking for an ulcer May 29 01:20:42 so then why would you be enthausiastic about the beaglecore... it's like a bbb except it requires a custom designed pcb to host it May 29 01:21:12 assuming it works (and that's a BIG assumption), the form factor lends itself to more modern/sleek industrial design May 29 01:21:39 in terms of development costs... i'm not seeing any savings at the design/development stage May 29 01:21:44 most SOMs are DIMM-style, which makes far more sense to me May 29 01:21:52 the beaglecore looks like hell to manufacture May 29 01:21:53 SOMs ? May 29 01:21:59 system-on-a-module May 29 01:22:13 which is what things like the beaglecore are called May 29 01:22:24 a system on module? May 29 01:22:30 meaning.. the core is a module? May 29 01:22:55 meaning "a tiny computer system as a module" May 29 01:23:06 like the rpi zero May 29 01:23:14 google "am335x som" May 29 01:23:43 som generally implies it's meant to be integrated, not used standalone May 29 01:23:54 rpi zero is just a really small sbc (single board computer) May 29 01:24:20 so the am335x family are 'som' May 29 01:24:22 ? May 29 01:24:27 a som will generally just have board-to-board connectors May 29 01:24:29 meaning TI's sitara May 29 01:24:30 no May 29 01:24:40 oh i see May 29 01:24:54 so anything that plugs into a pci slot May 29 01:24:59 (if that still even exists) May 29 01:25:02 google "am335x som", you will find lots of examples of soms based around the am335x (of course you have soms based around all sorts of other SoCs as well) May 29 01:25:16 pci? why pci? May 29 01:25:17 SoCs i know May 29 01:25:33 i'm just trying to relate to what you're saying May 29 01:25:53 so.. in a way, like a video card or a sound card May 29 01:26:09 I was just saying the beaglecore is just one of many SOMs (which is just what they're called) built around the am335x May 29 01:26:18 and not the most practical afaict May 29 01:26:43 woah... so they aren't the only game in town... look at that May 29 01:27:01 there are tons and tons of those things May 29 01:27:06 ok i get it -- som is something that is meant to sit in a host board May 29 01:27:11 yes May 29 01:27:14 ugh i live in a cave May 29 01:27:22 (with ethernet lol) May 29 01:28:01 they might use board-to-board connectors like http://phytec.com/site/assets/files/1345/am335x_bottom2-1.255x227.jpg May 29 01:28:21 exactly what i felt was missing in the bcore's design May 29 01:28:26 or fit into a DIMM slot like http://www.variscite.com/images/new-product-images/VAR-SOM-AM33-V2-Image.jpg May 29 01:28:38 holy crap that's uber cool May 29 01:29:01 programming station ---> conveyer--->plug-into-product, --->ship May 29 01:29:01 that one apparently has wifi built-in May 29 01:29:14 oh yea May 29 01:29:31 that big capped square.. i forget the brand, everyone's using that wifi/bt module now May 29 01:29:42 probably wilink 8 May 29 01:29:47 is that it.. May 29 01:29:51 and the 2 antenna ports May 29 01:30:05 yes, for mimo May 29 01:30:05 pardon me... 'connectors' lol May 29 01:30:16 i'm a fan of sma or rf-sma, much sturdier than that crap May 29 01:30:32 but hey... who's gonna be opening that after its sold?! May 29 01:30:55 you're expected to use a special tool to remove that connectors anyway May 29 01:31:00 *connector May 29 01:31:02 how much is that last one? May 29 01:31:08 Variscite May 29 01:31:18 it's "Get a Quote" dollars May 29 01:31:56 says starts at $24 May 29 01:31:57 http://www.variscite.com/company/newsroom/item/408-dart-6ul-enhanced-news-release May 29 01:32:03 "starts at" May 29 01:32:33 i.e. with no wifi, a crappy feature/speed-bin of the cpu, little ram, and little storage May 29 01:32:34 look at this May 29 01:32:34 Up to 512 MB DDR3L and 512 MB NAND / 32 GB eMMC May 29 01:32:34 Dual 10/100Mbps Ethernet May 29 01:32:35 Certified Wi-Fi 802.11 b/g/n May 29 01:32:36 that's insane May 29 01:32:46 what's in sane about it? May 29 01:33:03 that's more computing power than the Apollo missions had May 29 01:33:05 the am335x supports up to 2GB of ram, dual gigabit ethernet May 29 01:33:22 32gb of eMMC May 29 01:33:35 compared to the 4gb on the BBB May 29 01:33:43 yes, and you'll pay for it May 29 01:33:43 or am i misreading something May 29 01:33:50 oh... not $24 then May 29 01:33:53 lol no May 29 01:34:25 so.. you're saying the bbb is a good prototyping platform :) May 29 01:35:14 and even a decent choice for low-volume production runs May 29 01:35:31 again, that's assuming your product has the space and $-room May 29 01:36:37 so you were saying earlier.. you design for the bbb's form factor and use ribbon cables? May 29 01:37:10 no, our pcb plugs directly into the expansion headers of the bbb... or, well, more the other way around May 29 01:37:38 so you mate the boards directly May 29 01:37:45 (btw I think 32GB of eMMC will cost you more than $24 just for the eMMC alone) May 29 01:37:45 kind of like a cape May 29 01:38:04 hah i thought that looked a little cheap May 29 01:38:06 like a cape yes, except it powers the bbb instead of being powered by it May 29 01:38:47 so you use the bbb to run scripts? May 29 01:39:22 if you mean software, then yes... the bbb is a computer, one generally uses it to run software :P May 29 01:39:31 an excellent point :) May 29 01:39:47 i was debating the reliability of a linux board vs something like an arduino May 29 01:39:49 arduino May 29 01:40:09 wondering if all the additional moving parts make for a less reliable system May 29 01:40:26 with the arduino its all C++, really can't go wrong there May 29 01:40:30 lol May 29 01:40:47 linux is also all C, so really nothing can go wrong there either right? May 29 01:41:06 guess that depends on what layer May 29 01:41:15 plenty can go wrong with both, more with linux since there's simply more code May 29 01:41:15 or at what 'level May 29 01:41:23 exactly my point May 29 01:41:25 of course you also get a lot more functionality in return May 29 01:41:42 a middle ground would be doing baremetal dev on the am335x May 29 01:41:42 i'm a firm believer in using the least amount of computing you actually need May 29 01:42:01 you mean using it purely as a microcontroller? May 29 01:42:15 yeah... just for fun see how fast this "boots" -> https://github.com/mvduin/bbb-asm-demo/releases/tag/v1 May 29 01:42:18 ;) May 29 01:43:10 you can just dd the demo.img to μSD and boot from that (hold down S2 button during power up to force booting from card if necessary) May 29 01:43:10 what is that? May 29 01:43:20 a small example program I once wrote for someone May 29 01:43:22 ah May 29 01:43:23 in assembly May 29 01:43:42 where does the output go? May 29 01:43:44 serial port? May 29 01:43:50 it just toggles the leds in reaction to pressing the S2 button May 29 01:43:52 (irq-driven) May 29 01:43:54 ah May 29 01:44:07 probably instant May 29 01:44:17 very much so yes May 29 01:44:34 boot time is also essentially instant thanks to its small size May 29 01:45:04 for me the beagle is really just a hobby. I trust the Arduino more than Linux for the simple things it does well May 29 01:45:07 (the time between power led turning on and the next sign of life is afaik mostly u-boot being loaded) May 29 01:45:30 for something like that tho.. why use that chip? wouldn't that be a tad overkill for light blinking :) May 29 01:45:39 obviously May 29 01:46:07 it's still fun to use it as a microcontroller and have all the hw resources at your disposal May 29 01:46:14 don't get me wrong.. its not that i don't understand all the nice folks in NYC driving hummers to get to work, all of 11 blocks rom home May 29 01:46:39 i didn't realize you could actually do that, use the BBB like that May 29 01:47:41 what's your platform of choice for BBB software? May 29 01:47:42 the AM335x is still reasonably easy to use like that, although it could use more examples May 29 01:48:02 we use linux... it's just too convenient May 29 01:48:18 right, but are you writing bash scripts? May 29 01:48:32 i'd be surprised if you were doing everything in some low-level lang May 29 01:48:41 uhh, why? May 29 01:49:07 the abstracted/interpreted stuff is so much more tempting :) May 29 01:49:21 you can write entire hw control systems in javascript nowadays May 29 01:49:22 I'll write in whatever is appropriate.... C, C++, assembly, bash, perl, javascript if forced to at gunpoint May 29 01:49:25 (not that you'd want to) May 29 01:49:32 ahhahahah May 29 01:49:40 there we go :) May 29 01:49:49 unfortunately the boss likes js May 29 01:49:54 oh brother May 29 01:50:21 i was fiddling around with node scripting but that friggin event-loop makes life hell May 29 01:50:23 well, he used to like php, and I think he's aware of the flaws of js... I think there's growth there May 29 01:50:24 asyc shit May 29 01:50:27 async May 29 01:50:37 i swear by ruby May 29 01:50:43 yes, though life has become much nicer with async/await in node 7 May 29 01:51:09 even so, you have to actually wrap your head around that stupid paradigm... do the same task in ruby and you'll NEVER look back May 29 01:51:14 ruby simply gets out of your way May 29 01:51:19 heck even Python is better May 29 01:51:33 C/C++ if you're into self-flagellation May 29 01:52:01 I've done a bit of python but the more I got to know it the less I liked it May 29 01:52:14 i'm not a fan of python either May 29 01:52:15 async/await is I think also available in python? May 29 01:52:16 never took to it.. May 29 01:52:21 but over Javascript?? any friggin day May 29 01:52:22 I know very little about ruby May 29 01:52:41 ruby doesn't have that whole event model May 29 01:52:50 its straight forward, blocking May 29 01:52:55 cannot go wrong May 29 01:53:12 and how do you then deal with... events? May 29 01:53:13 system commands cleaned for your with open3 May 29 01:53:15 and concurrency? May 29 01:53:24 (please don't say threads) May 29 01:53:31 multithreads! May 29 01:53:34 /o\ May 29 01:53:37 well duh lol what else?? May 29 01:53:40 fairy dust?! May 29 01:53:48 that may seem nicer at the surface May 29 01:53:55 but is semantically many times worse May 29 01:54:12 ok, you don't like threads? no problem... when you've pulled all your hair out with js's async/await... and promises, i *promise(* you'll be back May 29 01:54:27 i would suggest taking a weekend and doing some ruby May 29 01:54:37 its so much more eloquent than javascript May 29 01:54:44 async/await lets you write code essentially as if it's blocking May 29 01:55:04 but it's clear exactly when the state of the universe around you can change: namely only when you await May 29 01:55:08 no.. you have to define async functions and promisify-wtv else May 29 01:55:34 i threw in the javascript towel a couple weeks ago and went back to Ruby May 29 01:55:35 dealing with legacy code that still uses events is slightly annoying yes, but that's not an inherent fault of async/await May 29 01:55:58 hey, if you're happy with it, and it does the trick... go with what works. Ultimately its just a tool May 29 01:56:02 I seem to be pretty decent at thinking in terms of asynchronous stuff fortunately May 29 01:56:16 i've never been able to grasp the big picture May 29 01:56:21 and it wasn't for the lack of spending time May 29 01:56:37 then you'll have just as much problems with threads, once you reach a certain complexity level May 29 01:56:48 you'll either have mysterious data corruption or mysterious deadlocks May 29 01:57:12 i'm not writing anything that spawns an infinite number of threads May 29 01:57:18 2 is sufficient May 29 01:57:33 if your code is asynchronous, then sure May 29 01:57:44 if you're using multithreading May 29 01:57:55 oh, thats what you mean May 29 01:58:12 i'll take my chances :) May 29 01:58:12 shared-memory multithreading at least May 29 01:58:15 and keep my sanity May 29 01:58:47 ... until you start getting aforementioned issues May 29 01:58:49 i like using my old school editors (textmate, st3) and recently I've resorted to writing my own arduino compiler/uploader command line utility (believe it or not there IS NONE out there!!) May 29 01:58:54 and ruby makes it a breeze May 29 01:59:33 ah, ruby uses a GIL just like python May 29 01:59:40 GIL ? May 29 01:59:45 Global Interpreter Lock May 29 01:59:48 yep May 29 02:00:29 right tool for the right job May 29 02:00:39 yes that helps to keep your sanity... essentially it's kinda like async/await but with the disadvantage that it's not immediately clear when context switching can happen May 29 02:01:03 i.e. you can't tell from the source code whether some call ends up being a context switching point May 29 02:01:25 what do you mean by context switching point? May 29 02:01:37 a point at which the program can switch to another thread May 29 02:01:43 oh May 29 02:01:50 which is rather important May 29 02:01:52 i've only ever used one thread May 29 02:02:05 that's not really usable for anything but the simplest tiny program May 29 02:02:22 what kind of program would require multipole threads? May 29 02:02:26 multiple May 29 02:02:52 if you're monitoring sensors... and then listening for button presses, that sort of thing? May 29 02:03:35 in the synchronous/blocking model, if you use a single thread then as soon as you do anything that blocks, your entire program is now unresponsive May 29 02:03:47 if you need to react to events from various sources, that's a problem May 29 02:04:30 that's what everyone loves about the async model May 29 02:04:39 its all callback/event driven May 29 02:04:55 I'm not sure anyone genuinely loves that model as such May 29 02:05:08 Ruby *is* 100x more eloquent than javascript.. but I'm not saying its a fit for every job May 29 02:05:24 i'm hyperbolizing :) May 29 02:05:32 what they love is that it's decently speedy and low on resources May 29 02:05:34 but it works May 29 02:05:51 which feels hilarious to say considering how slow node is, but that's mostly because javascript sucks May 29 02:06:04 if you build everything around callbacks (or so to speak) May 29 02:06:23 promises already improved on callbacks May 29 02:06:29 async/await improves on promises May 29 02:06:48 if you have a good grasp on async/await and how to model programs around that... then you're golden May 29 02:06:58 i never understood the model/pattern May 29 02:07:12 but for what i'm doing i don't really need it at this point May 29 02:08:04 it's really not that hard: an "async function" always returns a promise when you call it, and inside an async function you can use "await" to resolve promises into their value "immediately" May 29 02:08:36 what await essentially does behind the scenes is make the rest of the function a callback that's invoked when the promise resolves, but you don't have to explicitly deal with that May 29 02:09:00 but then you have to nest whatever comes next inside that thing? (or something like that.. i'm confused) May 29 02:09:09 do you have an example handy? May 29 02:09:49 like say.. you wanted to check if a file_exists(file)? then do something if it does.. etc May 29 02:10:45 i'm trying to remember where i hit a snag... May 29 02:10:47 if (await fs.exists(file)) where I'm assuming fs is some suitable promisified filessystem API May 29 02:11:22 wait, lemme write out three versions of an example to illustrate May 29 02:12:00 as soon as my laptop stops swapping May 29 02:12:04 heh May 29 02:12:16 no rush, i need to roll my dough.. making apple pie tonight May 29 02:12:21 bbl May 29 02:13:27 http://picpaste.com/pie-MAqEcPRZ.JPG May 29 02:35:30 stormbytes: https://hastebin.com/bodizayeni.js May 29 02:35:55 invoking a single call is maybe a bit too simple though to let async/await shine May 29 02:38:27 note however that even in this near-trivial case, error handling actually improves from usingCallbacks to usingPromises and from there to usingAsync May 29 02:39:34 if doStuffWithData throws an error then usingCallbacks will make a mess while usingPromises/usingAsync correctly catch it May 29 02:40:00 and only usingAsync catches errors thrown directly by readFileP May 29 02:40:34 oh that's interesting May 29 02:41:02 you aren't using return vals tho May 29 02:41:11 I'm using the return value of readFile May 29 02:41:14 *readFileP I mean May 29 02:42:10 take usingAsync2() May 29 02:42:29 oh i see.. you're returning to doStuffWith Data May 29 02:42:48 yes, doStuffWithData doesn't accept a promise, so I need to await to get the actual content of foo.txt May 29 02:43:22 and if I were to put a return statement inside the async function, then that would emerge from the await usingAsync() inside testAll May 29 02:43:24 i wasn't writing functions... it was a 1-page script so I did it procedurally May 29 02:43:41 will bookmark that May 29 02:43:45 appreciate the example May 29 02:43:56 baking time.. bbl May 29 02:44:13 in that case, use modules/APIs that return promises, and put your whole script inside an async function (like testAll in this example) May 29 02:46:09 really, async/await is quite nice... May 29 02:46:13 too bad it's still javascript, lol **** ENDING LOGGING AT Mon May 29 03:00:04 2017