Better HN
topnewbestaskshowjobs
Log inSign up

sharpercoder

917 karma · joined Nov 17, 2014 (12y ago) · 333 submissions

rtimon@gmail.com
Submissions

comment 8y ago · link · parent

The website does not show any code in the first or second page. Only a cheatsheet after 3 clicks - which is a pdf.

comment 8y ago · link · parent

The heart of my argument is mostly that integration in main languages should be pursued. F# can be mixed on assembly (project) level, but not on source level (like css in html or html in js/ts).

comment 8y ago · link · parent

If you think about it, a decent stack is composed of languages. That's currently already often true, e.g. the use of IDL languages like protobuf/flatbuffers. Some languages offer integrated idl like Kotlin (data classes). Another example is html, where the UI is described using a dsl to specify elements and CSS for layout & appearance.

This fact caused me to think: should stack also not be made of other languages? Is there a place for a completely pure functional language? I mean, Haskell is nice, but get a bit awkward with I/O. Same for APL. C# has nicely integrated data querying, but from a distance is actually at least somewhat awkward. C# seems to be optimized for mutable domain objects; everything else can be nicely done but falls somewhat outside it's "identity".

I would love to be able to express functions, functors and math using a terse math-y language. Whether that be APL or some sort of blend of Haskell and APL (Haspell? spelling pun intended), I don't care, but it would be great if we can have nice integrations of these languages in a full stack. Sort-of like how TypeScript and JavaScript have dialects to enable React syntax to express HTML within it.

The same thought experiment can be applied to SQL. Can we have a data-querying language integrated right into, say, C# or Java?

comment 8y ago · link · parent

The categories are subjective but at the same time driven by a plethora of factors. The fact that TypeScript is developed by a large company means that it can overcome many barriers. Another factor is that the same company develops a new IDE (editor) in tandem; this means one of the most important parts of a language (tooling) is covered. A third factor of TypeScript is the many language features it offers. Fourth, the development pace is very high compared to most other projects. The "innovation factor" of TypeScript is combined quite high, as the "compile-to-readable-js", language features and tooling support combination is not achieved by many competitors.

Flow is a nice comparison as it is also backed by a large company. They don't offer a developed IDE in tandem, development pace is a lot lower and language features are not that many compared to TypeScript. The "innovation factor" is a lot lower - of the level I think it's not worth pouring resources into it.

comment 8y ago · link · parent

We do need better languages, but we should get rid of languages that marginally improve. Take CoffeeScript: it pushed EcmaScript forward, but does not offer enough feature today to justify pouring enourmous man-hour resources into it.

And this is true for many more languages (Flow, PureScript, LiveScript, IcedCoffeeScript, ...) which don't innovate on many aspects but just offer a slightly different - sometimes improved - syntax. I do recognize that many languages add value, but that must be offset to the cost of using these languages. Costs which are often quite high: Googleability, StackOverflowability, documentation, tooling, develop mindshare, library support, stability - these things don't come cheap and take years to mature.

Furthermore, these "innovate slightly" languages in the webspace take away resources from improving the current state of the art in mainstream (EcmaScript, TypeScript, Dart, C#, Java, ...). For instance, instead of improving some JS tool now resources go into e.g. writing a language server for aforementioned language.

A good example is Elm which does try to innovate on core concepts (builtin reactivity). That's a conceptual feature which can bring the state of the art of programming language design further.

Last, I do not mean that we should not write any more new languages; but we should stop trying to get large-audience adoption for "innovate-slightly" languages. It's a waste of braincycles and actually hurts the ecosystem.

comment 8y ago · link · parent

This boils down to code removeability. A few larger classes wit large methods is in general easier to remove/refactor then a large amount of small cohesive classes with an obtuse design concept behind it. Of all the codebases I refactored, I take the "large methods and large classes" hands down. Pulling a few classes here and there is easy, compared to first understanding a clusterf*ck of overengineered abstractions.

comment 8y ago · link · parent

The quality of (any) mutable e-paper tablet will boil down to:

1. writing movement-to-pixel latency (should be around 5ms)

2. writing experience (tilting support, pressure levels, anti-aliasing, ...)

3. speed of apps on the device

4. shareability of annotations

5. "stroke-recognition" of diagrams, text, math formula's, etc

6. mashing of touch & pencil gestures

7. apps on the platform

I'd argue that only the Surface 4 solves (1) & (2) completely, with the competition between 75% and 90%. Speed (3) is a solved problem for mobile CPU/GPU/LED/OLED hardware, but e-paper is not close to 50%. (4) is also still quite young, since the "write on digital paper" thing is not even being used by enthusiasts (only some rarae niches show consistent use). (5) is mostly solved for handwriting recognition, and good progress is made on diagrams and math formula's. But it's young, and certainly not yet a commodity. (6) seems quite solved, as most algorithms to distinct between pencils and hand/finger touches work quite well. (7) is not yet solved, there are no good apps. Some exist, but they have "handwriting" as a feature, but not as a core feature.

Color may come in as 8th, but is for most digital authoring not that important. It would certainly increase the potential market for a good e-paper device, but would come last on above list.

In the past 15 years, progress on e-paper display technology has been slow but steady. Is the latency problem solved yet? Or are we still around 100ms?

comment 8y ago · link · parent

I imagine autonomous bicycles using gyroscopes to stay stable, highly integrated camera's with environment comprehension (Waymo off-the-shelf chips) to redistribute them over the city at night.

comment 8y ago · link · parent

Please just let me pay for not seeing ads.

comment 8y ago · link · parent

One thing with reputation systems which is not accounted for I feel in many websites, is that higher reputation must translate to higher responsibility. It's nothing other then the good ol' "With power comes responsibility" adagium, also known reversed as "Power always corrupts".

In my humble opinion, there should be also a system that ensures increased power is applied correctly. SO does not have this, and that's a major problem.

comment 8y ago · link · parent

They should be included, as it simply is a valid use-case which most likely will actually be used. However, there should be many more examples or good real-world use-cases. Lack of those concerns me.

comment 8y ago · link · parent

The market should be able to handle this. Thus, the government should create the curcumstances this can occur, which means in practice that timeslot-based tarifs should be enabled.

comment 8y ago · link · parent

"Headlines are still set by hand."

I now understand where the word "typesetting" comes from.

comment 8y ago · link · parent

When discussing hydrogen cars, I particularly like the blog of Mux about this topic.

Part 1: https://ssj3gohan.tweakblogs.net/blog/11470/why-fuel-cell-ca...

Part 2: https://ssj3gohan.tweakblogs.net/blog/11493/why-fuel-cell-ca...

Part 3: https://ssj3gohan.tweakblogs.net/blog/11556/why-fuel-cell-ca...

Part 4: https://ssj3gohan.tweakblogs.net/blog/11572/why-fuel-cell-ca...

comment 8y ago · link · parent

I'd like to be able to specify restrictions on type usage in Javascript. For instance, in some cases I know that my array will always be 6 items larges - no smaller, no larger, never sparse. But I can't specify this, yet it allows for certain optimizations (e.g. loop unrolling).

Lately I was memory profiling an application in Javascript using Chrome. The fact that it used ES6 classes really helped, as some anonymous classes where hard to find memory leaks with, but the typed classes was a simple text query.

I can imagine ES6 classes with decorators may enable specialized optimizations too.

comment 8y ago · link · parent

I hope to see a pluggable markdown editor sometime. Pluggable in the sense that the syntax (lexer & parser) are highly configurable and can cater to the needs of the domain. Because in effect most websites, documents, et cetera 1) use a certain flavor of markdown and 2) have extensions.

It would be nice to be able to configure a certain syntax and then have the editor be aware of that syntax. Most editors out there currently only work with a fixed syntax or a fixed set of syntaxes.

comment 8y ago · link · parent

A cent is a minor currency unit; think procent, aka hundred in latin, or used in common international form one-hundreth.

comment 8y ago · link · parent

We don't need both. 10 toasters is more then enough to fulfill our needs.

comment 8y ago · link · parent

I guess the culture around a language matters significantly. For instance, there is quite a specific culture around the Rust community/language. The focus on the language ergonomics is also reflected in many packages. Same goes for the mutability/immutability aspect of code.

A second example of this culture is the go language. I read a few repo's, and the same style of programming is seemingly applied throughout.

For the Java case, I can actually see operator overloading going haywaire over many codebases. The same as overengineering is a typical trait associated with Java.

comment 8y ago · link · parent

> [...] A good programmer builds a working vocabulary. A good programmer does language design, [...]

You see this more and more in "test languages" like cucumber. These languages more explicitly allow programmers to specify domain items and behavior, much more so then general programming languages like Jav, C#, js, etc. I'm currently experimenting with a piece of software that actually does have a specific domain language defined using ANTLR. I'm totally unsure of this will make any sense, but at least it is fun to do. One benefit I can see already is that I now have fully typed & typechecked logging :). Another aspect I'm experimenting with is using it as a replacement for sais "test languages".

You can find my grammar here: https://github.com/generateui/jsettlers-web/blob/master/jset...

comment 8y ago · link · parent

All items are equal to the second sequence. Which means, no items in "items". I could have picked a better example :P

comment 8y ago · link · parent

With many languages adopting LINQ object querying, I find it more and more suitable to start using math's set operators for them. Many languages have almost identical behavioral sequence operators (.find in js, .Where in C#, etc) but math sort-of standardizes them all with a sound theoretical background. I'm not entirely sure if they all map 1-to-1, but at least most will.

    const items = ∅; // empty set
    if (myItem ∈ items) { ... } // is element of
    const union = items ∪ otherSet;
    assert items ≌ ∅; // items are all equal

comment 8y ago · link · parent

Seems entirely reasonable; using a nuclear reactor to pump vast amounts of air into the water. While you can have high volume, it is restricted to a relatively small area only. To have noticeable impact on agricultural runoff, we need similar devices in river delta's. They can probably be less powerful; simple windmills probably could have a local measurable impact already.

comment 8y ago · link · parent

NYT seems remote friendly, but is NYT remote non-US friendly? Front-end/Full-stack engineer from The Netherlands here.

comment 8y ago · link · parent

Typically, I would agree. Yet, I'm fairly certain Google has good reason for doing so.

comment 8y ago · link · parent

You assume that you need to tag manually. You assume that you are forced to do so. Currently, it's perfectly possible to put all files in a single folder. Your OS will be happy about that (except maybe some technical limitation of max filecount of a folder).

comment 8y ago · link · parent

& , & . 🡒 & = & < ️.

HN apparently does not support unicode: https://imgur.com/a/Px2z5

comment 8y ago · link · parent

Google Desktop was indeed a great solution partially solving the tag problem in Windows. A good tagging system trumps search as you can make the results much better determinate. The ability to create your own namespace and then organize every file into that namespace ensures encapsulation. In a search result, you almost always have to filter out irrelevant items.

Good working search solves the problem pragmatically though :)

comment 8y ago · link · parent

A way to see folders & tags is to treat folders as tags but with the property that items may only be of one folder. The same happens in biology where scientists try to classify animals into one folder; a cat is put into the mammals folder (which has multiple hierarchies of subfolders). Instead, this classification system may be much more effective if it is classified as tags instead, where items may belong to multiple folders (or categories). This solves problems like the platypus, which belongs to multiple "biological folders".

It seems that humans have a hard time reasoning with the tag concept. I'm not sure where this comes from; is it decades of working with the folder/subfolder idiom in Windows, where most people are grown up with? Is it the resemblance of the physical world where we also put documents into one folder and one folder only? Or is it our intuition to simplify matters, and therefore seemingly make things simpler to uniquely have items belong to one container? I don't know; most likely, it's all the reasons above plus a few that I didn't mention.

comment 8y ago · link · parent

This is strange, considering the competition going on in this industry.
12345
12