Better HN
topnewbestaskshowjobs
Log inSign up

nathell

6,186 karma · joined Apr 18, 2010 (16y ago) · 920 submissions

Just another Clojure hacker.

https://danieljanus.pl

meet.hn/city/52.2319581,21.0067249/Warsaw

Submissions

781.

You already use Lisp syntax(blog.danieljanus.pl ↗)

110 points · by nathell · 12y ago · 109 comments

comment 12y ago · link · parent

It's not only "not intimidating", it's actually a prime example of good quality code. See http://blog.danieljanus.pl/blog/2014/04/02/2048/

comment 12y ago · link · parent

Whew. I was fearing this was yet another http://www.wikipediaredefined.com/ but fortunately I was wrong.

comment 12y ago · link · parent

There's cl-parser-combinators (https://github.com/Ramarren/cl-parser-combinators), which is supposed to aid in writing parsers in a painless, Parsec-like way. I haven't used it, but it may be worth a try.

comment 12y ago · link · parent

Any support for i18n?

(For English-only speakers: Excel's translation to other languages goes as far as translating function names, thus rendering non-English Excel users' knowledge useless when confronted with an English Excel. E.g., IF(ROUND(A1)=1,B1,C1) in English Excel is JEŻELI(ZAOKR.DO.CAŁK(A1)=1,B1,C1) in Polish Excel -- yes, with all those funky non-ASCII letters.)

comment 12y ago · link · parent

Reminds me of OpenCyc [1]. I'll need to have a closer look at it someday.

[1]: http://www.cyc.com/platform/opencyc

comment 12y ago · link · parent

A friend of mine has majored in philosophy at University of Warsaw, Poland, and now works at Google in Mountain View. His wife, also a philosophy grad, has co-founded a startup headquartered in CA, Wellfitting.com.

788.

DOS debugging quirk(blog.danieljanus.pl ↗)

2 points · by nathell · 12y ago · discuss

789.

2048: A close look at the source code(blog.danieljanus.pl ↗)

4 points · by nathell · 12y ago · discuss

comment 12y ago · link · parent

And so we have 2048 with a corporate touch to it. What next? Microsoft(R) 2048(TM)? Apple i2048?

comment 12y ago · link · parent

Any Linux distro built against musl out there?

comment 12y ago · link · parent

Can the authors somehow back the statement of MySQL's popularity vs. PostgreSQL? If anything, the latter seems more popular, judging from the frequency of its appearances on HN.

comment 12y ago · link · parent

This looks inaccurate. The First Republic of Poland was not fully disassembled until 1795, whereas this map shows it as nonexistent as early as 1764. (or is there some desync?)

comment 12y ago · link · parent

It's supposed to be English (3 to 5-letter words from the EOWL word list).

comment 12y ago · link · parent

Thanks! I'd spend more time polishing this but I wanted to release early and at least pretend not to waste the entire evening (elapsed time from initial thought to release: ~3 hours).

796.

Words oh so great: 2048 meets Scrabble(danieljanus.pl ↗)

2 points · by nathell · 12y ago · 5 comments

comment 12y ago · link · parent

In an ideal world, this should really be a no-brainer. Gender-background abuse should be an abhorred practice, the way we normally abhor, say, killing people.

It is telling that the topic of sexism in tech and the workplace is controversial at all.

comment 12y ago · link · parent

The original title didn't mention the date at all.

comment 12y ago · link · parent

The dates on Dan Weinreb's blog are all wrong for some reason. This post likely dates back to 2011 or before. (EDIT: Ah, corrected by the moderators, thanks.)

I had the pleasure of meeting Dan at ECLM 2008, four years before his death. He was hacking away on his XO-1 and showing around fancy things. A very memorable man. He's missed.

comment 12y ago · link · parent

There are problems with all three techniques.

The problem with adopting a prevention focus is that it doesn't work. Or, rather, it might work when the fear of failure is the only fear at stake, but -- at least for me -- it seldom is. For example, one might have thoughts like "I really need to be doing this, otherwise it might be too late ... hang on, it already might be too late ... I really should check ... but what if it's already too late? I'd feel awful ... no, let's not feel awful, let's check sometime later." Poof, thought gone until next time. When you suffer from GAD or any other psychological disorder involving anxiety, about the only thing you can do is understand your fears and your reactions to them, and take small steps towards reinterpretation. Fighting anxiety with inducing more anxiety is not going to work.

The problem with ignoring your feelings is that it's much easier said than done. Good luck ignoring the urge of turning off the alarm clock when you're not even half-conscious, you feel dizzy, sleepy and have headaches. While in #3 the author advises to "embrace the fact that your willpower is limited," here he seems to forget all about it. In situations like getting up in the morning, techniques involving subconsciousness like [1] are more likely to work.

We are more feeling-driven than we think ourselves to be, and that's not necessarily a bad thing. Those feelings are there for a reason, and ignoring them might just not work. Indeed, the author acknowledges that "on some level you need to be committed to what you are doing" and I think when he says "ignore not feeling like doing something," he actually means "_trick_ your mind into starting feeling like doing that."

The problem with using if-then planning is that for some people, it's all too easy to change the decision, even if it's already been done; the unconscious mind keeps re-examining the decision and re-pondering the issue at hand. So when the time comes, you end up re-considering the decision instead of deliberating what to do. That's not exactly the same thing, but it still eats up willpower.

[1]: http://www.stevepavlina.com/blog/2006/04/how-to-get-up-right...

comment 12y ago · link · parent

This is a Google translation of a paper published by a Polish medical journal (in Polish, with an English abstract). Despite being an automated translation, it excellently conveys the scientific value of the original text.

The journal in question scores 7 points on a list of journals published by Polish Ministry in Science. For comparison, "Nature" is worth 50 points. Those points subsequently translate to the authors' evaluation factors, affect their chances of obtaining grants, etc.

802.

Medical journal: "Health behavior models according to sermons of John Paul II"(translate.google.com ↗)

1 points · by nathell · 12y ago · 1 comment

comment 12y ago · link · parent

That name is already taken: http://en.wikipedia.org/wiki/Stalin_(Scheme_implementation)

comment 12y ago · link · parent

One useful set of gcc flags to consider when building a statically-linkable library/executable and aiming to reduce executable size is -Os -ffunction-sections -fdata-sections -Wl,-gc-sections.

This causes gcc to put each function in a separate section in the resulting object file, and the -gc-sections option makes ld strip the sections that are not reachable by calls from main (basically a tree-shaker).

comment 12y ago · link · parent

When SO's down, all the programmers grind to a halt. When HN's down, all of them accelerate to levels normally unseen.

comment 12y ago · link · parent

I have very fond memories of OCaml. It was OCaml that introduced me to functional programming, way back in 2000 in my freshman year at the uni. I'm a Lisper/Clojurian these days, but I think warmly of OCaml's type system, the speed, the self-containedness of the distribution, and the fact that getting the code to compile tends to mean getting it to actually work.

My #1 gripe with OCaml is the fact that its strings are composed of single-byte characters. I know there's Camomile, but not having it as part of the language core creates a sense of disintegration akin to PHP and Python 2.

There's also this: http://www.podval.org/~sds/ocaml-sucks.html which I mostly agree with.

But, all in all, OCaml rocks.

comment 12y ago · link · parent

The comment "Put the blame where it belongs: Automake" below the original article sums it up pretty succinctly. Quoting:

All the complaints in the article are PRECISELY the kinds of complaints that autoconf programmers worked very hard to avoid. For example, it's IMPOSSIBLE to have version skew with autoconf because the configure script is completely pre-generated before being shipped. As far as the user is concerned it's a simple sh script.

ALL of these problems stem from the "automake" monstrosity that creates many more problems than it ever solved. Unfortunately people now tar autoconf with the same brush as automake and libtool whenever they run into problems with these. Sigh.

comment 12y ago · link · parent

Duck typing is not the same thing as dynamic typing. You can do the latter without the former, and there are features akin to duck typing in some languages normally thought of as statically typed (e.g., C++ templates).

comment 12y ago · link · parent

Did anyone mention Tetris1D yet? http://www.tetris1d.org

comment 12y ago · link · parent

For C: strncpy(), strncat(), snprintf() (or the non-standard asprintf()), and fgets(), respectively. I believe pickle is a Python thing.
1
262728
31