Hacker Newsnew | past | comments | ask | show | jobs | submit | marc_omorain's commentslogin

I just bought it. It’s a really nice game.

I have red/colour blindness and I find that the contrast between the red and green borders on cells is very low (they look quite similar to me).

It doesn’t stop my playing - it just slows me down.

It might be something you address is you find you have many players with colour blindness.


Hello! Thank you for the feedback! It's just first version of the game, I will work to improve it!


Clojure works really well for AOC.

A lot of the problems involve manipulating sets and maps, which Clojure makes really straightforward.


I'll second Clojure not just for the data structures but also because of the high level functions the standard library ships with.

Things like `partition`, `cycle` or `repeat` have come in so handy when working with segments of lists or the Conway's Game-of-Life type puzzles.


At CircleCI, we have had to handle many strange YAML documents. Two that come to mind:

A recursive document:

    key: &anchor
     - *anchor
The `~` character represents null:

    ~:
     - ~
This parses as a map of {null: [null]}


What were the authors trying to accomplish with these strange documents?


The recursive anchors seemed to be user-error. Either copy+paste bugs, or an anchors places in the wrong position.

The null character would appear when people try to write a string path, and use the the `~` character without quotes.


Break their parser, probably


You would be surprised at how little of the code in a CI product, like CircleCI, deals with git. On the other hand, there is a lot of code required to integrate with the VCS - authn, authz, webhooks, commit-status, etc.


I have a few qualms with this app:

1. For a Linux user, you can already build such a system yourself quite trivially by getting an FTP account, mounting it locally with curlftpfs, and then using SVN or CVS on the mounted filesystem. From Windows or Mac, this FTP account could be accessed through built-in software.

2. It doesn't actually replace a USB drive. Most people I know e-mail files to themselves or host them somewhere online to be able to perform presentations, but they still carry a USB drive in case there are connectivity problems. This does not solve the connectivity issue.

3. It does not seem very "viral" or income-generating. I know this is premature at this point, but without charging users for the service, is it reasonable to expect to make money off of this?


You can still download the tools from here https://developer.android.com/studio/index.html#downloads - see the section named 'Get just the command line tools'.


What's the difference between grids and flexbox? To the untrained eye, they look like two alternate layout systems where one should suffice.



Very nice. Thanks.


Basically grids is a 2D layout system, while flexbox is a 1D constraint system that results in stuff happening on the second dimension. They're complementary and it would be foolish to use one when the other is needed.


Does this mean we're finally coming full circle after all these years back to Tables for layout?


No CSS Grid Layout is far, far more powerful and versatile than tables ever were. Certain significant classes of layout problems that were either a major pain or even outright impossible with current CSS tools are about to become fairly straightforward.


some of us never left


Flex is only built and meant for handling linier layout, either up and down or left right, and ot does so well with good flexibility and options and developer experience. Or at least compared to the other possible options. It was never intended for making grid layouts, which people are often trying to make it do, because all the other options are so lacking.


> "Slightly cleaned-up Java with a bit of syntax sugar"

This is not an accurate description of Kotlin.

Kotlin has many features that make it better than Java. Most importantly, it is null-safe. In addition to that it makes it simple to enforce data-immutability, which is very difficult in Java.

https://kotlinlang.org/docs/reference/comparison-to-java.htm...


> Kotlin has many features that make it better than Java. Most importantly, it is null-safe. In addition to that it makes it simple to enforce data-immutability, which is very difficult in Java.

Kotlin does have nullability handling yes, but it's a very limited special-case feature - it's a language-level builtin rather than something you can use in your own libraries. E.g. if you want to have an error message in the failure case rather than just null (i.e. some kind of Result type), you can't reuse any of the null-safety functionality (whereas in Scala or Ceylon you can write the same methods to work with either optional/nullable or result-like types).

Data immutability isn't at all difficult in Java. It's tedious (sprinkling "final" everywhere), but not hard.


> it's a language-level builtin rather than something you can use in your own libraries

The only people who still think that a library approach is superior to a compiler approach are Scala users.

I'll clarify this for you: if it's a library construct, it can be ignored. And as a matter of fact, there is nothing in Scala forcing you to use `Option`. You can completely ignore it and enjoy your time diagnosing NullPointerExceptions everywhere.

When a feature is enforced by the compiler, such as Kotlin and Ceylon, you don't get any easy way out: you have to think about null cases or you will not be able to compile your code. Period.


You're conflating two different issues. Yes, Scala allows null and yes, this is unfortunate, though it raises the question of whether there's any better way to do Java interop (you can either assume all Java calls are non-null unless checked, assume all Java calls are nullable and force checking, or trust annotations; all these approaches suck in their own way). It can be mitigated with WartRemover.

But the right way to represent absence - whether you call it null or option or something else - is clearly with a normal type that follows the normal rules of the language, not a special language-builtin type with special language-builtin rules. Some light syntactic sugar for commonly-used types makes sense (like Ceylon's "?"), but what it desugars to should always be something you could write a normal library type for. Indeed if your language doesn't let you implement the constructs you need for this kind of type in a custom type in a library, that should be a red flag that your language isn't expressive enough for general-purpose use.


> (you can either assume all Java calls are non-null unless checked, assume all Java calls are nullable and force checking, or trust annotations; all these approaches suck in their own way)

Agreed, which is why Kotlin has explored all of these options and ending up implementing neither.

Look up "platform types".


Oh my god. I didn't think it was possible to do worse than all three approaches I mentioned, but they found a way.

> Platform types are non-denotable, meaning that one can not write them down explicitly in the language.


Calls to mutate state, such as changing the name field, should be rare. I don't see the value in adding syntactic sugar to make it easier to mutate state.


"Calls to mutate state, such as changing the name field, should be rare."

Says who?

For example, there is a business requirement that we know the on-hand quantity of some item in the warehouse.

It's a busy warehouse, and we keep picking that item for delivery, and replenishing it from our suppliers.

So, the quantity of the item keeps mutating.

How do you propose to deal with the above? Tell the warehouse people that they should only do their thing "rarely"? Seriously.


He means you'd call `increment(25)` to say you've got 25 more, or `employee.suspend()` instead of `employee.setAccess(SUSPENDED); employee.setPay(0); employee.setBenefits(NONE);`


Increment(25) still mutates the value.

What is the point here?

Point - say you have a database with 300 tables and ~3,000 columns.

You do not want to play the game of "hide the method to change the value". That is a big waste of time for everyone involved.


a guess, but i'd wager "rare" here meant the code should in the main prefer immutable data structures (etc), not that the invocations per unit time of a particular method should be low.


> a guess, but i'd wager "rare" here meant the code should in the main prefer immutable data structures (etc), not that the invocations per unit time of a particular method should be low.

Yeah I want to say that for us developers, "rare" is not something that we can code, without some serious sophistication.

More likely we code "if" and it is either "yes" or no".

To capture "rare", we need some serious tools - statistics, analytics etc etc. That is way beyond the regular developer toolset.


I have 8 copies.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: