Better HN
topnewbestaskshowjobs
Log inSign up

pkuki

20 karma · joined Oct 10, 2013 (13y ago) · 15 submissions

Submissions

1.

Show HN: Gitfold – every Git branch as a folder, ready in a second(github.com ↗)

6 points · by pkuki · 2d ago · 1 comment

comment 5d ago · link · parent

FUSE isn't new, but GitFS, EdenFS and VFS for Git solve a different problem: lazy fetching from a server. A checkout is cheap until something reads it - e.g agent trying to run rg over the whole tree. That problem is solved in gitfold. Also gitfold does not need or try to change any existing git behavior, and is fully compatible with existing git binaries without any modifications. So while used technology is the same, approach is from completely different angle.

comment 5d ago · link · parent

Ha, fair: ClearCase dynamic views were a filesystem too. The difference is that nothing is remote and git stays the source of truth. And it's a single binary that runs without root, tiny next to a behemoth like ClearCase.

comment 5d ago · link · parent

Shameless plug, but a bit related to jj:)

I recently created a project which utilizes FUSE to serve git files directly from object store without a checkout. Main motivation was to sepeedup a worktrees creation (I work on a huge monorepo). In my case it helps a lot - now I wait a second instead of a minute. But then I realised there are other interesting features which having vfs opened:

- tree structure of related branches (simplest case of that are stacked PRs) which rebases itself

- live preview of merge state or any node of such tree

- on demand creation of a new branch which merges any of the existing ones very cheaply (e.g for a throwaway build check)

- quick and simple comand which shows conflicting files between selected worktree and all others

- agents gets notified about such conflicts when they happen

I was able to design it in a way so git sees those virtual workspaces as normal worktrees, and all git commands works exactly as you would expect. So I think for some people, especially on the very big repositpries, it might solve a few problems they try to solve with jj.

https://github.com/pkukielka/gitfold

A few typical use cases: https://github.com/pkukielka/gitfold/blob/main/docs/guide.md

5.

Cryptocurrencies Revisited: A Different Approach(medium.com ↗)

3 points · by pkuki · 5y ago · discuss

6.

Cryptocurrencies Rethought: Taking a Step Back(medium.com ↗)

2 points · by pkuki · 5y ago · discuss

comment 11y ago · link · parent

Also for GGO 2012 you can view entrants here: http://pkukielka.github.io/ggo12-viewer/ (disclaimer: viewer was done by me). If I remember correctly someone forked my code and did the same for 2013 edition.

comment 11y ago · link · parent

Look at the original blog post. I just added third column to show ratio between given data.

comment 11y ago · link · parent

I thought it could be interesting to see ratio of program performance to its length. If I didn't make any mistake it looks like that:

              perf3                   perf3 / 
              macros      chars       chars * 100
  -------------------------------------------------
  scala       15963       24885       64,15
  nim         11121       20263       54,88
  java        17969       53223       33,76
  ocaml       7063        24371       28,98
  coffee      2326        15653       14,86
  racket      2461        17229       14,28
  cs          5414        45039       12,02
  clojure     1174        10099       11,62
  ruby        1255        13247       9,47
  go          3048        36321       8,39
  vb          4523        58099       7,78
  rust        4084        56516       7,23
  js          1726        26437       6,53
  c           3649        73047       5,00
  haskell     1163        30115       3,86
  python      304         19632       1,55
  forth       563         44715       1,26
  php         331         27332       1,21

comment 12y ago · link · parent

Down in Poland as well.

comment 12y ago · link · parent

It's simply incorrect. Where you found that information?

In section 2.3 android is mentioned explicitly: "These features are more useful on Android (besides micro-benchmarks) where a vast RAM doesn't masquerade redundant allocations."

In section 5.2 you can read: "This prototype requires -target:jvm-1.7. Right now scalac doesn't produce the newest class file format of JDK8. In the meantime, -target:jvm-1.7 can be used on that platform. A discussion about performance at: https://groups.google.com/d/msg/scala-internals/uBxprJixpwk/...

If you will check that link first sentence in the thread is: "To recap, the new backend supports Java 6 and 7. In an experimental branch (based itself on the experimental backend) there's now support for MethodHandles, building upon "Late Closure Classes", ie the ability of the new backend to materialize anonymous closure classes as it emits bytecode."

So yes, it supports java 1.7. And yes, it can help on android.

comment 12y ago · link · parent

In Akka you can use typed actors as well: http://doc.akka.io/docs/akka/snapshot/scala/typed-actors.htm...

comment 12y ago · link · parent

You can also use Scala: https://github.com/pkukielka/stronghold-defense

The main problem which you will get with languages like Scala , Clojure and other functional languages on JVM is a lot of garbage generated during the execution. And garbage collector on Android isn't even remotely as effective as standard one. This often forces you to write code which is not really idiomatic and which rather resembles java. That is possible in Scala (I'm not sure about Clojure), but to some extend it defeats whole purpose of using something other than java.

Disclaimer: I'm the author of linked game.

comment 12y ago · link · parent

Maybe they are slower to some extend, but for most cases it won't matter too much. I wrote simple game in scala and it was easy to constantly get 55-60 fps on newer devices: https://github.com/pkukielka/stronghold-defense

That being said I agree that jars are bigger and scala generates much more anonymous classes. Even with ProGuard that could be a problem on Android 2.3 or older. And ProGuard is a bit slow (for my game it was taking 30+ seconds for every build). Also Typesafe doesn't have plans for making scala first class citizen of Android.

So while Android development with scala is certainly possible there are few inconveniences which one should be aware of.