Hacker News new | past | comments | ask | show | jobs | submit | akashakya's comments login

I did something similar a few years back. I find the Hilbert curve pattern much more interesting.

https://github.com/akash-akya/hilbert-montage

Not an original idea, it was inspired by someone else at that time.


Interesting: at first blush, it looks like it's clustered based on image similarity rather than time?

But that must be wrong, the README.md mentions it visualizing time.

I'd love to understand a bit more.

The README.md punts to Wikipedia on Hilbert curves, which is classic Wikipedia, makes sense if you understand it already :) and a 20 minute video on Hilbert curves, which I find hard to commit to, assuming its unlikely it touches on movie visualization via Hilbert curves.

It's definitely hard, and not your responsibility, to explain the scientific concept.

But, I'd love to have your understanding of how the visualization is more interesting.


A Hilbert curve is a mapping between 1D and 2D space that attempts to preserve locality. Two points that are close in 2D space tend to map to two points that are close in 1D space and vice versa.


Tl;dr fancy way to map 1D time to 2D image

If you imagine a movie as a line along the time axis with each frame as a pixel, there are multiple way to create an 2D image.

Bargraph is simple approach, but essentially it is still is a one dimensional. We are only using x axis.

Zig-zag pattern is another approach, where you start from top to bottom, left to right. But in this case the relative distance between close frames aren't fully preserved. Two distant frames might appear together, or close frames might end up far apart, which leads to odd looking artifacts.

Hilbert curve is a pattern to map 1D to fill space (2D) such that relative distance between any two points (frames) on the 1D line is somewhat preserved. That's why it appears as clump/blob.

Here it is hard to see the movie progression from start to end but all frames from a scene are always closer, which was what I was aiming. I find it interesting that visual aspect (color/scene) is easy to see here but temporal aspect isn't.

I was excited about the whole 1D to 2D mapping aspect at that time, leading to this toy.


Another good example of hilbert curves as visualization is this online bin file analyzer:

https://binvis.io/#/view/examples/elf-Linux-ARMv7-ls.bin


Nice project and thanks for all your work maintaining vix!


I read the same book, also in Kannada. It was bought by my father when he was in high school. Of all the science books I have read, this one was more engaging and had a bigger impact on me growing up.

My father said he used to buy lot of soviet translations because they were cheap but the content was of high quality. Even after 30 years, when I picked them up, they were clearly distinct, including the Art, print quality and binding.


  Location: Bengaluru, India
  Remote: Yes
  Willing to relocate: Yes
  Technologies: Elixir & OTP, JS, Ruby, C/C++, Java, Lisp, Kafka, Kubernetes, Redis, React, SQL
  Résumé/CV: https://docs.google.com/document/d/1VZfV7HaVw1P_EQscJUli6Ot0BW8k3GsoxgQS5fK5SCQ/edit
  Email: akashh246 [_at_] gmail [_dot_] com
Software Engineer with 6+ years of experience. Currently working with a large scale distributed system involving Elixir. Worked on distributed job scheduler, event driven system, and RESTful microservices. I have experience architecting a product from ground up, leading a team for a while, working as an individual contributor and as a consultant. I am active in the Open Source community, contributing and maintaining a few projects.

GitHub: https://github.com/akash-akya


  Location: Bengaluru, India
  Remote: Yes
  Willing to relocate: Yes
  Technologies: Elixir & OTP, JS, Ruby, C/C++, Java, Lisp, Kafka, Kubernetes, Redis, React, SQL
  Résumé/CV: on request
  Email: akashh246 [_at_] gmail [_dot_] com
Software Engineer with 6+ years of experience. Currently working on a large scale distributed system involving Elixir. Worked on distributed job scheduler, event driven system, and RESTful microservices. I have experience architecting a product from ground up, leading a team, worked as an individual contributor and as a consultant. Outside work, I am active in the Open Source community, contributing and maintaining several projects.

I am looking for challenging roles involving complex problem/domain

GitHub: https://github.com/akash-akya


I don't know much about WASM, but how does this work with shared libraries? Is it even possible to call a shared library without any safety guarantees?


WASM runs in a sandbox, it's not possible to call a shared library directly in the same way as you do in C... all sys calls are "imported" functions that a host exposes to the WASM code running... this host has the ability to do anything around a sys call, which is likely how they manage to forbid access to network/filesystem for example.

The host can be the browser when running on the browser, or it can be one of the WASM runtimes (wasmtime, wasmer, Lucet)


> Streams, available in 5+ can handle a lot more use cases fluently

Stream does solve the backup queue issue, but not being able to filter messages from the consumer's pending list makes implementing retry mechanism and exponential backoff hard (without reaching to sorted set).

Though, I can understand the Redis team's decision to keep it simple.


> one can increment a single value outside the bloom filter to keep the values in the bloom filter low. Example: Instead of storing bloom filter [4,3,3,5,7,4,3,3,5], one could store it as (3)[1,0,0,2,4,1,0,0,2].

CMIIW, This only works if it's guaranteed that the reset (transition from high values to low) is propagated to all the nodes. Which is not the case in a distributed system. Like, if a node is not reachable for a long time and every other node is reset except this one then its possible to have a state in which we can have false negatives.


They're equivalent representations of the same value. There's no need to propagate anything to anyone.


Ahh. You are right. I misread the (3)[....] notation. Its not reset but just different representation.


By that logic anything which kills mass population is "not so bad". Why not just bomb cities. Infact if you read it as a response to "world wars", though not intended, that way of thinking justify that.


It depends on your view of the world I guess. In my view, humans are not special. We have no inherent right to live on this planet compared to other animals. Why should we not die off and let other creatures live? Only selfishness (and our cognitive ability to have it), enables; I want to live. Humans are not special (except for currently being at the top of the food-chain). We have reached our biological population limit. And it needs to go down. And even if it goes to zero, the universe won't care. We are just another species and we are about to go extinct, like so many before us. Unless drastic measures are taken. But the only ones who will care are still us, the humans. Maybe we just shouldn't, and die out and let some other, better suited, organism take over. Or none at all. In the end it doesn't actually matter...


Humans are actually special. We are smarter than any other animal on earth and have culture. Human brain is the most complex structure in the known universe, so even on that scale we are pretty special.

And it simply makes no sense to just throw away millions of years of evolution. Your nihilistic worldview is very naive.


Nihilistic it may be. But please don't equate nihilism and nativity.

"And it simply makes no sense to just throw away millions of years of evolution" - Why not?


To put it bluntly, because the road constant progress and improvement can potentially unveil the meaning of existence of the universe. Nihilism is naive by definition, just because you don't know the meaning, doesn't mean that there is no meaning at all.


That depends on the usecase. Sometimes you do want to start with clean state. If the process is in some invalid state which caused the crash in the first place, restarting the process is useless in this case


Multiple-cursor is useful when you want to edit lines which have non-trivial edits or doesn't have a common string to use find-replace. simple example

   foo_bar -> fooBar
   bar_baz -> barBaz
Sometimes even this doesn't cut it and have to use mighty Emacs macros. (I'm sure something similar exits for VIM)


Vim has macros[1] and other replay tools for occasions like that.

I think the issue with Vim isn't so much that things can't be done in it but more that the discoverability of Vim features is pretty poor. eg by the time you've searched the web for a quick way to do a multiline edit, you could have just done it manually. GUI IDEs tend to be better for discoverability (generally speaking).

[1]https://www.tutorialspoint.com/vim/vim_macros.htm


Agreed, I think of macro as a superset of multiple-cursors. Heck, with macro you can even run arbitrary code to generate text dynamically. I had the pleasure of doing this multiple times.

In Emacs, you can use multiple registers for storing code and data for this purpose


Sure but does it really happen that often, whenever there are regularities usually there's some variation that makes it useless.

Don't get me wrong, I don't mind the feature, thing is I run in it so rarely so I don't get why it would be a major sellingpoint. For example this project and perhaps more notably sublime (an editor that I do enjoy quite a bit!)


Assuming the '_' characters are on the same column for all lines then vim's block visual is quite adequate for the task. If it's not the case then I don't know how multiple-cursor will help, you still need some kind of regex to put the cursors at the right places, don't you?


ah, that was a bad example for so many reasons. slightly better example

  foo_bar -> fooBar()
  baz_car -> bazCar()
  some_thing -> someThing()
An even better example is doing the reverse

  fooBar() -> foo_bar
  bazCar() -> baz_car
  someThing() -> some_thing
You can put cursors at every line and then use subword movement to find the word boundary.

> you still need some kind of regex to put the cursors at the right places, don't you?

I didn't say it replaces regex. You need regex just to place the cursors. you don't have to write complex regexp edit text (as shown in this example)


please correct me if I'm wrong, but wouldn't

:'<,'>s/_b/B/

work in this case?


It might work if you want to fiddle with a regex for several minutes, so I'd prefer to just select a bunch of lines do the change directly


With multiple cursors you are seeing the changes as you are editing. and you have all of the normal editing shortcuts at your disposal. Example, if you made a mistake while typing just hit undo.


I would rather add the c option in cases where I'm not 100% sure what I'm doing.

So in this case :'<,'>s/_b/B/c

That let's you step through every change and if something's wrong you can press ESC and u to undo only the last change.

It depends on the actual problem of course, but multicursor edits also get unwieldy if you're editing more than 2 or 3 lines.

What about if the lines are beyond the visible screen?


Yes, no silver bullet. But most of my use case I find a generic pattern so I don't check the individual edits. Anything more complex I'll switch to macros.

Btw, I meant undo like global undo which will let you undo the last keypress for all of the cursors. In your case, you meant undo for a particular instance of change I guess.

Also, let's say there is different character after _

  foo_bar -> fooBar
  baz_car -> bazCar
  some_thing -> someThing 
Maybe you can do this with regex. but for a new user, he has to look it up. With multiple-cursors, you don't even have to think about it.

However, you can use a macro.


it's more keystrokes (and more complicated ones) than just doing cursor editing, and you have to think of every replacements in advance while with the multi cursor if you have five others replacements to make in the same line you can just make them easily one after the other


qqf_x~q Now you can @q to your heart's content.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: