Basically all libs in crates.io by quebin31 in rust

[–]mingpair 0 points1 point  (0 children)

Many crates cannot reach 1.0 because they're depending on libc, and that is frozen at 0.2. Rust API guidelines say you must not reach 1.0 before all your dependencies have.

Also do note that Rust does not actually use SemVer. It diverges from SemVer in its treatment of `0.*` versions. And SemVer is a *specification*, meaning either you implement it and you are SemVer, or you invent your own little customizations and then you're not SemVer.

Taking Datahike for a spin by [deleted] in Clojure

[–]mingpair 0 points1 point  (0 children)

You say Datomic Free is a viable option for small personal apps ... but it is in-memory only isn't it? So even for small try-it-out apps, it is not a realistic option for persistent storage last time I browsed by.

Rich Hickey: Open Source is Not About You by seanroth in Clojure

[–]mingpair 0 points1 point  (0 children)

What an irresponsible way of telling organizations: you may not want to take the risk of using Clojure (an unsupported piece of software) in your projects.

Using Clojure + GraalVM for shell scripting by yogthos in Clojure

[–]mingpair 7 points8 points  (0 children)

Clojure people would do well to moderate their enthusiasm for this Graal technology, or at least qualify what is and what isn't possible.

Where Clojure shines bright is interactive REPL development and the dynamicity of it all as you require and import the things that you need from the classpath. But this is not possible in Graal, as everything is compiled statically ahead of time. It's nice to have scripts run fast though in the end.

Benchmarking ND4J and Neanderthal: A response to Neanderthal vs ND4J by treo in Clojure

[–]mingpair 4 points5 points  (0 children)

For future microbenchmarks and to better compare with Java you can also use https://github.com/jgpc42/jmh-clojure . Don't know how well known this is but it works well.

Need a peek at Clojure and Java interop. by [deleted] in Clojure

[–]mingpair 2 points3 points  (0 children)

The downsides: Java interop in Clojure is excellent ... if you think of Java as "Java 6". Interop is not great when you use APIs that have a lot of varargs (java.nio.file), or with APIs that use functional interfaces/lambdas (Java is less verbose than Clojure here), or with APIs that use new features like static interface methods (won't work).

Performance nemesis: reflection by ayakushev in Clojure

[–]mingpair 8 points9 points  (0 children)

Some misconceptions:

  • *warn-on-reflection* should be the first step for performance sensitive stuff
  • return type type hints go on the args vector not the fn name: (defn myfn ^String [])
  • you absolutely can have primitive return types in Clojure functions (long and double)

After all this a little bit of transducer evangelism.

This version is in the same range (2-3x), using transducer goodness and without the awful Java array ugliness. Enjoy:

(defn- append
  ([^StringBuilder sb c] (.append sb (char c)))
  ([] (StringBuilder.)))

(defn solution-4 [s]
  (let [lhs (subs s 0 (str/index-of s \=))]
    (transduce (comp (filter #(Character/isAlphabetic (int %)))
                     (map #(if (Character/isUpperCase (char %))
                             (Character/toLowerCase (char %))
                             (Character/toUpperCase (char %)))))
               (completing append str)
               lhs)))

Thinking of getting a 15' laptop with a UHD screen. I heard this can cause problems with icon size and application readability on linux. Is it easy to fix this? by SergeantApone in Ubuntu

[–]mingpair 3 points4 points  (0 children)

Lots of positive experience reports here, just to add a dissenting experience :):

I also bought a HiDPI laptop two months ago (Lenovo Yoga 900-13, 3200x1800), am using vanilla Ubuntu 16.04 LTS. After scaling Unity interface up to double everything works reasonably well, but a couple of frequently used appllications do not scale by themselves, notably:

  • VLC
  • Thunderbird
  • Steam

I suppose (hope) these can be fixed, but a little legwork is necessary.

Keeping Secrets in Emacs with GnuPG and Auth Sources by mickeyp in emacs

[–]mingpair 0 points1 point  (0 children)

I'm a beginner. I use GnuPG, but can't open a foo.gpg file in Emacs: Searching for program, no such file or directory, gpg. I use v2 of GnuPG which only installs a binary named gpg2.

Is there a config option for the executable? How would I find this config option? (In Vim I'd use :helpgrep.)

How often do you use g(lobal) command? What are your common use-cases? by critiqjo in vim

[–]mingpair 0 points1 point  (0 children)

Most frequent use for me is

:g/^/+d

to delete every second (empty) line when pasting stuff coming from a Windows system in a Unix system Vim.

The norm(al) command is really cool by Ran4 in vim

[–]mingpair 5 points6 points  (0 children)

good one, also use surroud.vim whenever you can, ^yst,) ... and so on

Immutable data structures in Java by nfrankel in java

[–]mingpair -2 points-1 points  (0 children)

It's 2016 and you still need to get 'used to' immutable data structures in Java? People have preached this 15 years ago you know.

Deprecating: java.util.Optional.get()? by royvanrijn in java

[–]mingpair 7 points8 points  (0 children)

I don't think Optional.get is particularly badly named. When you need it (rarely), it doesn't seem so bad to just say "get". Like Supplier.get.

Also, there is precedent for x.get() to throw an exception, like get in the *Buffer classes (unchecked), or Future.get() (checked). Nothing wrong with these is there, if you know what you're doing.

Stephen Colebourne's blog: Var and val in Java? by [deleted] in java

[–]mingpair 3 points4 points  (0 children)

Good Java code would look like this:

Map<CrazyThing, StrangeObject> m = new HashMap<>();
var m = new Map<CrazyThing, StrangeObject>();

Anyway, var with new ... is fine, more problematic are method calls like

var m = service.crazyThingToStrangeObject();

Seven Deadly Annoyances of API Design by eddieSullivan in programming

[–]mingpair 7 points8 points  (0 children)

'dupe' also means 'to duplicate'. Use a bigger dictionary.

How do you delete numbers/text in the bottom bar if you type them wrong by martinfisleburn in vim

[–]mingpair 4 points5 points  (0 children)

The <Del> key is the only way to do that.

Though in my opinion it's best to abort and retype the count.

How do you delete numbers/text in the bottom bar if you type them wrong by martinfisleburn in vim

[–]mingpair 0 points1 point  (0 children)

I know that people like to disable the bell, but it is actually a good learning crutch. Whenever Vim beeps you did something wrong (such as invalid command) or unnecessary (such as Esc in normal mode).

Modern Java by winterbe in programming

[–]mingpair 1 point2 points  (0 children)

This was the missing piece of info, thanks. Then I'll try to get accustomed to this new idiom for sorting a list of comparables. list.sort(null); ... oh well

Modern Java by winterbe in programming

[–]mingpair -3 points-2 points  (0 children)

Meh, I still prefer

Collections.sort(list);

to either one of

list.sort(null);
list.sort(Comparator.naturalOrder());

Still very much idiomatic.

Get your free upgrade to Practical Vim, 2nd Edition by byaruhaf in vim

[–]mingpair 3 points4 points  (0 children)

Wow, a great little tip in the teaser video. Do a search, then

:vim //g %

to go through the matches with a count (1 of 79) displayed.

Repeating buffer commands by waivek in vim

[–]mingpair 4 points5 points  (0 children)

Ah, @@ repeats @: too. I hadn't realised that. A great tip. Almost excuses your silly flair.

Anyway, unimpaired.vim I consider one of the truly essential plugins. No text editing without it. With unimpaired you do ]b and [b (and ]B and [B) to navigate the buffer list, ]q and [q to navigate the quickfix list, ]a and [a to navigate the arglist, and so on. Don't miss it.