News for hackers. Stuff that matters.

axelrosen

Re:I am dyslexic on Tuesday August 13, 2019 @01:59AM (#20683169)
Interesting how most of the issues cased by dyslexia he describes have a strong social component.

Seems like having people be more aware and tolerant of its symptoms would help a lot.

Re:Ask HN: Best things in your bash_profile/aliases? on Tuesday January 15, 2019 @09:02AM (#18911139)
I'll just add two more systemctl aliases I got

  alias scs='systemctl status'
  alias jc='journalctl --unit'
Yes, you could call both of them subsets. But one is so small that for most purposes is incompatible for anything but the simplest uses. While the other lets you run an almost identical codebase on two platforms. There are plenty of people who only ever write ClojureScript and couldn't care less about the JVM Clojure, because it really is that close.

And yes, as other mentioned js-cl is trying to do something similar, and I hope it works out!

Sorry bad wording on my part, was just reiterating the point that Parenscript maps closely to regular looking js, while cljs abuses js quite heavily.

Well, Clojure doesn't have programmable reader macros either way.

As long as you're not dead set on specific characters you could do:

   (defun extract-from-objc (obj)
     (objc-typecase
      obj
      (%@NSDate [[[[%@NSISO8601DateFormatter @(alloc)]
                   @(init)]
                  @(stringFromDate:.) :pointer obj]
                 @(UTF8String)]s)
      (%@NSString [obj @(UTF8String)]s)
      (%@NSNumber (parse-number:parse-number
                   (objc-runtime:.:extract-nsstring
                    [obj @(stringValue)])))
      (%@NSArray (map-nsarray #'extract-from-objc obj))
      (%@NSDictionary (fw.lu:alist-string-hash-table
                       (pairlis (map-nsarray #'extract-from-objc [obj @(allKeys)])
                                (map-nsarray #'extract-from-objc [obj @(allValues)]))))
      (t (or (funcall-some (cdr (objc-pick-by-type obj *objc-extractors*))
                           obj)
             obj))))
The reason I say they're good for DSLs is exactly for re-purposing to have a special meaning. Yes, nowhere close to being as powerful as reader macros. But the nice part is everyone can and knows how to work with these primitives.

I do wish we had reader macros like CL, but I'd still totally want the built-in [] and {}.

Yea, it looks like js-cl is more like it. You'd want to implement some reasonable subset of CL. And ClojureScript really didn't have to compromise on much, which is why it's been embraced so easily.

Most of the time you just have a .cljc file and pretty much the same exact code just works on both platforms. In a few places you'll use the #? reader macro that lets you do different stuff based on platform, and that's it.

Well, you basically get simple macros for free as long when you have an s-exp based notation for something. Which is why I do in fact like them. Something like Parenscript or Wisp is really great for lightweight websites.

I remember way back around 2010 or 2011 playing around with CL and Parenscript a bit and it looks like the landscape isn't too different today.

Never heard of js-cl, but Parenscript definitely isn't. It's a glorified s-exp notation for javascript. ClojureScript doesn't compile to plain js. It maintains a lot of it's characteristics at run-time. And this is possible because Clojure does something very similar on the JVM. This in turn enables you to write code targeting both platforms without too much effort.

WISP is a little more like the Parenscript of Clojure (though it's written in javascript itself) https://github.com/Gozala/wisp/blob/master/doc/language-esse...

As a Lisp dialect it isn't that innovative besides a few syntactic improvements [0]. I'd gladly use Common Lisp instead if it could do something like ClojureScript. But by design it'd be hard to pull off.

Like a good politician Clojure is pretty unimpressive in of itself, for any given characteristic, someone has a better take. But as a whole it's one of the few sensible choices out there.

[0] I feel like they're generally underrated. Adding [] {} and #{} might not seem like much, but when writing DSLs they really do make all the difference.

Re:Ask HN: What's your homescreen look like? on Sunday January 06, 2019 @11:20AM (#18839022)
Chrome, Gmail, Phone and Telegram in my bottom drawer. That's it.
Both points are very important. One tells you that there's a systemic issue, while the other reminds you that you can adapt and be better off at the end of the day. I find the discussion around sugar very similar, where some stress how sugar made everyone fat and caused diabetes and then you've got the other side pointing out that inherently there's no problem [0], sugar just causes some to overeat, and you should watch your calorie intake.

[0] it's a little different in that whether there is or isn't inherently a problem still isn't exactly settled science

Re:Time to #DeleteFacebook, Again on Thursday December 20, 2018 @09:30AM (#18725130)
I'm still bullish on Snapchat, but it needs to keep adding new features. It's the only social network that gets ephemerality.

I don't really see a reason to delete Facebook over the privacy drama, I fail to see how it has much to do with the management or anything. Any Facebook replacement one comes up with, would face all the same dilemmas.

What many outside of the privacy-conscious circles are tired of is this whole concept of everything being permanent online. Of having some behavior from years ago haunt you forever. There's where ephemerality comes in.

Re:Shame Storm on Friday December 14, 2018 @03:28PM (#18684387)
Might be wrong as I haven't followed this too much. But, my impression was that he mostly played a clueless person caught in a grotesque situation. Doubling down would mean going after his accusers directly.

He's in a tough spot given who he's up against. In an oligopolistic industry like ours it's risky to be hated by anyone.

But I do think it would work in the sense that he'd have a larger group of people cheering for him. And this is solely about clarity. If you're too nuanced in what you're broadcasting to the world people don't know how to react. Nobody wants to waste time trying to figure you out. Doubling down is exactly about taking out any nuance for a stronger message.

Re:Huawei Reveals the Real Trade War with China on Friday December 07, 2018 @09:40AM (#18628007)
Generally going to face a similar fate as Americans. With exception of a few sanctioned countries everyone can participate economically and legally in the US subject to the same laws.
Re:Show HN: Stock Trading from Google Spreadsheet on Thursday December 06, 2018 @05:26AM (#18616812)
IB is the easiest American one to get for Europeans. It's been around for a while and plenty of respectable finance people have been using it (for personal trading).

If you travel to the US most major ones should open an account for you too. But they ban foreign IPs sometimes and unlocking can be hassle.

The only major problem with the US I'm aware of is the death tax exemption for non-residents is only 60000$, so you don't wanna die or need to structure appropriately.

Re:Ask HN: What to do after $8M (all cash, post tax) exit? on Wednesday December 05, 2018 @08:43AM (#18608074)
As someone who's pretty idle, the worst (and only bad) part is everybody telling you how something must be wrong. Like people can get outright hostile and say pretty mean things. Everybody's completely fine with you not doing much, but if you actually say you're not doing anything instead of coming up with a random answer they go nuts!

Which I must admit I enjoy in a weird way.

Re:Absolute Beginner's Guide to Emacs (2012) on Tuesday December 04, 2018 @01:56PM (#18602492)
It's just my impression, but for the new generation of developers "born" into a js-first world it's pretty much the primary choice. And again I don't have numbers but it does seem like the new generation is MUUCH larger and much more active on mainstream social media. Hacker news must seem like what slashdot seems to me.

I can see a situation where 0 users switch to VSCode and in a few years it still has, say, 80% of market share, just by getting all the new ones.

Re:Real talk with a Blockchain Engineer on Wednesday November 28, 2018 @10:01AM (#18552013)
Blockchains are really unimpressive technologically. I think this is why so many in tech are pretty negative towards them. It's a crappy database, it's an inefficient payment system and so on...

However the few interesting properties that they do have make for a big difference at scale if you look at it in a broader context.

> Its a datastore with some cryptographic identity checks and tamper proof guarantees. It can't prove that a package made it from A to B or that it stayed at some ambient temperature IRL. It only records that someone attested to that, not whether its true. An ordinary database will do for an audit trail.

Sure, there are no inherent features which directly enable that. However with a regular database can you give access to absolutely everybody (even if you have complex access control rules)? Can you incentivize people to interact with this database in a given way? Will people trust the data? Can you make people believe that your system is going to be around for long enough? Can your system be safe from regulatory risk?

The answer to all these question is a very qualified yes. However when you think about them it's pretty obvious it's going to be hard. Say incentivizing people. You can surely assign rewards to people, have a little virtual currency/credit system. But you can see how the more sophisticated it gets the more you're creating something blockchain like. Which is also why private, hybrid blockchains or non-blockchain decentralized shared database systems are interesting btw.

The point is - none of these features or problems are inherently technical. They're more social than they are technical. The questions I posed are just food for thought, there are so many more aspects one could consider.

Used to be really into language learning, this topic comes up a lot there. I'm of the opinion that while the intrinsic ability to learn does drop in some ways [0], a larger part of the difference is simply the fact that we don't put in the same effort. In first language acquisition this is pretty obvious. The incentives are all there. And I'd argue, in a much subtler way, similar mechanics persist in many fields of learning.

Diminishing returns, lower tolerance for messing up, a lot of other going concerns, I could go on and on. The point is you're probably not putting in the same effort.

[0] say as we age our hearing ability predictably diminishes, accounting for some of the difficulty in learning accents etc. But the majority opinion, I believe, over-attributes the difference to reduced plasticity and the likes.

Re:Ask HN: How to do freelance work that is reclaimable? on Sunday November 25, 2018 @02:15PM (#18528358)
I think to some degree you have to accept the disposable nature of consulting. If you want to be responsible for satisfaction years down the road, you could do a product-consulting hybrid, where you do quite a lot of customer-specific dev upfront but as part of a bigger product.

Otherwise you really need to make sure the customer cares about it as much as you do. And many simply don't.

Re:ReX.js – Your RegEx companion on Monday November 19, 2018 @05:39PM (#18490374)
Emacs has a great rx macro that does something like that and is widely used in elisp projects.

https://github.com/typester/emacs/blob/master/lisp/emacs-lis...

Though then again the nice (best?) thing about macros is it gets inlined as a string at compile time anyways.

I tried many times, I thought my odds were better being a technical founder, yet it didn't ever quite work out. It's not just about the abilities or whatnot. The relationship between you and a contractor is just so different than that with a co-founder or a dedicated employee. Will you feel comfortable bothering them with seemingly unimportant details? Will they keep thinking how to do things better?

I generally try to be a nice person and never wanted to be THAT terrible person who tries to get a lot done for no $. But then you still feel like you're wasting your money and feeling scammed is not a great feeling. You have to pick between being a douchebag and a foolish people-pleaser.

I think contractors are great for large organizations that need to quickly scale up (and down) their tech force without hiring. Money isn't a problem for them and relations with employees in a large organization are transnational already so it's not going to be that much worse.

If you're trying to save money, then no don't do it. The best way to save money is to convince somebody to just do it for you.