News for hackers. Stuff that matters.

noshbrinken

Re:Show HN: Readwise – Review and retain your Kindle highlights on Wednesday September 27, 2017 @04:08AM (#15345749)
This tool will parse your local My Clippings file to JSON: https://github.com/maxhallinan/my-clippings-to-json
Re:Currying vs. Partial Application (2015) on Tuesday September 19, 2017 @05:53AM (#15283129)
I can't speak to Typescript but check out the Flow types for Ramda: https://github.com/flowtype/flow-typed/blob/master/definitio...

Maybe just a matter of perception but it looks verbose to me.

Re:A lingering farewell to the username on Friday September 15, 2017 @04:05AM (#15255459)
Some (many?) slack bots will need to be updated.
>...what we call web frameworks are transforming from runtime libraries into optimizing compilers.

I took that to mean that the frameworks are doing the optimization. But the article doesn't give examples of the frameworks. The only examples of code transforming optimizations are Uglify and Babel. So I thought maybe these were the things the author has in mind and not actual frameworks. I was genuinely confused and prefaced with the aside about pedantry because questioning these kinds of semantics can come across as pedantic.

The second half of my comment stands regardless.

> The trend started by minifiers like UglifyJS and continued by transpilers like Babel will only accelerate.

Not to be pedantic, but are UglifyJS and Babel "frameworks"? Not a Ember user, so maybe Ember has some sort of built-in source code transformer and that's what the author is referring to?

I think the basic idea that JavaScript developers, especially those working in a browser environment, will increasingly write source code that compiles to JavaScript "bytecode" is not a recent idea. A much more nuanced reflection on that idea can be found here: http://composition.al/blog/2017/07/30/what-do-people-mean-wh....

With all the hand-wringing about "JavaScript fatigue", it's a little bit sad that prominent JavaScript developers use titles like "Compilers are the New Frameworks". The tone of this title is the tone of a bell ringing for the next round of JavaScript fad musical chairs.

Re:Americans Losing Faith in College Degrees, Poll Finds on Friday September 08, 2017 @12:55AM (#15197936)
I think you're missing the point. I don't think that Americans are losing faith in the value of education. Most Americans I know envy the low cost of education in Europe exactly because they would like the same conditions of access. Simply put, we want to go to school. But we don't want to sink ourselves into decades of debt to do so. Would anyone?

Ask HN: Thoughts on Flow

I spent the last week using Flow at work. This is the first static type system I've used. It was much more challenging than expected and yielded no (perceptible) practical benefit. I lost a day trying to resolve Flow errors in seemingly simple code. The error messages are cryptic and sometimes the stack traces are misleading. Is this generally the experience with static type systems? Static...

( Read More... | 1 comment | 3 points | on HN )
Individual known for benevolent acts arrested on charges of other, malevolent acts chills community of benevolent actors?
Re:Software is narrative on Saturday August 05, 2017 @06:18AM (#14935063)
I definitely appreciated this early warning to get off the ride.
Re:Elm in Production: 25K Lines Later on Tuesday August 01, 2017 @07:19PM (#14906405)
Thanks for the code snippets. That actually helps me to understand quite a bit how Elm's JSON parsing situation can be improved within the FP paradigm.

> So what you're frustrated with is that a group of likeminded individuals celebrates their common point of interest and doesn't make room for you to nay-say them?

I'm not frustrated with responses to criticisms I've made. In fact, I haven't made any criticisms (except of course, the ones in the last comment :P). So I don't have any experience of anyone not making room for me. But I have observed some smart people with well-articulated suggestions get shut down. It's not that their suggestions weren't accepted but it was the way that their ideas were received. I haven't actually seen someone who isn't Evan C. contribute something significant that isn't "doing X like Evan would do it." In the entire world of this language, there seems to be 1 architect and a community of implementers. Now, there's nothing wrong with being an implementer. I am an implementer. But it seems easy to see that cultures are healthier when there are a diversity of ideas.

I think that your characterization of the Elm community as a "group of likeminded individuals celebrat(ing) their common point of interest" is actually close to what I'm talking about. It's great when a programming language community is passionate about the language. If people enjoy using that language, it's certainly a good sign. But I wouldn't trust the judgment of a group of people who can't critique what they love and are unwelcoming to those who do.

The counterpoint here is Dan Abramov and the Redux community. Dan is continually pushing people to understand why they are using Redux and not to see it as a solution for everything. That kind of transparency, and the continual acknowledgement by Redux maintainers that there is more than one good way to do something, is the kind of intellectual honesty that I'm using as a standard in my assessment of Elm.

> How many Python tutorials stop midstride to browbeat you about how great Python's way of doing things is?

I couldn't say and it wouldn't change my opinion of Elm.

Unfortunately, CFS is not the only illness whose existence the medical profession generally refuses to admit. There are a host of other syndromes or symptom constellations that doctors can't find markers of and thus call psychosomatic. Generally, people suffering from these conditions congregate on message boards where they develop a culture and community. Sometimes this is truly productive research sharing and emotional support and sometimes it promotes alternative treatments of dubious efficacy and speculative science based on amateur readings of research. What's really overwhelming is the disconnect between the medical profession and the people they exist to serve. These people need help and yet doctors seem to push them away because doctors are too uncomfortable with a state of not knowing or not understanding.
I've wondered the same thing myself pretty much every time I've come into contact with a doctor. The fundamental lack of curiosity for someone in a field related to science (seemingly based on science) is astonishing.
Re:Elm in Production: 25K Lines Later on Monday July 31, 2017 @07:07PM (#14896646)
Something I find incredibly off-putting about Elm is the evangelical and generally unbalanced tone taken by many prominent members of the Elm community. I almost never come across Elm advocates accepting a valid criticism of the language. The response almost always amounts to "you don't understand" or "yes, but". They spend a lot of time celebrating the compiler's humanistic virtues but seem less clearly humanist in their relation to original thinking or diversity of thought. So much of Elm community dialogue (in talks, in articles, in the Elm slack which I follow daily) is simply those with more experience initiating those with lesser experience into the "Elm way" of doing things. For this reason, Elm feels more like a framework with a domain specific language than a fully qualified programming language. And while it might seem like a gentle introduction to functional programming techniques, I'm not confidant that it really teaches people the concepts themselves nor gives them enough room to think critically about how to apply them. Instead, the task is to internalize and apply the "Elm way". The inability to even acknowledge the unprecedented labor required simply to parse a JSON response is a perfect example of the cultish mentality emerging in this community.
Thanks for adding redeuceur to your list! I didn't realize there were so many reducer utilities but I'm not surprised. I like the way Redux leaves room for the user to play with the implementation.

In the blog post you linked to ([2]), you say:

>Ah, the dreaded switch statement. For some reason, this is one of the most disliked aspects of typical Redux code, and I have yet to figure out why.

The Redux docs take the position that switch statements are an implementation detail. The documentation author(s) provide an alternative approach, the action type to handler map, in the Reducing Boilerplate section. I think Redux advocates get a little bit impatient with the criticisms of Redux that amount to "I don't like switch statements". I share that point of view. Switch statements are an implementation detail and aren't worth arguing about when the Redux architecture does not depend on them. When I came up with redeuceur, I wanted to isolate independent operations. For me, breaking a larger function into smaller functions means less cognitive overhead. I would have used the createReducer idea from the docs but I needed support for arbitrary computed conditions rather than a simple action type map. So, it's not about getting rid of switch statements but more about making it easier for my average mind to keep track of things.

All of that being said, are you sure you're not being disingenuous when you say "I have yet to figure out why?" The strength of the animus against switch statements in Redux reducers might be a product of received wisdom or unreasonable bias. But the additional cognitive overhead of things like `break` vs. cascading `case`'s, and `default` is a reasonable basis for preferring `if` statements or something more declarative. As near as I can tell, the original Redux examples used switch statements because they were aesthetically pleasing to the author. There's nothing wrong with this. But it shouldn't be a surprise that people prefer a construct with less complex behavior, even if the complexity of a switch statement is manageable to someone with solid JavaScript experience.

Re:JavaScript Fatigue or My History with Web Development on Tuesday June 27, 2017 @09:41AM (#14645260)
The last part of your comment blames front-end developers for the shortcomings of the web platform. I think many would be interested in a more uniform, stable interface. But they're not the ones with the power to change things on the protocol layer.
Re:Reading OpenBSD source code daily on Friday June 09, 2017 @11:18AM (#14521998)
John Resig used Genius to annotate the jQuery source code. Seems to be broken now.

https://genius.it/johnresig.com/files/jquery-original.html

Great list! Thanks a bunch.
I like python_prompt_toolkit, though I think the learning curve can be a bit steep. It gives you a ton of flexibility, which I really appreciate, but I have a hard time remembering how all the pieces interact. I hope I don't sound overly critical of people's open source work, because I've used and really appreciate both Inquirer and PPT. Just seems like there's yet to be a canonical library for this problem set.
This is great. Exactly the kind of thing I'm looking for.
I think many/most Node TUI's use Inquirer. I have mixed feelings about it. Python has several library's that provide lower-level constructs for building CLI and TUI's. Then they provide examples for using the library to implement a common pattern or prompt. Inquirer gives you some ready-made prompts but doesn't provide any help/convenience for creating your own prompt. It seems like the wrong level of abstraction.
Thanks for pointing that out. I'm interested in both.
I love reading Dan Abramov's writing because I always learn two things at the same time:

1. something about programming;

2. something about communicating with people.

Older »