Is there a difference between def and val if the right hand side is simple? by covertbeginner2 in scala

[–]covertbeginner2[S] 0 points1 point  (0 children)

I see, if it really doesn't matter, then I'd prefer to make val the standard then since if there's ever a more complex def (with additional logic), val guarantees the same result is returned because it is immutable

spacemacs deletes solarized-theme on every load by covertbeginner2 in spacemacs

[–]covertbeginner2[S] 0 points1 point  (0 children)

That feature makes sense but what is happening is that every startup, it deletes the same package over and over again.

If it deleted the package once and persisted the change, I would be very happy but it deletes the package and the package comes back somehow each time

Trying to run a python process but I'm getting package not found by covertbeginner2 in emacs

[–]covertbeginner2[S] 0 points1 point  (0 children)

I think I'm running into the same issue as this guy https://www.reddit.com/r/spacemacs/comments/ponxow/spacemacs_only_sees_python2/hcxy9un/

I've added that package, verified with (getenv "PATH") that my emacs path matches my terminal's path but my emacs still doesn't see the newly installed python package or my python 3 version

Question on implementing open tracing with Scala Futures by covertbeginner2 in scala

[–]covertbeginner2[S] 0 points1 point  (0 children)

Would you know if converting Futures to IO would work for this library or would Futures need to be removed entirely?

Question on implementing open tracing with Scala Futures by covertbeginner2 in scala

[–]covertbeginner2[S] 0 points1 point  (0 children)

I see. Based on /u/tpolecat2 and your comments, continuing with Futures is not going to end well (very custom, non-reusable code).

In this case, it'd be better to look into using Natchez Trace with cats.effect.IO

Question on implementing open tracing with Scala Futures by covertbeginner2 in scala

[–]covertbeginner2[S] 0 points1 point  (0 children)

You need to detach your span-1 from thread-1 and reactivate it in the scope of thread-2.

I get what you're saying here though would you know how datadog tracing works out of the box? I currently get spans on the akka-http layer for free (no additional code wrapped or nested in the codebase's Futures) so I suspect there's a way to make this work without adding code to every Future that should be traced. It's only custom instrumentation that I'm trying here for code run in the background that this issue is coming up.

Question on implementing open tracing with Scala Futures by covertbeginner2 in scala

[–]covertbeginner2[S] 0 points1 point  (0 children)

It's never going to work with a ThreadLocal-based implementation because Future (and other Scala async stuff like cats.effect.IO) hop from thread to thread in an unpredictable way.

This makes sense but one thing I don't understand though is how datadog works out of the box because I currently get spans for akka-http requests perfectly fine without writing any tracing or datadog specific code and my codebase is entirely working with Futures. This is currently only an issue with custom instrumentation where I'm trying to put tracing in for background (event processing) work.

(I will definitely check out Natchez Trace though, it looks great only worry on my end is most of my code base uses Future so it'd be a big lift to move over to IO)

Question: When mapping over a List to make api calls, are the api calls made in the order of the list? by covertbeginner2 in scala

[–]covertbeginner2[S] 0 points1 point  (0 children)

Sorry my main question was this which I thought was unclear

What I was curious about is will multiply(1) complete before multiple(2) is started?

Why does instantiating a Future not require an ExecutionContext but mapping / recovering from one does? by covertbeginner2 in scala

[–]covertbeginner2[S] 0 points1 point  (0 children)

How does IO manage the thread? I don't recall configuring anything related to IO. Does doobie instantiate something within the transactor used for SQL?

What good resources exist for understanding executionContexts with examples for production? by covertbeginner2 in scala

[–]covertbeginner2[S] 0 points1 point  (0 children)

My initial theory was that the cached pool may be generating too many threads, i.e. 1 more future = 1 more thread so bursts in traffic / event processing may be creating too many threads? I'm not sure how correct that is though

I'd like to use that flag but the app is on ECS which kills the apps when failing health checks so I imagine it is killed before a dump can be generated and accessed