Better HN
topnewbestaskshowjobs
Log inSign up

haukur

137 karma · joined Oct 10, 2011 (15y ago) · 80 submissions

https://hph.is/coding

https://github.com/hph

Submissions

comment 2y ago · link · parent

If it were a matter of choosing another language, Polish might be a more natural choice, as Poles form the largest minority in the country.

But to answer the question, I personally lean towards discouraging English as the default second language and instead focus on strengthening Icelandic. Encouraging everyone to communicate in the native tongue, regardless of proficiency level, can be very effective. That was certainly my experience when my family and I moved to Catalonia.

Norskan er auðlesin, en ég á erfiðara með að skilja talmál!

comment 2y ago · link · parent

Just to be clear, I do see the value in a group like the Nordic TeX Users Group choosing a neutral language for simplicity and fairness. However, it's quite different when a whole nation adopts a new language just because it's the easy option, without considering the repercussions.

This crutch of using English in Iceland not only discourages (and actively prevents) newcomers from learning Icelandic, but it also creates a paradoxical reliance on a language that most immigrants do not speak prior to their arrival. This creates challenges, particularly hindering integration, as Icelandic is (for the time being) still required in most aspects of society. It also threatens the preservation of our language, which is only spoken by around three hundred thousand people.

comment 2y ago · link · parent

English has become entrenched as the de facto second official language of Iceland. It's a very depressing trend for the conservation of Icelandic, and the ongoing promotion of English will only continue to exacerbate its decline.

comment 6y ago · link · parent

Do you have any sources relating to the foreign family you mention, and of them securing landholding rights? Based on what I've found, the man that was burned wasn't rich (his family does appear to have become moderately well off by the time's standards at a later date, however).

I haven't found any mention of foreigners. The lawyer in the matter was Icelandic.

comment 6y ago · link · parent

While not exactly the same, the concept of "whale drift" has existed in Icelandic law [1] for almost 8 centuries, and still applies today. It specifies to whom a whale carcass would belong to, depending on the situation, and so forth. The concept of "whale drift" also exists in the Icelandic language, and is used to point out an event as a stroke of great luck.

[1] Hvalreki (whale drift) in Icelandic law, from Jónsbók in 1281: https://www.althingi.is/lagas/150b/1281000.401.html

comment 7y ago · link · parent

I cannot edit the post above, but it was meant to say that I'm looking for new clients in 2020.

comment 7y ago · link · parent

SEEKING WORK - REMOTE ONLY (GMT)

I'm a web & product development consultant based in Iceland. Specializing in web development, I work with startups of all sizes and help them build MVPs and full-fledged products. In order to help you build the best product, I make an effort to understand the needs of the company and the customer in equal measure, and I can help you innovate and design new features. I also help teams improve the architecture, performance, and tooling in existing projects. I tend to work with JavaScript, Node.js, React, and all the tooling around these technologies, but I'm flexible in that regard and have experience with many of the major frameworks and languages.

I'm currently evaluating and looking for clients for the second quarter of 2019 and onwards.

Website: https://hph.is

GitHub: https://github.com/hph

Email: hph@hph.is

comment 7y ago · link · parent

It appears that the system font was changed. I'm trying to figure out what it is now, it appears that San Francisco isn't even installed on my system anymore. GitHub, Twitter, and other sites using system-ui / -apple-system as the font-family now look very odd.

comment 7y ago · link · parent

You can buy it online from some stores - this is the first one that popped up on Google: https://nammi.is/food-drinks1/dried-fish.html

10.

Broadcast Channel API(hph.is ↗)

1 points · by haukur · 7y ago · discuss

comment 7y ago · link · parent

What you linked is "CSS-in-JS" (in the sense that the library/framework you use transforms the output for you, for convenience, i.e., you're not writing BEM or whatever - same as in the original article). Vue scopes the styles by adding a data attribute.

https://vue-loader.vuejs.org/guide/scoped-css.html#scoped-cs...

Inspect the result here: https://codesandbox.io/s/3v0pjzoy7q

comment 7y ago · link · parent

SEEKING WORK - Remote

I'm a web & product development consultant based in Iceland. Specializing in web development, I work with startups of all sizes and help them build MVPs and full-fledged products. In order to help you build the best product, I make an effort to understand the needs of the company and the customer in equal measure, and I can help you innovate and design new features. I also help teams improve the architecture, performance, and tooling in existing projects. I tend to work with JavaScript, Node.js, React, and all the tooling around these technologies, but I'm flexible in that regard and have experience with many of the major frameworks and languages.

I'm currently evaluating and looking for clients for the second quarter of 2019 and onwards.

Website: https://hph.is

GitHub: https://github.com/hph

Email: hph@hph.is

comment 8y ago · link · parent

I haven't seen any libraries using the new context API make use of the observedBits prop (currently called `unstable_observedBits`, as its not officially supported). There's a comment in this library's codebase that hints that it will be used in the future. I wrote a bit about this API bitmask-based API a few months ago while I was experimenting with it[1], so I'm curious about its current state and whether others have experimented with it or know about its future in general.

[1] https://hph.is/coding/bitmasks-react-context

14.

Bitmasks and the New React Context API(hph.is ↗)

2 points · by haukur · 8y ago · discuss

15.

Server-side rendering React apps – a primer(hph.is ↗)

2 points · by haukur · 8y ago · discuss

comment 9y ago · link · parent

It's very unfortunate that the APIs of libraries that extend JavaScript builtins affect the development of the language to this degree.

comment 9y ago · link · parent

It does, you can write this with a Babel preset supporting this feature:

    class Foo extends Component {
      state = {
        foo: '',
      };

      // The arrow function here is what you're looking for.
      onChange = ({ target }) => {
        this.setState({
          // You can of course use `foo` directly as the key if you just have the one input.
          [target.name]: target.value,
        });
      };
    
      render () {
        return <input type="text" name="foo" value={this.state.foo.value} onChange={this.onChange} />;
      }
    }

comment 9y ago · link · parent

If you're interested in this approach, check out Pete Hunt's jsxstyle or Kent C Dodds' glamorous. Both allow you to pass in props that map to css rules (e.g., `<Flex justifyContent="center" />`).

comment 9y ago · link · parent

Another good resource to learn about JSX (by the author of Preact): https://jasonformat.com/wtf-is-jsx/

comment 9y ago · link · parent

It still does (these docs use the ES6 class API): https://facebook.github.io/react/docs/react-component.html#c...

comment 9y ago · link · parent

The shallow check is on React.PureComponent. shouldComponentUpdate just returns true by default in React.Component components. See here for details: https://facebook.github.io/react/docs/react-api.html#react.p...

comment 9y ago · link · parent

In case anyone reads this and is left wondering, there's no need to have n functions to handle n inputs - you only need one. A simple example would be to set the state based on `event.target.name`.

comment 9y ago · link · parent

Most of the tooling is stable enough that you can lock your dependencies to minor versions (the default behaviour in Yarn/NPM) and only update when you want the new features. There's no need to stay on the bleeding edge unless you want to. I've fallen prey to this myself before, but there's much to be said about just keeping it simple.

comment 9y ago · link · parent

The React API is stable. There haven't been any major changes to its public-facing API in a long time. Third-party projects that you might also depend on are not always as stable but the React team has no control over that (and third-party dependencies don't have anything to do with React itself or fiber).

comment 9y ago · link · parent

Fair enough - it's a todo app. The code isn't structured in the same manner as the author's, however, so my point stands. It doesn't look like the code was lifted from the docs, as you said, but instead transformed to look like spaghetti.

comment 9y ago · link · parent

Out of curiosity, which of these compatibility features do you find most useful?

comment 9y ago · link · parent

It wasn't lifted from the docs. The tutorial is a tic-tac-toe game, while the example in the post is an AddTodo function [edit: there appears to be an add todo section, but the code is completely different]. Furthermore, all the examples in the tutorials show a pattern where you reference functions instead of writing them inside JSX.

comment 9y ago · link · parent

I really don't see how jQuery would help you much there. It doesn't provide any sort of common structure at all, and it's nowadays arguably not very helpful for its helpers either.

comment 9y ago · link · parent

No, you should be fine. If it starts to get painful to pass around props, investigate Redux or MobX rather than using context by hand.
123