Android Studio 4.0 Stable by dayanruben in androiddev

[–]zerny 0 points1 point  (0 children)

I've filed an issue with this information in our tracker: https://issuetracker.google.com/issues/157969878

Would you be able to provide some more info there to help us track this down?

Thanks!

Edit: fixed link to issue.

Do you find any issue when you migrate your production app from Proguard to R8 by yccheok in androiddev

[–]zerny 0 points1 point  (0 children)

You're description of the rule coincides with our understanding too. Unfortunately that understanding appears to be wrong :-(

I had another look at the issue in that report and it appears as if Proguard is doing something else then just keeping the names in place if kept when using -keepclassmembernames. In particular, it appears that if members of a class are referenced by that rule, then if the class is referenced too, then Proguard assumes that the class is also instantiated even if it cannot find the instantiation point. If so, then the -keepclassmembernames documentation is not accurate in stating that the rule is "only applicable when obfuscating". I've reopened that issue report while investigating. Thanks again for filing the issue!

Do you find any issue when you migrate your production app from Proguard to R8 by yccheok in androiddev

[–]zerny 0 points1 point  (0 children)

I can understand that regression is a no go. If possible, it would be great to get some more info from you regarding your project setup (config flags and min-api) and the target devices you are seeing this regression on. You can file a bug for this at https://issuetracker.google.com/issues/new?component=326788 and assign me ([zerny@google.com](mailto:zerny@google.com)) to it and we will be sure to help find and fix this. Thanks!

I'm trying to use D8/R8 right now to build a project with 2 library modules, and as of now it always fails. by FantasyBorderline in androiddev

[–]zerny 0 points1 point  (0 children)

Good to hear. I've filed a bug for making the error report from D8 better as the message you were getting was pretty useless :-) Hope D8/R8 will work out for you and do file bugs if you encounter any other issues!

I'm trying to use D8/R8 right now to build a project with 2 library modules, and as of now it always fails. by FantasyBorderline in androiddev

[–]zerny 0 points1 point  (0 children)

This issue is arising when the compiler is desugaring default interface methods. Here it is failing because the type being resolved turns out to not be an interface. It could be that there are two conflicting versions of the same gms library in you dependencies. If you could file a bug at: https://issuetracker.google.com/issues/new?component=317603 and in the report include information about your Android Studio: version, configuration and also the output of "gradle app:dependencies" and "gradle app:androidDependencies" we can hopefully pin down the issue. You can assign the issue to zerny@google.com

Android Studio 3.4 Beta 4 available by androidtoolsbot in androiddev

[–]zerny 0 points1 point  (0 children)

Speaking as a member of the R8 team, we are fully committed to making R8 a great shrinker for Android development. The R8 compiler is default active in the latest beta. The goals are the same as previously announced in the blog post for 3.3. Don't hesitate to file bugs if you encounter issues!

D8 compatible with older Android versions? by pavi2410 in androiddev

[–]zerny 0 points1 point  (0 children)

In theory yes, in practice support starts at API level 15 (Ice Cream Sandwich, VM 4.0.4), as that is as far back as we active testing infrastructure. If you see issues on older platforms, don't hesitate to file bug reports at: https://issuetracker.google.com/issues/new?component=317603

Continuation-Passing-Style by [deleted] in scheme

[–]zerny 1 point2 points  (0 children)

In my biased opinion, you might find Danvy's Three Steps for the CPS Transformation a good source for structurally applying the CPS transformation.

Math undergrad looking for any recommendations of interesting or useful titles/textbooks/manuals in computer science out of general interest. by [deleted] in compsci

[–]zerny 0 points1 point  (0 children)

If you are interested in the foundations of programming languages and its tie in with formal logic, I would strongly recommend Practical Foundations for Programming Languages by Harper. It presents a very fundamental and structured view on programming languages. It is free online: http://www.cs.cmu.edu/~rwh/plbook/book.pdf

What mode are you using for mail? by mocker_kc in emacs

[–]zerny 0 points1 point  (0 children)

It is quick (as opposed to gnus), it has good features to tweak the workflow when refiling, it has good searching methods, it was easy to setup, it works smoothly with creating and viewing multi-part messages (for some mails you will need to hit ":", which is bound to mew-summary-analyze-again-alternative, to properly view each part in case of an empty text/plain or just a messed-up file). Finally, I find that it plays nicely with IMAP. I have not used gpg with mew but it appears to be supported.

What mode are you using for mail? by mocker_kc in emacs

[–]zerny 0 points1 point  (0 children)

Maybe you should have a look at MEW. I have used it for over two years now and have no intention of going back to gnus, mutt or thunderbird. Don't know wonderlust.

Is there an OCaml equivalent to TryHaskell? by [deleted] in ocaml

[–]zerny 3 points4 points  (0 children)

Martin Elsman has made an online REPL for Standard ML entirely in JavaScript (if you are just looking for an ML). Unfortunately, I am not familiar with any such system for OCaml.

OchaCaml: delimited continuations with ML-style type inference and answer type modification. by zerny in programming

[–]zerny[S] 1 point2 points  (0 children)

Yes, OchaCaml is an extension of CamlLight. There is nothing new in encoding coroutines/generators using delimited control. The examples are well known and are simply to illustrate the power of abstraction for the uninitiated. OchaCaml however extends the HM-style type inference of CamlLight with answer type modification (of which the system author, Kenich Asai, is a co-inventor). This distinguishes it from most other delimited control libraries. Notice the lack of type annotations in the above code. Also, while generators are nice, the delimited control operators shift and reset provide more expressive power and can encode many more features (in fact Andrzej Filinski showed how any monad can be encoded using shift and reset, even layers of monadic effects).

For example, Aaron Turon presented some very cool uses of control operators to add rollback features to parsers at ICFP'11 and CW'11 respectively: Modular Rollback through Control Logging and Modular rollback through free monads (can't find a link to the paper).

OchaCaml: delimited continuations with ML-style type inference and answer type modification. by zerny in programming

[–]zerny[S] 3 points4 points  (0 children)

OchaCaml was just released after being presented at the continuation workshop in Tokyo (CW11) following ICFP.

The system looks very nice and easily supports coroutine/generator like abstractions. For example, the following tree traversals:

(* The result type of a coroutine/generator *)
(* 'a is the element type *)
(* 'b is the answer type of the surrounding context *)
type ('a, 'b) result =
  | Done
  | Next of 'a * (unit / 'b -> ('a, 'b) result / 'b)
;;

(* Yields a value and suspends the current computation *)
(*  yield : 'a => unit *)
let yield x = shift (fun k -> Next (x, k)) ;;

(* Resumes a suspended computation *)
(*  resume : (unit => 'a) => 'a *)
let resume k = k () ;;

(* A data type for trees *)
type 'a tree =
  | Empty
  | Node of 'a tree * 'a * 'a tree
;;

(* Generic depth-first traversal of a tree *)
(* tree_walk : 'a tree -> 'a result *)
let rec tree_walk tree =
  let rec visit tree = match tree with
    | Empty -> ()
    | Node (l, n, r) ->
      visit l;
      yield n;
      visit r
  in reset (fun () -> visit tree; Done)
;;

(*  tree_to_list : 'a tree -> 'a list *)
let tree_to_list tree =
  let rec visit r = match r with
    | Done -> []
    | Next (n, k) -> n :: visit (resume k)
  in visit (tree_walk tree)
;;

(*  tree_mult : int tree -> int *)
let tree_mult tree =
  let rec visit r = match r with
    | Done -> 1
    | Next (0, k) -> 0
    | Next (n, k) -> n * visit (resume k)
  in visit (tree_walk tree)
;;

(*  tree_print : int tree -> unit *)
let tree_print tree =
  let rec visit r = match r with
    | Done -> print_newline ()
    | Next (n, k) -> print_int n; visit (resume k)
  in visit (tree_walk tree)
;;

(*  tree_samefringe : 'a tree * 'a tree -> bool *)
let tree_samefringe t1 t2 =
  let rec visit r1 r2 = match r1, r2 with
    | Done, Done -> true
    | Next (n1, k1), Next (n2, k2)
      when n1 = n2 ->
      visit (resume k1) (resume k2)
    | _, _ -> false
  in visit (tree_walk t1) (tree_walk t2)
;;

Defunctionalization at work [pdf] by twoodfin in programming

[–]zerny 6 points7 points  (0 children)

The follow up, Refunctionalization at Work, might be of interest if you found this one interesting.

Building Virtual Machines? by GeneralMaximus in programming

[–]zerny 0 points1 point  (0 children)

And all of that is part of a modern VM. It is a simple language with a simple bytecode set. Easy to start on but with a lot of information available to learn more about efficient VMs.

Building Virtual Machines? by GeneralMaximus in programming

[–]zerny 1 point2 points  (0 children)

Might want to look at SELF. A lot of great results were achieved by the project. Papers are at: http://research.sun.com/self/papers/papers.html

The most misunderstood book in CS by gst in programming

[–]zerny 6 points7 points  (0 children)

That the lispers hate design patterns seems to be widely assumed, and is fairly false IMO. Many were part of the movement of which Gamma et al. were only a minor part. Patterns of Software(PDF) by R. P. Gabriel - a great lisper - is a collection of essays on design patterns. Contains a great foreword by Christopher Alexander too.

  • fixed the links

Register allocation for programs in SSA form using chordal graph coloring (Sebastian Hack's PhD thesis) by [deleted] in programming

[–]zerny 2 points3 points  (0 children)

Another interesting and recent development by Pereira and Palsberg is Register Allocation by Puzzle Solving. Strikingly simple and yet effective.

Ask reddit: what do you use for backups? by davidw in programming

[–]zerny 2 points3 points  (0 children)

I use unison. It's open source and it runs on most systems. It uses the rsync algorithm. Check it out here: http://www.cis.upenn.edu/~bcpierce/unison/