HNHacker News
TopNewBestAskShowJobs

mopierotti

267 karma · joined December 3, 2013

submissionscomments
mopierotti··on Show HN: A better way to timeblock your day
As an alternative, I use Sunsama, which also lets you drag tasks directly to your calendar. (I have not tried Taskable)
mopierotti··on How to make any immutable data structure distributed
Aren't those the same things? i.e. 2. are just read-only data structures with functions to create new read-only data structures based on them. (e.g. immutable linked lists that you can filter, concat, etc. with)

Or are you talking about something more specific, like mutable data structures that provide immutable snapshots of the backing data?

mopierotti··on My Favorite Software Subreddits
I've also found this one to be useful. Sometimes this site will give better results than the other and vice-versa. https://subredditstats.com/subreddit-user-overlaps/
mopierotti··on GC progress from JDK 8 to JDK 17
For what it's worth I've had a good experience doing gamedev in Scala using LibGDX. (Though not on consoles, and not pure FP)
mopierotti··on We Are Beast Machines
By that sense, if qualia have no discernible impact on any part of the system, in what sense do they exist?

One can take this thought further. Red vs green light have real physical properties that affect one's subjective experience of them. For example different colors' physical properties change the way that they are perceived in low light conditions, the way they are perceived when placed next to other colors, etc. So at the end of the day even if hypothetically one person's qualia for red is swapped for green, you end up with a green that acts an awful lot like a red for all intents and purposes in the brain.

Edit: So my personal hunch is that qualia can't be meaningfully said to exist.

mopierotti··on Board Gaming in Figma
I've noticed that this approach has its pros, but there's one con I need you to take care of. Con: Figma

Con figma dev environment for me please.

mopierotti··on Facebook-owned sites were down
I'm worried about that person. I doubt Facebook will look kindly on breaking incident news being shared on reddit.
mopierotti··on Java 17 / JDK 17: General Availability
Here's another similar summary, but with code examples and categories.

https://advancedweb.hu/a-categorized-list-of-all-java-and-jv...

mopierotti··on 3D printable cat feeder (2020)
In a similar vein, having fostered 30+ cats, I've found that using a "food tree puzzle" is especially useful. It's a good way to let them have snack and entertain themselves when they feel like it, without letting them potentially binge eat. (This is in addition to wet food as primary meals)
mopierotti··on Guide to cognitive biases
This is my first time seeing this one mentioned, but I'm curious, what makes something a "real" fallacy?

It seems like it's a real mistake that people make. I guess one could categorize it as a more specific case of misunderstanding a distribution of values. (In the same vein as mean vs median, outlier skewing, assuming unimodal vs bimodal distribution, etc.)

mopierotti··on We were promised Strong AI, but instead we got metadata analysis
Some good thoughts here, but I think this is mostly a criticism of classifier models. Things get more complicated when you start considering things like models that do transfer learning, rule inference, time/state awareness, reasoning by analogy, and generally unsupervised learning.
mopierotti··on A categorized list of all Java and JVM features since JDK 8 to 16
> Also, I don't understand how people use the `Optional <ErasedType>`..?

I may be misunderstanding your question, but in general you wouldn't be doing anything type-specific with an Optional's value unless you were in a part of your code that knows the type at compile time. For example, a data structure might return an Optional<T> from a get() method, but all it's doing is returning the T or an empty.

> Besides all references types are already nullable/(optional)... so what's the point?

1. It's nice to explicitly say if a value might not exist than to be unsure if a null object is meaningful.

2. It can force consumers of an Optional to deal with the empty case (versus forgetting to null check)

3. Null might mean something like "this value was accidentally never initialized" versus "I am explicitly indicating an empty value"

4. It can give better developer ergonomics with convenience methods or monadic style (such as with Scala's Option type, where you could .map() on an Option, or merge multiple Options together)

mopierotti··on Fuzz me wrong – How QuickCheck destroyed my favourite theory
However some map-reduce implementations implicitly expect reducers to be commutative, which the author became appropriately suspicious of because of the "typical examples" of map-reduce.

I found this interesting paper on the subject of non-commutative reducers: "Nondeterminism in MapReduce Considered Harmful?" https://www.microsoft.com/en-us/research/wp-content/uploads/...

mopierotti··on Why cats are crazy for catnip
I have fostered roughly 25 cats (one at a time), and what you wrote about communication resonates with me. Most cats seem to develop a sort of pidgin[1] language in collaboration with you to communicate how they feel or what they want. It's different for each cat, but is usually some combination of vocalization tones, body postures/movements, eye contact, or even the location in the house they choose to do those things from.

They can be surprisingly great communicators.

[1] https://en.wikipedia.org/wiki/Pidgin

mopierotti··on Facebook Accused of Watching Instagram Users Through Cameras
Camera start up time actually is quite important in my opinion. For example, I stopped using snapchat primarily because it felt laggy to get the camera open. That really grates on you when an app is mostly used for spontaneous image/video capture.
mopierotti··on DMT drug study investigates the ‘entities’ people meet while tripping
To chime in with my personal experience, I'm also able to see this kind of noise/distortion if I relax a bit and stare at something, although I suspect this is mostly a consequence of the rods/cones on the retina getting fatigued.

When I felt sick as a child I would do this with the pattern on our wallpaper to distract myself from the discomfort. Edit: Or to help myself fall asleep by doing something similar with the "noise" you see when closing your eyes.

mopierotti··on EFF calls out crypto exchange Coinbase on data privacy
To be fair, Coinbase is not a trustless system, though it provides access to trustless systems.
mopierotti··on Show HN: Tweek – Fast to-do weekly calendar app
I'm also a big fan of Sunsama for my day-to-day. The recurring tasks, subtasks, and task backlog are nice additions.
mopierotti··on The Art of Not Thinking
I've also recently started trying to do this: to try to have my conscious mind be in charge of observing/understanding only. It works, but it kind of scares me.

It scares me because it feels similar to the mindset I have when watching a movie. What if I become more interested in the plot than the well-being of the main character?

mopierotti··on Spotify CEO: musicians can no longer release music only “once every 3-4 years”
I might be late to the party, but:

Software can be art in itself. Consider quines [1]. (Programs that, when run, produce themselves) They serve no real world purpose, and I consider them beautiful. Kind of like the restrictive format of a haiku. (Edit: Or perhaps tesselations, e.g. Escher's work [3])

I particularly enjoy what this artist(?) has done with their 128 language uroborus quine. [2]

Edit 2: I expect the objection will be that this is not functional, or a "product", however the uroboros quine does have practical uses. E.g. as a system stress test. If it were marketed as a stress test, its artistic value would still be apparent to a programmer examining its structure.

[1] https://www.nyx.net/~gthompso/quine.htm

[2] https://github.com/mame/quine-relay

[3] http://www.tessellations.org/eschergallery2.shtml

mopierotti··on The Case Against OOP Is Wildly Overstated
After working in the Scala, which blurs the line between FP and OOP, daily for years, I feel like the choice to use OOP or not tends to boil down to how you'd prefer to solve the Expression Problem [1] for your domain. (if you follow the paradigm of "Functional Core, Imperative Shell")

If you're following this paradigm, for all your core objects they:

-Will be immutable, meaning calling methods on them will not change their state. (except for potentially some transparent optimizations, eg in-memory caching)

-Should not have methods that have side effects (i.e. purely functional)

If this is the case, then choosing whether your classes are objects or simple data structs is only a matter of code organization. ie do you want objects to carry around their methods with them, or have those functions live separately.

If you want to share method implementations among objects, you have the option of using inherited methods/types for a more OOP solution, or the typeclass pattern for a more FP solution. (Though the typeclass pattern has significant syntactical baggage in Scala)

[1] https://wiki.c2.com/?ExpressionProblem

mopierotti··on Show HN: Breathe – Peripheral Breath Trainer
Very cool. It would be nice if it was cross-platform, but I understand that that would have been a bit beyond your 5 minute scope. (I use Mac, Windows, and Linux roughly the same amount daily)
mopierotti··on Cryengine Source Code
I agree with the gist of your post, but one positive about single use functions is that you can be explicitly clear about data visibility.

In this contrived example, you can tell that formatting a title is not affected by user preferences, but formatting the body is. (And additionally that formatting a body has no information about the other fields of an entry)

  def formatRssFeedEntries(userSettings: UserSettings, data: List[Entry]) {
    val titles = data.map(entry => formatTitle(entry.title))
    val bodies = data.map(entry => formatBody(entry.body, userSettings))
  ...
  }
mopierotti··on Ask HN: Who wants to be hired? (May 2020)
Location: San Francisco

Remote: Yes

Willing to relocate: Yes, within the Bay Area

Technologies: Scala, PostgreSQL, functional programming, JVM, Play! Framework, web APIs, streaming, and more

Résumé/CV: https://drive.google.com/file/d/19Qalh5BVP7wbGxeI8P0eIpUe5b3...

Email: mopierotti@gmail.com

Experienced full stack engineer. I'm open to a wide variety of domains, but I have a special interest in work involving functional programming and/or ML/AI.

mopierotti··on 3D photographic inpainting from a single source image
It would be interesting to see this applied as a photo viewing app for VR, or applied to videos.
mopierotti··on Making the Tokio scheduler 10x faster
Not OP, but I had to go back and double check that this was true when I saw that the Hyper benchmark at the bottom only used 1 thread. Wouldn't you want to test on multiple?
mopierotti··on New In Postgres 12: Generated Columns
This seems like a cool feature, but would I be correct in thinking that:

1) If you're only using the generated column for filtering/sorting rows, you'd be better off using indexes on expressions? (https://www.postgresql.org/docs/current/indexes-expressional...)

2) Therefore, if you're instead interested in returning the generated columns' values, this feature would be useful in proportion to how expensive the expression you're using is, because you're saving time by precomputing the column rather than computing at query time.

Edit: I can also see the benefit of removing the burden on the person performing the query to have to remember the details of the expression, or in the server case, not having to duplicate the expression across code bases.

mopierotti··on Strong_password Rubygem hijacked
I know this is about ruby, but it's worth noting that this kind of thing would be solved by effect systems, e.g. Haskell's IO type. If IO isn't part of the signature, you know it's cpu only. Furthermore, you can get more specific such as having a DB type to indicate some code only has access to databases rather than the internet as a whole.
mopierotti··on Procrastination is not a time management problem, it is an emotion
You might be interested to know that you can set the date of a commit arbitrarily: https://codewithhugo.com/change-the-date-of-a-git-commit/
mopierotti··on Bye Bye Mongo, Hello Postgres
To add to the pile of responses: in Scala, Slick is great library that lets you compose sql queries and fragments of queries quite effectively. (http://slick.lightbend.com/)

At my company we built a UI on top of Slick that lets users of our web app define complex triggers based on dynamic fields and conditions which are translated to type-safe SQL queries.

← PreviousPage 2 of 3Next →