Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

the computer thread

lets talk about servers and objects and frameworks and theoretical leaps

Comments

  • I'm planning on building a super sweet gaming pc that can send guided missles next year so this is a good topic.
  • Mostly interested in front-end stuff, ES6, Reactjs, Flux, etc. I've also been learning Rust.
  • yay computers. they're pretty cool things
  • designing a relational db atm. tryna figure out what the difference between an entity and a relation is. if a relation between entities is an entity than all entities can be expressed as relations between relations. I'm beginning to feel that an entity creates scope thru relations to itself and that there can be no entity if there are no relations. 
  • edited October 2015
    @mama working with JSON has been my latest joy. i just wish there was a way to stringify prototype functions so that the JSON preserve the integrity of the data when being run both on the server and on the client
  • @Ocaldron i might not fully understand what you're trying to do, but have you looked into graphql? It allows you to set up a strong type system that will be verified on the server. 
  • I've gotten super into customized router settings this weekend. I've now got it set up so no one device on my network gets more bandwidth than it needs. It's making my shit all buttery smooth. 
  • wouldn't laxatives be what would make your shit smooth?
  • @TTK you clearly don't know much about how router settings work.
  • @Spooky_Kyle did you install something like OpenWRT on your router?
  • nah it's all built into my router's firmware. It's the first time I've had a pretty decent one and I'm just now getting to some of the more specialized stuff it can do.
  • I'm using a ASUS RT-N66U btw, it's really nice for the $120 or whatever it was I paid.
  • edited October 2015
    Our network guy at work recommends ASUS routers, I might get one soon. My house is still on a classic Linksys 54g router.
  • I had a Cisco and a TrendNet before this and that I'm much happier with this one.

    That said this router probably costs as much as those 2 did combined.
  • I'm so sick of writing callback functions and watching my beautifully abstracted code break because of asynchronous functions
  • struggling with the prospect of having to implement my own queueing structures just so i can successfully chain sql db queries with node
  • i kno promise and asynch modules exist but i wanna stay vanilla ECMA6 af i dont fuck with contrib until i absolutely have to
  • edited January 2016
    promises are part of es6, dude, and almost all modern browsers support it.

    Also, working with async/await is a dream. Highly recommend it if you ever coming around to using something like babel+regenerator in your projects. Or you could wait until es7.

    you can literally just do:
    var results = await doQuery();
    instead of:

    doQuery(function(results) {

    });
  • edited January 2016
    that a lot of dependencies for running a single file node program.

    var async = require('asyncawait/async');
    var await = require('asyncawait/await');
    var Promise = require('bluebird');
    var fs = Promise.promisifyAll(require('fs')); // adds Async() versions that return promises
    var path = require('path');
    var _ = require('lodash');
  • 8=====D
  • edited January 2016
    randomly installing contrib modules stresses me out. i kno there's certain basic shit you need but programming languages are supposed to have most of what you need on localhost
  • edited January 2016
    It's especially bad in javascript because there's no "standard library" that has basic tools and functions many other languages implement in their own standard library. I agree that there's way too much not included in vanilla javascript, but I don't think that means we should flatly ignore vendor modules entirely. npm makes it pretty simple to install a package and add it to your project's dependencies with a single command. Using 3rd party modules is pretty common practice even in languages that come with a pretty fully-featured standard library (eg., Python), so I don't think we can ever really get away from it.

    es6 modules help to alleviate this problem a bit by letting you import multiple exports from a single module by using destructuring.
    import {async, await} from 'asyncawait'
    in place of
    var async = require('asyncawait').async;
    var await = require('asyncawait').await;
    I don't know if that's the correct way to import async/await there -- I've never used asyncawait, only regenerator.

    At least node has a built-in module system. Browser javascript doesn't even have that, so you either have to polyfill your module includes or webpack it, which will probably cause stress in some way while setting it up (it did me).
  • AND if you're worried about falling behind in package versions, someone made a great npm version checker that will update your dependencies for you: https://www.npmjs.com/package/npm-check.

    Ok, I'll shut up now.
Sign In or Register to comment.