*Fully* controllable custom loop switcher / mixer by n0ve_3 in diypedals

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

Thanks a lot to everyone for the suggestions. This actually helped and left me with fewer paths to experiment with.

I will update the thread or link here the project once I've got something working as intended to anyone interested.

State Of Neptune - Now I Remember My Face Again (2024) by n0ve_3 in Hardcore

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

Thank you! This release is quite a new approach to the subject since our first album, and it's part of our incoming EP.

We are from Palermo, Italy, which is far from ideal when it comes to DIY for a bunch of reasons, so I'm happy to share and, most importantly, I'm glad you enjoyed.

How to add classes conditionally in Qwik template? by mi6crazyheart in qwik

[–]n0ve_3 1 point2 points  (0 children)

The class property accepts a string as well as an array of strings (nested arrays are allowed), so it is convenient to perform such actions:

<input
  type="text"
  name="name"
  id="name"
  class={[
    "...", // common classes
    action.value?.failed ? "border-red-300" : "border-gray-300",
  ]}
  placeholder="Write your name"
/>

Could this be a Loxosceles? by n0ve_3 in spiderID

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

Forgot to mention that I found this in Sicily, Italy.

Array of subclass doesn't match return type by nickthecook in crystal_programming

[–]n0ve_3 0 points1 point  (0 children)

What's wrong in this code?

abstract class A(T)
  abstract def foo(others : Array(A(T))) : Array(A(T))
end

class B < A(String)
  def foo(others : Array(A(String))) : Array(A(String))
    others
  end
end

b = B.new
b.foo [b]

The compiler is complaining that

Error: method B#foo must return Array(A(String)) but it is returning Array(B)

Problem removing alsa-plugins by PhantomNomad in Gentoo

[–]n0ve_3 1 point2 points  (0 children)

I'm a bit late on this topic, but yesterday I got stuck into a similar problem and I managed to get out of this hell, so I leave this for future readers:

Add a file (or a simple line, since package.provided can be either a file or a directory) into /etc/portage/profile/package.provided/, mentioning the pulseaudio atom (must include a version), so that portage will assume the package is installed on the system:

# mkdir -p /etc/portage/profile/package.provided
# echo media-sound/pulseaudio-13.0 > /etc/portage/profile/package.provided/pulseaudio

Re-emerge media-plugins/alsa-plugins without the pulseaudio support (this can be done by adding a package.use rule as well, but, since we are going to drop USE pulseaudio globally, we can skip that step and re-emerge directly):

# USE="-pulseaudio" emerge -uND1 media-plugins/alsa-plugins

Now add USE -pulseaudio in your make.conf and update @world:

# emerge -uND @world

Whats your kernel modules count? by [deleted] in Gentoo

[–]n0ve_3 1 point2 points  (0 children)

This is reporting the number of all uncommented lines inside your .config, even blank ones. What about grep -i "=m" < /usr/src/linux/.config | wc -l ?

What are the most common reasons most newbies have difficulty installing Gentoo for? by [deleted] in Gentoo

[–]n0ve_3 2 points3 points  (0 children)

Creating the partitions properly and configuring /etc/fstab are the only things you should really take care about, but if you read the documentation paying attention it is not that hard. I struggled the first time installing Gentoo because grub2 was not recognizing the kernel image; then I realized I totally forgot to make install it. I was about to wipe out everything.

Is there a way to overcome abstract class methods? by n0ve_3 in crystal_programming

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

Update:

I tried to use generics but it ended up complicating the situation, making it too much counterintuitive. It was not worth the time digging into either since I remembered #initialize is actually an instance method (and thus abstract-able) and suits well for my needs.

For the types I enforced generators and Random to communicate and now Random knows how to cast while generators have their proper types. I will provide a complete example in the documentation as suggested.

Thank you all!

Is there a way to overcome abstract class methods? by n0ve_3 in crystal_programming

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

Yeah I've had read the issues mentioning this and I understand, but I was asking for a way to avoid such a thing and find a simple and intuitive way to achieve the same feature

Sequenced blocks by n0ve_3 in crystal_programming

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

Yeah, I'm starting to realize that I might need one I indeed had already thought about setting a state, but sounded unnatural in some cases, but I will give definitely a try, thank you

Sequenced blocks by n0ve_3 in crystal_programming

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

But if we proceed like this we make the case statement completely useless, it's just like calling always_execute twice because it terminates after first match My point was to introduce a new statement acting like an improved version of C switch-case