HNHacker News
TopNewBestAskShowJobs

sbjs

962 karma · joined July 3, 2018

submissionscomments
sbjs··on Call/cc for C programmers (2012)
This is fascinating, but it seems like it only applies to "one shot" programs, like compilers. How applicable is this in the web application space, where state is usually stored externally to the process itself? If used in the way pg's Arc was intended for making web sites easier to reason about developing, then stopping your server results in losing context for follow-up requests. Even modern desktop and mobile apps have a concept of serializing the user's current context in case the computer accidentally shuts down. Context state can't be used safely with call/cc in these situations.
sbjs··on Swift should not be the future of iOS, and why TypeScript should.
I did pick JavaScript as an opinionated suggestion. But really what I meant was that a garbage collected, simple OOP, high-level language is much better than a performance-based efficiency focused language when most of what you use it for has no need for efficiency or high performance.
sbjs··on Swift should not be the future of iOS, and why TypeScript should.
Swift is #6 on that list, TypeScript is #4. Swift is a completely new language which has a big overhead to learn from start to finish, but JavaScript has a lot of momentum and existing developers since it is already the lingua franca of the front end of the web. Swift is evolving slowly, but JavaScript is making very quick progress through TC39 during the same time span that Swift was alive. Swift has ambiguous and biased leadership but JavaScript has a well defined and established committee with members from major competitors who have common interest in the language succeeding. TypeScript inherits a lot of these benefits, as it intends to always keep up with the latest JavaScript standards and specification.
sbjs··on Shift+Cmd+R and Cmd+R always returning different results? (Chrome and Firefox)
I don't understand cache fully, but I do know that if you open Dev Tools in Chrome and long-press the Refresh button, it will give you a drop down with the option "Empty Cache and Hard Reload", and also shows you that Shift+Cmd+R is just Hard Reload without emptying the cache. Sometimes I need to do this, but I don't fully know why or when.
sbjs··on Ask HN: Why are there no public social networks?
All the other answers are great, but I think they're missing the biggest and most important reason: a social network run by any government entity would only run on Internet Explorer 6 or Firefox 2, would store your password in plain text, and would run on 15-year-old un-patched IIS on a few Windows XP servers stored in the basement of city hall. And it would probably all be built on top of a deprecated social media Wordpress plugin.
sbjs··on A Guide to Python's Magic Methods (2012)
Good to know. I haven't used Flask recently, I have used Express.js which is Node.js's version of Flask, and I really like how simple it is. Most apps these days seem to have a REST (or GraphQL) backend and dynamic (often React.js) frontend. Flask (and Flask-RESTful) would probably be a better fit for this type of app than Django.
sbjs··on A Guide to Python's Magic Methods (2012)
People who feel this way usually use Flask instead. Worth checking out.

http://flask.pocoo.org/

sbjs··on A Guide to Python's Magic Methods (2012)
But this article is just explaining operator overloading, right? Doesn't everyone learn that halfway through semester in C++ 101?

And operator overloading has nothing to do with DRY, in fact it's generally better to avoid it except for in very niche situations, like adding __add__ to a matrix type.

sbjs··on Baltimore police will pay consultant $176k to maintain Lotus Notes system
Hey I'd be happy to get $70,000 but I'm stuck having to take care of family so I have to stay in the middle of bufu egypt. Trying to find remote consulting gigs but they're hard to find!
sbjs··on Chemists discover how blue light speeds blindness
I use Night Shift. I'm able to fall asleep minutes after closing my laptop and laying down. For me it's more about comfort than sleep. The blue light is much too bright late at night. My computer no longer hurts my eyes when I stay up late working on cool things.
sbjs··on Show HN: Extension to highlight and tag users on Hacker News
To be fair, Walter is a pretty solid choice. He's a successful businessman and extremely technically smart. There are quite a handful of similar people on here, who are very successful and intelligent and whose comments are always well thought out and insightful. (I want to be one of them one day but my career is just budding, so only time will tell.)

It almost makes me think HN should have a related feature, where people can universally stand out, separate from the leaderboard (link at the bottom). But knowing HN's philosophy, I know this would be against the spirit of the humble-meritocracy they're trying to build, and would do more harm than good.

In fact, I even wonder if this HN-Friends extension is going to have an adverse affect on its users. Right now the usernames are (probably intentionally) understated, to draw more attention to the content than the author. If we notice the person, we already have a bias not only toward their comment, but to read their comment before anyone else's. This goes against the meritocracy that I love about HN. But I also wonder how many thread discussion I had where I missed the context of who is talking, and the direction could have gone so much differently because of it.

And even more importantly, I love and encourage this kind of innovation, and don't in any way want to discourage you or anyone from making clever things like this!

sbjs··on Show HN: Extension to highlight and tag users on Hacker News
Also I would personally prefer for the "tag" box to have a save button next to it. It wasn't clear to me whether it autosaves or if I was supposed to type the name before clicking "add friend". Could just be me though, but I would like this feature. Added this issue so that if people agree or disagree, they can vote on it through thumbs up/down in the Github interface: https://github.com/veggiedefender/hn-friends/issues/1
sbjs··on Show HN: Extension to highlight and tag users on Hacker News
Very cool! I think it's especially great that this is a browser plugin instead of a separate website. It's great when developers make things as easy as possible on users. Nice job, I'll be giving it a try!
sbjs··on Announcing Dart 2 Stable and the Dart Web Platform
Go has Docker
sbjs··on Announcing Dart 2 Stable and the Dart Web Platform
I haven't had my caffeine yet today cut me some slack :)
sbjs··on Announcing Dart 2 Stable and the Dart Web Platform
The thing is, this is almost identical to well written JavaScript. In fact you could do almost all of this in JS even before ES5. So the non-Java-like features you're using here were already present, which again suggests that Dart isn't really getting past the "Good Enough" problem.

It's also something you could do in Java, with the exception of having to wrap main with the obligatory EntryPoint class.

I think this just goes to show that good code can be written in almost any language (except Perl of course) because writing good code almost always just means writing obvious code, which necessitates avoiding cleverness and obscure features (literally all of Scala), twisting control flow (I'm looking at you State monads and call/cc), or adding too many indirections due to limitations of the language (Java).

sbjs··on Announcing Dart 2 Stable and the Dart Web Platform
These days it's mostly about apps, because apps are the main thing that facilitate the transfer of $$$. In the 80s and 90s, enterprises were full of $$$ and needed fast and safe languages for writing all their software. C++ came out to solve this need, and Java came out saying it could do it better. Today enterprises are moving many of their internal tools to the web. Enterprises don't need apps per se, but they do need the tech needed to build internal apps and apps to bridge between them and their partners. Consumers are using desktops less, and mobile or web more. Apps are basically the current de facto software "product". But a lot more goes into making apps today than 30 years ago. An example is how most apps need ML for spam protection and recommendation algorithms, or they are instantly going to be considered outdated and behind the times.
sbjs··on Announcing Dart 2 Stable and the Dart Web Platform
A language by itself is almost never useful, every language needs a killer app, a concrete tangible thing that that language can do better 100x better than any alternative. Like how Ruby had Rails or JS had browsers or Python has ML. That’s not to say you can’t do other things with these, just that their competitor is good enough and has momentum and mind share. It sounds like Dart now has Flutter and I think that’s going to be a huge deal moving forward.
sbjs··on Announcing Dart 2 Stable and the Dart Web Platform
I think Dart started internal development around the same time CoffeeScript gained major popularity and brought attention to JS's desperate need to evolve, but they released at a bad time: when JS finally did start to evolve (as Harmony) which was a reaction to CoffeeScript in the first place. So CoffeeScript served its purpose of pushing JS forward, and most other compile-to-JS languages had no more purpose. I say most because some serve a different purpose than just being a slightly nicer JS, like how Elm piggy-backs on the familiarity of Haskell and provides a niche no-mutation environment, and TypeScript adds type-checking for those of us who can't write code as confidently without it. But the rest served their purpose, and Dart's dream of having its own VM inside Chrome was probably what killed it so quickly.
sbjs··on Announcing Dart 2 Stable and the Dart Web Platform
I think what killed Dart is that they emphasized their plans to make Dart a first-class scripting language of Chrome, so that you could use <script type="text/dart"> instead of JavaScript. This had a lot of backlash from literally everyone, I think mostly because they were bit too hard by IE doing the exact same thing just a few years before. Only after a few years the Dart team changed courses and said "never mind about that VM-inside-Chrome thing, we're just going to compile to JS like everyone else" but it was too late and nobody cared about Dart anymore and all the excitement and enthusiasm was gone. I think people don't realize just how much excitement and enthusiasm from a potential community makes or breaks a project when it's first announced.
sbjs··on Announcing Dart 2 Stable and the Dart Web Platform
Since there's so much competition in this area, hopefully this means Apple and Google will start to make this style of development a native part of their APIs and IDEs.
sbjs··on Where Vim Came From
It's also neat how TextMate syntax files came to be the de facto syntax format that Sublime Text and VS Code use.
sbjs··on iOS 12 uses Lua code downloaded from Apple's servers
I was suggesting that they don't have executable code at all, that they use static configuration. But it may not be possible within their problem domain, I don't know. I always prefer static solutions until dynamic becomes necessary.
sbjs··on iOS 12 uses Lua code downloaded from Apple's servers
One purpose for making Swift was because Objective C is dynamic, and they thought they could get a speed boost by going fully static. The other is because they were having a hard time evolving a C-based language because C is full of plot holes. Swift is meant to be efficient but still allow abstractions, which C is really bad at. (The best you can get with C is leaky abstractions.)

This should be dynamic, but it shouldn't be LUA. It should be something like JSON. Although Lua is sandboxed, so it's safer that way, it is still an easier and bigger attack vector for hackers than JSON would be.

sbjs··on iOS 12 uses Lua code downloaded from Apple's servers
Wait, am I understanding this right? Apple is doing exactly what they forbid iOS developers from doing for years? Downloading code from the internet and executing it, in order to make runtime decisions or to allow live upgrades? That's just hypocritical BS right there. But the comment thread in the tweet is wrong about it being dangerous. Lua can be sandboxed like any decent VM in 2018. "Danger" isn't the problem.
sbjs··on Swift: When Unused Code Is a Bug
C# is one of those languages that I absolutely love and wish I had any reason or excuse to use. But it only seems used in .NET apps which are inherently harder to write than web apps which is why I learned Electron instead.
sbjs··on Show HN: I made a tool that made me faster at Git
Based on those videos, lazygit looks like it does the same things as magit, but with a little more "chrome" (boxes around lists). How do the two projects compare? Could they be merged, or do they have fundamentally different philosophies?
sbjs··on Markdeep markup language
I really like the idea of a new markup format. To me markdown has been very unintuitive in some ways. I can never remember whether more # means higher or deeper header level. Or which of - - - or === makes a first or second level header. But since markdown is first class citizen at github, I don’t think we’ll ever be able to see any real competition rise up (even though github has first class support for others, markdown is the clear winner). And I’ve never heard anyone else mention these confusions so maybe everyone else is fine with it and I’m the only one who wants an alternative.
sbjs··on BYTE Magazine
If AWS didn't use Linux for servers and Apple chose to buy BeOS instead of NeXT, would Unix be around as prominently as it is right now?
sbjs··on 3M Knew About the Dangers of PFOA and PFOS Decades Ago, Internal Documents Show
Relevant XKCD https://xkcd.com/641/
← PreviousPage 4 of 9Next →