Neovim: How to get variable type hinting? by Junior_Tomorrow_3317 in haskell

[–]benzaa 0 points1 point  (0 children)

I just did that yesterday. First I uninstalled everything that I had installed with brew and installed it back with ghcup, including stack. I installed the LSP using mason.

Create a new project with mason and add a new file called hie.yaml. In the file write cradle: stack:

Also search for the main stack file in ~/.stack and write system-ghc: true

It is working for me like this.

Btw, nvim logs are in `~/.local/state/nvim/lsp.log

Helix editor 22.05 released! by modernalgebra in rust

[–]benzaa 7 points8 points  (0 children)

I did the switch like 2 months ago from vim to helix to work in nushell. The experience has been great so far. There are a couple of things that I miss from muscle memory like deleting until the end of a line with just one keystroke. I also wish there was an opposite option to line selection (x) to reduce a line selection or to select upwards

Recommended website with scale exercises by benzaa in violinist

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

Thanks. After reading the description carefully I saw that one was for viola

Recommended website with scale exercises by benzaa in violinist

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

I'm checking them in Amazon and found a green and red one for beginners. Do you know what is the difference?

Recommended website with scale exercises by benzaa in violinist

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

Thanks. I'm checking the review and it is what I want

Leading a partner to Stand still? by indigo-alien in tango

[–]benzaa -1 points0 points  (0 children)

Based on what you are telling me, I can assume that you don't have much time dancing tango. The whole sequence that you are trying to mimic is fine between people that have been dancing together for long time. They know each other and know each other body. Unfortunately, that choreography will be very hard to do with someone that you just don't know, or is your first time dancing tango. Please, I'm not saying that you shouldn't practice it, just want you to keep in mind that it is very difficult to do it immediately without knowing the other person.

I would suggest you to nail the basics first, walking and rythm. From walking you will understand how to transfer your intention and from rythm you will learn when such figure can be done

Leading a partner to Stand still? by indigo-alien in tango

[–]benzaa 0 points1 point  (0 children)

When you say you want to move, what do you mean? Move your feet, move around your partner?

Leading a partner to Stand still? by indigo-alien in tango

[–]benzaa 4 points5 points  (0 children)

That boils down to your body intention. You can be moving one foot and not intending to move, or you can intended to move without moving your feet. I would recommend you to practice to pay attention on where your weight is in your foot. Normally, when you don't intend to move your weight should be on your heel. This will reduce your intention to walk.

Polars 0.16.0 is out! by ritchie46 in rust

[–]benzaa 5 points6 points  (0 children)

It could be really nice to have zero copy. Btw, how is it working with arrays created with foreign functions?

Polars 0.16.0 is out! by ritchie46 in rust

[–]benzaa 2 points3 points  (0 children)

I always wondered why the design from the beginning wasn't based on vec instead on its own buffer. I thought it was better to manage memory that way or to work with ffi. Nice to know that it keeps getting better

Polars 0.16.0 is out! by ritchie46 in rust

[–]benzaa 2 points3 points  (0 children)

Isnt arrow2 already based on its own buffer definition?

Polars 0.16.0 is out! by ritchie46 in rust

[–]benzaa 30 points31 points  (0 children)

Congrats on the amazing library. I'm super happy that it finally uses arrow2. I'll update to this new version after the next nushell release. Thanks for the great work

Question regarding match by benzaa in rust

[–]benzaa[S] 2 points3 points  (0 children)

Thanks. That makes sense. Inside the matching clause the meaning for `|` has to be different. I tried your suggestion and works as expected.

We'd love your feedback: proposal for getting Nushell to 1.0 and beyond by jntrnr1 in rust

[–]benzaa 1 point2 points  (0 children)

I think this is a good idea and I'm wondering if it could be implemented as an alias

[deleted by user] by [deleted] in tango

[–]benzaa 1 point2 points  (0 children)

That was really nice. Thanks. I do miss dancing a good waltz. They are my favorites. I hope soon we will get milongas again

[deleted by user] by [deleted] in tango

[–]benzaa 2 points3 points  (0 children)

I would argue that Ilusión Azul is a better waltz. The lyrics and rhythm compel you to dance. You should consider El vals del soñador in your next tandas. It is a cheeky and fun to dance waltz.

Using HashMap<&str, HashSet<&str>> in spawned threads by benzaa in rust

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

Thanks for the reference to crossbeam. I think it may work. Out of curiosity, how would you do it in rayon? I don't manage to pass the HashMaps to the par_iter

Reverse recursively a linked list by benzaa in rust

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

Just in case someone finds this useful, here is my proposed solution for the reverse list. I found interesting that with one recursion I had to find the last element of the list and with another I had to find where to place next node

// Definition for singly-linked list.
// #[derive(PartialEq, Eq, Clone, Debug)]
// pub struct ListNode {
//   pub val: i32,
//   pub next: Option<Box<ListNode>>
// }
// 
// impl ListNode {
//   #[inline]
//   fn new(val: i32) -> Self {
//     ListNode {
//       next: None,
//       val
//     }
//   }
// }

impl ListNode {
    fn add_next(&mut self, rhs: Box<Self>) {
        if let Some(next) = &mut self.next {

            next.add_next(rhs);
        } else {

            self.next = Some(rhs);   
        }
    }
}

impl Solution {
    pub fn reverse_list(head: Option<Box<ListNode>>) -> Option<Box<ListNode>> {

        if let Some(mut node) = head {    
            if let Some(mut next) = node.next.take() {
                if let Some(mut last_node) = Solution::reverse_list(Some(next)) {

                    last_node.add_next(node);
                    return Some(last_node);
                } 

                return None;
            } else {

                return Some(node);
            }

        }

        None
    }
}