profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/anildigital/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Anil Wadghule anildigital Erlang Solutions (@esl) Pune, India https://anilwadghule.com

anildigital/codesnippets 3

my random codes

anildigital/digitalcodes-org 3

digitalcodes.org website

anildigital/doesfollow 3

A simple gem to show does follow status of Twitter users.

anildigital/cheatsweets 2

It's just sweet

anildigital/2018.scalamatsuri.org 0

ScalaMatsuri 2018 のウェブサイト http://2018.scalamatsuri.org

anildigital/advanced_elixir 0

Advanced Elixir

anildigital/akka-examples 0

Akka Examples

startedeveningkid/denodb

started time in 2 hours

startednvm-sh/nvm

started time in 2 hours

created repositoryankane/pgvector-node

pgvector support for Node.js

created time in 2 hours

issue commentelixir-nx/livebook

Allow ENTER on input to Reevaluate

Note that this feature depends on the foundation of #319 anyway, because we need to track which inputs need to be reevalauted.

paulo-ferraz-oliveira

comment created time in 5 hours

issue commentelixir-nx/livebook

Allow ENTER on input to Reevaluate

I think we can support enter none the less for single line inputs and perhaps Cmd+Enter for text areas. That's common to most forms.

paulo-ferraz-oliveira

comment created time in 5 hours

Pull request review commentelixir-nx/livebook

Show the evaluation time next to the cell indicator

 defmodule LivebookWeb.SessionLive.CellComponent do        <%= if @cell_view.type == :elixir do %>         <div class="absolute bottom-2 right-2">-          <%= render_cell_status(@cell_view.validity_status, @cell_view.evaluation_status) %>+          <%= render_cell_status(@cell_view, @cell_view.evaluation_status) %>

Ah, I think we should pass the evaluation_time_ms as the third argument, rather than the whole @cell_view, so that LV doesn't need to re-render this part when an irrelevant part of @cell_view changes.

shavit

comment created time in 5 hours

issue commentelixir-nx/livebook

Allow ENTER on input to Reevaluate

I think "as we type" inputs would itself address this, as the user won't need any additional action. As for Enter, it's specific to single line inputs, and could be confusing once we add textarea, but that's something we can consider yeah. As for blur, the more I think about blur the less intuitive this feels and we may as well press reevaluate, because we already have to click somewhere outside the input

paulo-ferraz-oliveira

comment created time in 5 hours

issue commentelixir-nx/livebook

Allow ENTER on input to Reevaluate

I actually like this a lot. @jonatanklosko maybe this can be a good alternative to "as we type" reactive inputs... if we have this, it may be fine to have reactive inputs only on blur?

paulo-ferraz-oliveira

comment created time in 7 hours

issue openedelixir-nx/livebook

Allow ENTER on input to Reevaluate

Environment

  • Elixir & Erlang/OTP versions (elixir --version): Elixir 1.12 on Erlang 24.0.2
  • Operating system: macOS
  • How have you started Livebook (mix phx.server, livebook CLI, Docker, etc): livebook server
  • Livebook version (use git show if running with mix): 0.1.2
  • Browsers that reproduce this bug (the more the merrier): Chrome

Current behavior

(not a bug but potential UX improvement) When I press ENTER on an input field nothing happens.

Expected behavior

When I press ENTER on an input field, the associated + Elixir bit would re-evaluate. (think of a person so lazy, they try to use the mouse/trackpad/whateverpad as little as possible).

created time in 7 hours

issue closedelixir-lang/elixir

Error Message Lies

Environment

  • Elixir & Erlang/OTP versions (elixir --version):
Erlang/OTP 24 [erts-12.0.2] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit]

Elixir 1.12.1 (compiled with Erlang/OTP 22)
  • Operating system: macOS Big Sur 11.2.3

Current behavior

iex(1)> String.to_existing_atom("valid_utf8")
** (ArgumentError) errors were found at the given arguments:

  * 1st argument: invalid UTF8 encoding

    :erlang.binary_to_existing_atom("valid_utf8", :utf8)

The error is a lie. It's valid UTF-8, it just doesn't exist as an atom.

Expected behavior

It would be great if it could tell us the atom doesn't exist. If that's not possible though, we should at least stop giving an incorrect reason.

closed time in 7 hours

JEG2

issue commentelixir-lang/elixir

Error Message Lies

Precisely, thanks @thiamsantos and @JEG2!

JEG2

comment created time in 7 hours

issue commentelixir-lang/elixir

Error Message Lies

I think it is the same error reported at https://github.com/elixir-lang/elixir/issues/11014. It seems to be already fixed in OTP https://github.com/erlang/otp/commit/c1942e39d44d50bb4bdf8e22456f31ee23931fdb.

JEG2

comment created time in 7 hours

issue openedelixir-lang/elixir

Error Message Lies

Environment

  • Elixir & Erlang/OTP versions (elixir --version):
Erlang/OTP 24 [erts-12.0.2] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit]

Elixir 1.12.1 (compiled with Erlang/OTP 22)
  • Operating system: macOS Big Sur 11.2.3

Current behavior

iex(1)> String.to_existing_atom("valid_utf8")
** (ArgumentError) errors were found at the given arguments:

  * 1st argument: invalid UTF8 encoding

    :erlang.binary_to_existing_atom("valid_utf8", :utf8)

The error is a lie. It's valid UTF-8, it just doesn't exist as an atom.

Expected behavior

It would be great if it could tell us the atom doesn't exist. If that's not possible though, we should at least stop giving an incorrect reason.

created time in 8 hours

delete branch elixir-nx/livebook

delete branch : jk-no-busy-wait

delete time in 8 hours

issue closedelixir-nx/livebook

Disable busy waiting on assembled releases

Call mix release.init and configure the vm.args file.

closed time in 8 hours

josevalim

push eventelixir-nx/livebook

Jonatan Kłosko

commit sha 8ed2cda808d1cfca7a574346cb498a9e14b76658

Disable busy waiting in release (#370)

view details

push time in 8 hours

PR merged elixir-nx/livebook

Disable busy waiting in release

Closes #368.

In the container:

/data # cat /app/releases/0.2.0/vm.args 
# Disable busy waiting, so that we don't waste
# resources when running in the cloud
+sbwt none +sbwtdcpu none +sbwtdio none
+4 -0

0 comment

2 changed files

jonatanklosko

pr closed time in 8 hours

issue openedandreschaffer/event-sourcing-cqrs-examples

Race between & Ordering of the events

Hi André. Thanks for sharing this wonderful example.

I wanted to ask your opinion on one thing.

https://github.com/andreschaffer/event-sourcing-cqrs-examples/blob/1b47ccb25791213ba0a4195d7443f59b663bd0e8/src/main/java/bankservice/service/account/AccountService.java#L70-L73

This stores the event first in the event store (which I assume is the single source of truth), and publish the event through the event bus. But if you try to scale and there are multiple instances of the application (assume now we have an external event store and and external event bus, say mongodb and kafka perhaps) each trying to store and then publish events, would that not mess up the ordering of the events?

For example say there is a race between AccountDepositedEvent D and AccountWithdrawnEvent W. What could happen is that in the event store you have D stored before W, but have D published after W through the event bus. Then application states restored through replaying event processing would not be the same as the original.

What would be your approach to solve this problem?

created time in 9 hours

PR opened elixir-nx/livebook

Disable busy waiting in release

Closes #368.

In the container:

/data # cat /app/releases/0.2.0/vm.args 
# Disable busy waiting, so that we don't waste
# resources when running in the cloud
+sbwt none +sbwtdcpu none +sbwtdio none
+4 -0

0 comment

2 changed files

pr created time in 9 hours

create barnchelixir-nx/livebook

branch : jk-no-busy-wait

created branch time in 9 hours

fork kianmeng/elixir-geohash

Geohash encode/decode for Elixir

fork in 9 hours

pull request commentelixir-nx/livebook

Show the evaluation time next to the cell indicator

I believe a number of test would fail after changing the response format, looking for{:evaluation_response should be enough to find all the relevant places :)

shavit

comment created time in 9 hours

Pull request review commentelixir-nx/livebook

Show the evaluation time next to the cell indicator

 defmodule LivebookWeb.SessionLive.CellComponent do       text: text,       circle_class: circle_class,       animated_circle_class: Keyword.get(opts, :animated_circle_class),-      change_indicator: Keyword.get(opts, :change_indicator, false)+      change_indicator: Keyword.get(opts, :change_indicator, false),+      evaluation_time_ms: Keyword.get(opts, :evaluation_time_ms)     }      ~L"""-    <div class="flex items-center space-x-1">-      <div class="flex text-xs text-gray-400">-        <%= @text %>-        <%= if @change_indicator do %>-          <span data-element="change-indicator">*</span>-        <% end %>+    <div class="tooltip bottom distant-medium" aria-label="<%= evaluated_label(@evaluation_time_ms) %>">+      <div class="flex items-center space-x-1">+        <div class="flex text-xs text-gray-400 space-x-1">+          <%= @text %>+          <%= if @change_indicator do %>+            <span data-element="change-indicator">*</span>+          <% end %>+        </div>+        <span class="flex relative h-3 w-3">+          <%= if @animated_circle_class do %>+            <span class="animate-ping absolute inline-flex h-3 w-3 rounded-full <%= @animated_circle_class %> opacity-75"></span>+          <% end %>+          <span class="relative inline-flex rounded-full h-3 w-3 <%= @circle_class %>"></span>+        </span>       </div>-      <span class="flex relative h-3 w-3">-        <%= if @animated_circle_class do %>-          <span class="animate-ping absolute inline-flex h-3 w-3 rounded-full <%= @animated_circle_class %> opacity-75"></span>-        <% end %>-        <span class="relative inline-flex rounded-full h-3 w-3 <%= @circle_class %>"></span>-      </span>     </div>     """   end++  defp evaluated_label(time_ms) when is_integer(time_ms) do+    evaluation_time =+      if time_ms > 100 do+        seconds = time_ms |> Kernel./(1000) |> Float.floor(1)+        # {seconds}s"
        "#{seconds}s"
shavit

comment created time in 9 hours

Pull request review commentelixir-nx/livebook

Show the evaluation time next to the cell indicator

 defmodule Livebook.Session.Data do     end   end -  def apply_operation(data, {:add_cell_evaluation_response, _client_pid, id, output}) do+  def apply_operation(data, {:add_cell_evaluation_response, _client_pid, id, output, metadata}) do     with {:ok, cell, section} <- Notebook.fetch_cell_and_section(data.notebook, id),          :evaluating <- data.cell_infos[cell.id].evaluation_status do       data       |> with_actions()       |> add_cell_evaluation_response(cell, output)       |> finish_cell_evaluation(cell, section)+      |> add_cell_evaluation_time(cell, metadata.evaluation_time_ms)

I'd set the time in finish_cell_evaluation, as that's the directly related action operation :)

shavit

comment created time in 9 hours

issue commentelixir-nx/livebook

Clicking on *.livemd file in file browser should open the notebook

That's not how the JS event works, unless we want to implement our own double click.

that’s enough to abort mission for me :)

wojtekmach

comment created time in 9 hours

issue closedelixir-nx/livebook

Clicking on *.livemd file in file browser should open the notebook

Environment

  • How have you started Livebook (mix phx.server, livebook CLI, Docker, etc): mix phx.server
  • Livebook version (use git show if running with mix): master

Current behavior

Currently it requires two clicks: first on the filename itself, and second on "Open":

image

The benefit of the current design is we have ability to "Fork" the notebook here, but given we have such capability from the notebook itself too:

image

I'd consider removing the intermediate step from the file browser.

closed time in 9 hours

wojtekmach

issue commentelixir-nx/livebook

Clicking on *.livemd file in file browser should open the notebook

The filesystem browser shows files that cannot be opened in a "greyed" out format, that makes it clear they can't be clicked/selected. Could that help?

The point is that they can be clicked to select the file and we shouldn't discourage this with a disabled-like color.

And if we double-click something, the regular click should not activate, yet.

That's not how the JS event works, unless we want to implement our own double click.

dblclick fires after two click events (and by extension, after two pairs of mousedown and mouseup events).

wojtekmach

comment created time in 9 hours

issue commentelixir-nx/livebook

Clicking on *.livemd file in file browser should open the notebook

Yeah, that's a good point. The filesystem browser shows files that cannot be opened in a "greyed" out format, that makes it clear they can't be clicked/selected. Could that help?

And if we double-click something, the regular click should not activate, yet.

wojtekmach

comment created time in 10 hours

issue commentelixir-nx/livebook

Clicking on *.livemd file in file browser should open the notebook

Hmm, actually in our case we would need to only make the matching files double clickable, which doesn't feel consistent, at may actually give user the impression that they can double click anything:

https://user-images.githubusercontent.com/17034772/122575639-3ed4e480-d051-11eb-9ebb-131a2baa2a9e.mp4

wojtekmach

comment created time in 10 hours

push eventelixir-nx/livebook

jonatanklosko

commit sha 2088a0fc252df5e5d69d4ed71855f20416bed337

Update assets

view details

push time in 10 hours