Hacker Newsnew | comments | show | ask | jobs | submit | obeattie's comments login

    JSON.parse(`go run json.go`)
No.

-----


While I can sympathize with your critique, I wish it were a bit more elaborate so that the author has an idea about what should have been done better. What is bad about that? What are the alternative solutions, etc.

-----


I think s/he objects to the idea of asking Go to compile and then run the program each time, rather than running the resulting binary:

    JSON.parse(`./json`)

-----


   `exec #{Rails.root}/tmp/go_#{m} #{arguments}`
The escaping leaves a bit to be desired.

-----


More than just the escaping. You should also clean your environment, providing the child process with a bare minimum of information it needs to do its job.

Otherwise you leave yourself open to future security issues, especially if you keep API keys or DB passwords in ENV.

-----


Also, it's generally a good idea to write code where the original developer's intent can be easily figured out by looking at the code. If the code is too compact, does too much magic (or it's too verbose, which is the other extreme) it can be difficult to tell what was intentional, how it was meant to work, if something is a bug or not. The code should "tell a story", so to speak.

-----


Further down you can see he only does that in a development environment.

-----


> Inverted mode for displaying cells upside-down (using CATransform) -- a necessary hack for some messaging apps (including ours)

Care to elaborate? Sounds intriguingly crufty.

-----


UITableView lays out cells from the top. If there aren't enough cells to fill the screen, there will be an empty area in the bottom part of the table view, between the last cell and the bottom of the table view (as you would expect).

Unfortunately, there isn't a standard way to invert a UITableView, and have cells laid out from the bottom.

So, the easiest solution for us was to set the table's transform to CGAffineTransformMake(1, 0, 0, -1, 0, 0) (flip the whole table upside down) and then give the cells the same transform (to cancel out the table view's transform).

A bit hacky, and causes indexPaths to be inverted as well (0,0 is now at the bottom), but worked for us.

Seen a few other people take this approach as well: https://twitter.com/tapbot_paul/status/461161920402563072

-----


That's a pretty interesting approach. Wouldn't it be cleaner to use a UICollectionView with a custom layout?

-----


Most definitely! UICollectionViewLayout should be the right answer, but the thing is: the Slack iOS app was already built using UITableView, drawing many many custom cells. We'll probably port someday to UICollectionView ;)

-----


We do the same thing, custom views, mostly drawn in -drawRect:, reused in different cells. It's actually a very nice technique but like you said, the are some sacrifices to take. Still, these cells depend of a tableViewcCell which has unique properties and special APIs that collectionViewCells don't. I think the most trikcy part here is to be able to build a custom UICollectionViewLayout allowing to display cells from the bottom. Haven't found any third-party doing it well enough yet. Do you know of any?

-----


I've started experimenting not making cells but UIViews and just add them on top of cells. I haven't gone with that fully yet but I've planned to try it out.

The downside is you lose out on many of the out of the box stuff, like cell background highlights that you know have to define yourself.

The upside is that you can now reuse the UIView everywhere, including non-subclasses of ScrollView.

-----


You should add your view to the cell's contentView instead of directly on the cell, which allows you to keep the default behaviors and also reuse the view.

-----


IIRC, Facebook used to have this feature (ages ago), but it was removed. It used to ask where you knew someone from when sending a friend request, and it didn't let you send the request if you didn't know the person.

-----


In the early days it allowed "I don't even know this person" as a reason.

-----


As someone coming to the topic of "replacing the Bitcoin Foundation" cold, this would really benefit from a short, Plain English description. This tells me next to nothing:

> an adaptable software package which is designed to be modular, easily copied, and easily modified - and therefore used in many different applications. We intend to use Eris as the relevant platform when we incorporate the Association at a later date, but we will not be limiting future development of the platform to that single application.

-----


"Governance in a Box" would be a better description. Imagine anything that needs to be governed by consensus, including corporation bylaws, town ordinances, 'foundation' advertising spends, Internet group meeting agendas, etc. Eris appears to be a basic framework for instantiating any of these in a way that brings trust and high transparency to a group of individuals with common goals and interests. It's one of the more powerful things the blockchain brings us!

-----


That's actually very much what we are going for. I have spent much of my career at the intersection of international development and legal reform and the idea of having a governance framework which can be used for making collective decisions in a way which will not rely on central nodes of corruption or failure.

-----


And then we'll find out we are just trading central modes of failure for failure which can occur across networks due to specific channel attacks

-----


Perhaps. But we'll never know until we try.

-----


Thanks for the comment. We have updated that paragraph and hopefully it will be a bit more straightforward.

-----


I found this (a page or so in) to be a good summary of "why should I care":

the proliferation of ÐAOs in user-friendly applications has the potential to allow the public to claim back control over their data and over their privacy on the internet.

-----


> As someone coming to the topic of "replacing the Bitcoin Foundation" cold

I'm not sure it's entirely designed for that purpose, though that does seem both an obvious and relatively easy application of this concept. Instead, I think they purposefully made it a little more generalized so it could be applied to a lot of different spaces. For example, I can see how this framework, or at least the concepts that it implements, could be used in a decentralized social networking application...as some of these same concepts we implemented a long time ago in DIASPORA* and Tent.

-----


"That means secure connections to everything from your bank site to Wired.com to the online menu at your local pizza parlor."

Oh, the irony that the article itself isn't served over HTTPS.

-----


That's not really irony since it is proposing a possible "future".

-----


You are forgetting about emerging markets (and pretty much anywhere outside the US/Europe).

These places are completely leapfrogging desktop technology and going straight to mobile. It isn't just the case that the end user can't afford desktops: think how much infrastructure is needed (in terms of power, connectivity, etc) for a desktop device versus a smartphone or tablet.

-----


Desktops do need better power infrastructure, though something like a NUC could be powered by a small solar panel. A Rpi or ARM-based chromebox is even lighter on the power needs. Haswell (or ARM) based laptops can do 10 hours on a charge and wouldn't even need a consistent power supply.

Not sure what you mean by connectivity -- desktops and mobile devices have the same options: wireless (3/4G, etc), and wired (via wifi for the mobiles). A desktop surely doesn't require buildout of a infrastructure-heavy wired network to have comparable connectivity to a smartphone.

-----


While these technologies can run on this power, they simply aren't consumerised, or even in the rear view mirror of non-HN types right now. You also have to consider the use-cases: a smartphone or tablet can be used to author documents, browse the web etc (even if the experience isn't perfect), whereas a desktop computer cannot practically be carried in the pocket and used as a vital in-the-field communications device.

As far as connectivity goes: again, you're talking about a hypothetical. While there's no reason you can't create a low-bandwidth experience on desktop, the fact remains that simply opening my email transfers over .5MB. Opening my Facebook account transfers more than 1MB. Doing this on my phone uses a fraction of this data.

-----


It may be hard to believe, but people actually want a fridge before they even think about buying a computer or mobile phone

-----


Internally, we have a graph editing tool which uses D3 (screenshot [1]) which I threw together based on some existing examples. I'd be happy to open up the source code if there was any interest, though it's really nothing all that special. The layout algorithm could definitely use some work for our use-case at least. It's force-directed at the moment, using stock D3 layouts, but really needs a hierarchical mode. While it's not perfect, it is intuitive enough that non-technical people "get it".

Beyond this, yEd[2] is really quite cool (even if it does have a very dated UI).

[1] https://www.evernote.com/shard/s3/sh/67c67a48-8b3d-4eac-b7ee...

[2] http://www.yworks.com/en/products_yed_about.html

-----


I'm not in support of banning Bitcoin news, but with titles like this, yeah it kinda is hard to ignore them.

-----


Don't give me that bullshit. It's not hard at all. It's not even close to hard. It would be an understatement to call it easy. Anyone complaining about this is so steeped in entitlement that if they told me such a thing in real life I'm afraid I would become animal-like. Such complaints are worse than pointless and I hope OP or whatever refers to the guy I responded to originally, and to some extent you, get some fucking perspective. It's embarrassing.

-----


I'm afraid I would become animal-like...get some fucking perspective. It's embarrassing.

You should follow your own recommendation here and step away from the keyboard for a while... this entire thread just isn't worth getting angry about.

-----


Relax psycho

-----


No, you relax. I'm not going to have you moderates controlling our feed. It's an arena. Anything goes.

-----


But, what if you became "animal-like" IRL and the guy just completely kicked your ass in response? I mean, that would be a distinct possibility, right?

Just hypothesizing on where that scenario would leave things.

-----


children, children

-----


Man, I'm just tired of people crying about how hard their life online is. If someone were complaining to you in real life about how they had to not pay attention to a single line of text — so much so that they had to call it out at the time — I think I would have to just tell them how shitty I think they are. I've seen too many people doing it to pretend it's not a pervasive problem among the tech-literate. Someone needs to tell them their objections are so trivial that they ought not be aired at all. It's a strange paradox!

-----


You might want to try decaf.

This submission is lousy. It has a lousy title and there is zero interesting content. It is pointless. What is anybody learning from this submission?

-----


The title is a bit opaque but with the domain displayed next to it I don't think it's that hard to infer hash+blocksomething=bitcoin.

For what it's worth I don't like all the Bitcoin stories on the front page but sometimes they're interesting (the slow motion train crash that is MtGox) and other times, when they'd not interesting, they're not hard to ignore.

-----


The problem isnt just the title - this whole submission is pointless.

I saw the long hash and assumed it had something to do with bitcoin. I clicked through onto the link, but I still have no idea what's going on. I'm guessing that someone sent and recieved lots of bitcoins in one transaction, but I don't know the significance of that.

Perhaps the OP could have linked to an article discussing or describing it? Or even have made the submission a text submission and commented on it himself?

-----


This is the largest "bitcoin days destroyed" since ever. It's also most likely Mt. Gox's bitcoins that are moving as well. This transaction can be traced back to an arbitrary transaction Mark Karpeles made to prove he still had keys to his address some time ago.

Cool facts:

- where else does $180million move without any fees, in the blink of an eye?

- some transactions after this diverted some money into Satoshi Dice, so it's most likely not the Feds who control this, and they're potentially interested in laundering potential.

-----


This is by no means isolated to engineering or mathematics either. Nearly all students, especially in higher education, will have gaps in their understanding of topics they are expected to just know. The classroom simply isn't able to personalise learning to each student in the way that's needed. The only thing that really can help here the is clever application of technology.

This is part of the problem that I'm working to solve with my startup Ellumia. Some others are making great strides in areas like language learning, but there's still lots to be tackled. We're building a mobile platform that blends bite-sized content with a highly personalised, social experience – something that would be immensely helpful to the students mentioned in this post. If you're interested in innovative learning methods, please check us out: http://www.ellumia.com

-----


Um, what you're doing might be super-duper valuable, but "bite-sized personalized social innovative learning", frankly, sounds more like a game of buzzword bingo than like a product description.

-----


That's a valid criticism.

Specifically, we offer courses that are far shorter and more targeted than a "traditional" offering (or one that you'd find on a MOOC). Content is broken down to the concept level, and available in multiple presentations. This facilitates delivering content that is most suited to a learner's personal style, as well as spaced repetition whereby a student exposed to the same information multiple times over a period of time, in an altered format or context. As I mentioned, this is on mobile, a space that's largely ignored aside from educational games in higher learning.

I hope that is a little less buzzword-heavy, though I suspect it may still not be as BS-free as it could be. Learning what messages work best for different audiences is all part of the fun with a startup…

-----


I'm an EU citizen and it seems a bit annoying to me, too. Clearly I'm in the minority (the upvotes are against me), but if I wanted to keep track of their progress I could just as well follow their blog or Twitter.

-----

More

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: