Better HN
topnewbestaskshowjobs
Log inSign up

KKPMW

738 karma · joined Jun 30, 2018 (8y ago) · 178 submissions

Submissions

comment 5y ago · link · parent

All %fun% constructs are just simple functions that can be created by the user and can be used as infix operators. Base R has a few of those: %in%, %o%, %*%, %x%, %%, %/%.

magrittr created %>% which, when used in infix: x %>% f() calls the function on the right side with the argument on the left side f(x).

There are package that provide tons more. For example: https://github.com/moodymudskipper/inops . And you can easily create your own:

    `%sum%` <- function(x, y) x + y

    1 %sum% 2
    [1] 3

comment 5y ago · link · parent

There is a big difference between what is allowed from within a package and what is possible in native implementation. As an example - currently this pipe operator seems to be implemented at the parser level. The parser simply takes the pipe expression and translates it into standard nested function call f(g(x)). Which means - there will be almost no cost in speed (%>% was notoriously slow). In addition the user will get the usual error stack in case something within this pipe fails.

comment 5y ago · link · parent

I think that symbol is used as an approximation of "lambda" character (λ) on a standard US keyboard.

4.

R adds native pipe and lambda syntax(developer.r-project.org ↗)

250 points · by _fnhr · 5y ago · 144 comments

5.

Fast navigation in terminal: coming full circle(karolis.koncevicius.lt ↗)

1 points · by kkoncevicius · 5y ago · discuss

6.

Using redo to manage R data analysis workflow(karolis.koncevicius.lt ↗)

2 points · by kkoncevicius · 5y ago · discuss

comment 5y ago · link · parent

This is exactly right. It's like saying you solved chess because for each configuration of pieces on the board you can use machine learning to predict whether that position can be achieved with valid chess moves. With 90% accuracy.

comment 5y ago · link · parent

Editing should be allowed for an hour or so in order to fix spelling mistakes, reformat text for easier flow, or even as a recovery after pressing "post" by accident. But long-term deleting and editing will hurt the content. This, for example, is visible on reddit where older threads sometimes have these big piles of deleted comments. Instead maybe I would try something new:

1) Ability to post anonymous comments 2) Instead of deleting a comment a user can choose to make it anonymous so that it is no longer associated with his/her account

comment 5y ago · link · parent

HN is working fine; different sub-groups segregate under different topics. People who care about Rust comment under threads about Rust, people who care about science-fiction post comments in threads about science-fiction. And people who care about politics post under threads about politics.

Then the question of "why threads about politics usually have lower quality of comments" is left as an exercise for the reader.

comment 5y ago · link · parent

These clubs are a bit superficial. I wish there was one with requirements concentrated on user experience rather than technical details.

Maybe "no tracking + no ads + no low-effort content + no clickbait + no paid content" club.

11.

Jonathan Blow on Windows Terminal (video)(youtube.com ↗)

24 points · by _fnhr · 5y ago · 11 comments

comment 5y ago · link · parent

To me it seems like you can have a state of mind, and use that state to predict the state of mind of others without being _aware_ of your state of mind at the same time - that is, without being conscious.

comment 5y ago · link · parent

I fail to see why that would be true. I think there are different definitions of consciousness here that are being mixed up.

> Without consciousness you experience a single unified reality: your reality.

To me the word "experience" is what consciousness seems to be about. In that case without consciousness you can "step outside" and everything, but you would have no "internal experience" of any sort. i.e. be a "philosophical zombie" [1].

[1] https://en.wikipedia.org/wiki/Philosophical_zombie

comment 5y ago · link · parent

> the claim that consciousness evolved in order to predict other agent’s behavior

I fail to see why consciousness would be necessary for prediction. Any more context here?

15.

An opinionated list of best practices for textual websites(seirdy.one ↗)

22 points · by kkoncevicius · 6y ago · discuss

16.

Content, Creativity, and Monetisation in the Modern Internet(gtf.io ↗)

2 points · by KKPMW · 6y ago · discuss

comment 6y ago · link · parent

https://whatsmissingfromcss.com/data/comments.json

comment 6y ago · link · parent

Sorry, I don't see how this reply is related to the original objection that frequentist methods are not applicable to events that happen once.

comment 6y ago · link · parent

There are a few things intermingled in this election example.

1. The outcome of the election here is not a probability. It is the population value - the ratio of people voting for candidate X on the election date. It doesn't have to be repeated in the same way measurements of height for all people in United States would not have to be repeated, if instead of vote we were measuring heights.

2. Frequentist probability doesn't require to physically repeat things. It can reason about what would happen in the repeated sampling under certain conditions, and then draw inferences about those assumed conditions. With the election example: if you get a survey of 100 people with 70% voting for candidate "A" we don't need to repeat this survey in order to know the likelihood (frequency) of this result happening if the real proportion of people voting for candidate "A" across the US is 50%.

comment 6y ago · link · parent

> If you cease forward movement with your eyes so you can, for example, underline a few lines, or draw a bracket next to paragraph, or, dare I say it, highlight a sentence, it will require a large energy burst to get started once again. Too many such stops and starts and your brain will be fried.

For me that's not true. The biggest "energy drain" is when I rush reading something and get fuzzy about what is being said. Understanding the text becomes harder and harder and a lot of will power is required to keep reading the text that no longer makes sense. Re-reading a paragraph 2-3 times or stopping to think more about what was written helps. So the fewer times I stop the more my brain will get "fried".

comment 6y ago · link · parent

Maybe an unpopular opinion but I think most people who think they have impostor syndrome don't. Instead they accurately estimate the gaps in their knowledge but are working under conditions that allow them to bypass those gaps by using machines / libraries / frameworks and other types of automation.

If you know you will not be able to answer some things when asked about them - then you know you lack a specific piece of knowledge. That is not impostor syndrome.

comment 6y ago · link · parent

> 18. High-resolution VR will transform both retail and real estate shopping

To me - this one sounds most plausible.

comment 6y ago · link · parent

> Modern IDEs are magic. Why are so many coders still using Vim and Emacs?

The title answers the question to some extent - I prefer Vim over IDEs because I am allergic to "auto-magic". Also, unlike most IDEs, Vim will still be there after 5 years, 10 years, or 15 years.

24.

Ascetic Bullet Journal(karolis.koncevicius.lt ↗)

1 points · by KKPMW · 6y ago · discuss

comment 6y ago · link · parent

One possible explanation would be to think what kind of pictures or photos would get labels with words "white woman" in them. If it was a single woman smiling it would probably be labelled "happy woman" or just "happiness". The word "white" is likely to appear when there are other people of different colors in the same picture. For example "Afro man and white woman happy at a pool" or something like that.

Same with European art. The prefix "European" would only be added when the author of the picture tries to contrast it with something else, or push some agenda about "European art". Otherwise it would just be under "art".

Case in point with another term: look at "American scientists" and "white American scientist". The second one will have more results of black people. This is again, in my opinion, because the addition of "white" is mainly added by those who concentrate and write about things related to race.

Another case in point - try looking for "thin woman" and observe how the proportion of pictures with obesity in them is bigger compared to searching for "woman" only.

26.

Life on the Command Line (2011)(web.archive.org ↗)

1 points · by KKPMW · 6y ago · discuss

123456