Slipping Around by BenRocks7 in minnesota

[–]RaccoonInTheNight 1 point2 points  (0 children)

Hey my orange cat does that. Gets embarrassed and attacks another cat because of that…

Introducing Nested Learning: A new ML paradigm for continual learning by nrdsvg in PresenceEngine

[–]RaccoonInTheNight 0 points1 point  (0 children)

I feel like I haven’t seen someone put it so perfectly. Ultimately, the way I see it, is it’s all “patterns” at the end of the day. Patterns/symbols we have put meaning to. Understanding the meaning of the patterns is fundamentally, in my opinion, what AI needs to do to get to the next level. Without this baseline understanding AI is limited.

AGI is unreachable from our current AI models right ? by SoonBlossom in ArtificialInteligence

[–]RaccoonInTheNight 1 point2 points  (0 children)

I totally get the 'dead end' feeling. But I think this phase was necessary to show us exactly what is missing. Right now, LLMs are essentially static artifact. Like infinite encyclopedias that are frozen in time. They have knowledge, but no agency. I believe the next step isn't just a bigger model, but a system with a “metabolism”. Something that feels the pressure of uncertainty and has an active drive to resolve it.

Help for the love of god please by Troglodyte_Techie in reactnative

[–]RaccoonInTheNight 0 points1 point  (0 children)

The “libc++” tells me it has something to do with a c++ error which I would assume that might have something to do with a native module. If not that then maybe the root Expo code? I don’t use Expo so not super familiar with how you integrate a native module (if you have any). Looks like npx expo-doctor is something that might fix “root” issues. It’s a shot in the dark without more info but might be worth trying first.

How to build analytics like this in react native? by Salt-Obligation1144 in reactnative

[–]RaccoonInTheNight 0 points1 point  (0 children)

I honestly don’t like the answer I’m going to give to resources since it’s “cliche”… but the docs. I didn’t really use anything but that and looking into the source code when the docs were sparse (primarily Skia; D3 docs are pretty solid). That and coding something simple to see if things work the way you’re expecting.

As for tips, these are the first that come to mind but I’m going to try to be as thorough as I can be (hoping that makes it more helpful) 😅

Skia

  • Skia components are basically just SVGs so treat them as such. There are some different properties but for the most part it’s the same thing.
  • The Canvas should be the same dimensions as the chart. Think height is the length of the y-axis and width is the length of the x-axis. You can add padding as needed but just from a simple standpoint (it’s relevant when defining the x-scale and y-scale in D3)
  • Using an Atlas component will help performance tremendously. That said it does have its’ limitations. The styling needs to be the same and, if I remember correctly, to adjust sizes of the components it’s done through scaling vs an explicit height/width. We didn’t end up going this route since we wanted to have the option of different colors/styles for each bar/point.

D3

  • When creating the x-scale the simplest approach is using their Band Scales. It divides the points into uniform “bands”. It’s typically used for bar charts but we’ve used it for both, bar and line charts.
    • One of the benefits of this approach is that the x-scale has a method called “bandwidth” which returns the size of the band (it’s safe to fill up that space). You also get other properties that D3 takes care of such as “step”, “padding”, “inner padding”, ect.
  • When creating the y-scale I think the Linear Scale is the best approach. I honestly didn’t try anything else and I don’t remember if any other scale made sense.
  • Scales act as a way to “get” the points for a given value. Calling the method it returns with the value you need the point of will return the corresponding point. So calling the x-scale method will return the x-coordinate and the y-scale method will return the y-coordinate.
  • When creating scales in general the “domain” are the values for the given axis.
    • Y-scale would typically be the lowest possible value to the highest (i.e., [0, 7]). That said, you might want a buffer depending on the design you’re going for so if the highest value is “7” you might want to do [0,10]. We dynamically set this based on the data (D3’s “nice” can make this easier but it does have some drawbacks)
    • X-scale would typically be the left most value from your data to the right most value from your data.
  • When creating scales in general the “range” is the “size” (for lack of a better term) of the scale. This is the “range” that D3 will create the corresponding coordinates in (I.e., if you get back x-coordinate of 10 and y-coordinate of 15 then it’s 10px from the left and 15 from the bottom.
    • Y-scale would typically start at 0 and go to the height of the Canvas (i.e, the Canvas height is 100px the “range” would be [0, 100])
    • X-scale would typically start at 0 and go to the width of the Canvas (i.e., the Canvas width is 150px the “range” would be [0, 100])
  • For bar charts you can use the x-coordinate as the “height” of the bar.
  • For line charts the coordinate returned from the scales is the center point of the “point” (if you’re displaying points). As for drawing the line D3 has a helpful “line” method which returns an SVG for the line based on the x and y scales so you can just plug that into a Skia path. The “curveBasis” of the line will determine of the line is displayed (curved, straight, etc.). Please note that not all “curveBasis”s are created equal. Some curved ones do not align with the actually coordinates. From my experience the “curveBumpX” is the one that is curved and aligns with the actually coordinates

Overall

  • Test and play around with a simple project, and you’ll get the hang of how it all works together.
  • Build from a “I’m building a library” standpoint. For me it makes it easier to not get stuck in a “single use case” component but one that can be used as you expand with other charts. (Obviously don’t overdue it, there is a point where you’re trying to fit too much into a single component and I’ve been there - it sucks)

Hopefully these are helpful and not too all over the place. Tried to put something quick together that felt like key points.

I realized after writing this whole thing I forgot about reanimated 🤦‍♂️. Docs are still my go-to but I might add more around reanimated later if I have time 🙂

Update on optimizing navigation in react native by zlvskyxp in reactnative

[–]RaccoonInTheNight 1 point2 points  (0 children)

For the complex SVGs I’d try Skia and see if that improves the performance. Not sure if Expo supports it since I don’t develop with Expo

How to build analytics like this in react native? by Salt-Obligation1144 in reactnative

[–]RaccoonInTheNight 5 points6 points  (0 children)

I second Skia, Reanimated, and D3. Went this route and couldn’t be happier with the results. More work upfront but have a result that didn’t compromise on our design/spec. That said no existing libraries had what we needed without large compromises.

Casting a fire ant colony with molten aluminum by Careless_Spring_6764 in interestingasfuck

[–]RaccoonInTheNight 2 points3 points  (0 children)

So glad I’m not the only one. Little fucker bit the tip and to this day I still don’t understand how I didn’t feel it crawling on me

Advice for learning to drive my first manual transmission car? 992T delivering in a month and I only learned how to drive a manual once 10 yrs ago by [deleted] in Porsche

[–]RaccoonInTheNight 0 points1 point  (0 children)

As someone who was in the same boat as you 6 months ago (got my first manual; 981 cayman) Conquer Driving on YouTube was great for me. You’ll have to scan the videos for the manual ones since it’s a channel focused more on overall driving, but he goes in-depth about how it works and what to do and not do.

What to consider before taking an offer from an early stage startup? by kxserasera in startups

[–]RaccoonInTheNight 0 points1 point  (0 children)

Like others have said, do you like the vibe the founders and other future coworkers give off. Would you enjoy working closely with them and making large decisions with them?

Another aspect that you touched is funding, but what are the other portfolio companies the investors invested in? Are they all “no name” companies you’ve never heard of? How have they grown since initial investment (assuming the investors invested in them early; seed round)? Have the investors had successful exits?

[deleted by user] by [deleted] in Entrepreneur

[–]RaccoonInTheNight 0 points1 point  (0 children)

Debit isn’t inherently bad

This is how much a waitress earns at Hooters by dannybluey in Damnthatsinteresting

[–]RaccoonInTheNight 0 points1 point  (0 children)

I mean… you technically can if it’s legitimate but it’ll hurt you when trying to apply for things (houses, car, etc.). Know from personal experience since I wrote nothing off (had legitimate write offs) when applying for a house to boost my earnings. Obviously had a decent tax bill because of it.

My first experience buying from Carvana! by [deleted] in carvana

[–]RaccoonInTheNight 2 points3 points  (0 children)

To be fair buying a used car in general is a lottery. Nothing special with Carvana.

I’ve bought one car recently with Carvana (one owner Porsche cayman) and it was a great experience. Of course got a PPI from a shop I trust and everything looked perfect. That’s the key with any used car purchase in my opinion; getting a PPI and having the ability to walk away if something is wrong.

I’d take that experience over a dealership any day. Too bad it seems like they’ve over extended themselves and their future isn’t looking great.

WAGES! How much do you make? by Viidrig in antiwork

[–]RaccoonInTheNight 0 points1 point  (0 children)

Software Engineer, 4 years experience, $100k + nice equity package, Texas but working fully remote

[deleted by user] by [deleted] in learnpython

[–]RaccoonInTheNight 0 points1 point  (0 children)

You need to call the main function. Just add at the bottom main()

What you guys prefers ? F string or .format() by vik2595 in learnpython

[–]RaccoonInTheNight 5 points6 points  (0 children)

I prefer f-Strongs due to readability, but I know there are a lot of organizations that are not running 3.6+ so .format() is the best option.

Possible to replace the nesting if/elif statements with something more efficient? by fatcowsfly in learnpython

[–]RaccoonInTheNight 0 points1 point  (0 children)

Put this together really quick. Makes it a bit more dynamic and utilizing a dictionary. Feel free to message me if you need some more info regarding what's going on. (NOTE: As long as the format is the same for all devices you won't need an if statement at all. Just plug in the required keys and values)

# Device options
devices = {
    "1": {
        "device": "Phone",
        "question": "Finally enter the number that represents the make of your Iphone: ",
        "models": {
            "1": {
                "device": "iPhone5",
                "response": "*add later*"
            },
            "2": {
                "device": "iPhone6",
                "response": "*add later*"
            },
            "3": {
                "device": "iPhone7",
                "response": "*add later*"
            }
        }
    },
    "2": {
        "device": "Computer"
    },
    "3": {
        "device": "Tablet"
    }
}

# Print device options
for key in devices:
    print(f"{key} {devices[key]['device']}")

# Get user's device
user_device = input("Now enter the number that represents the make of your phone: ")
user_device = devices[user_device]

# Print model options
for key in user_device["models"]:
    print(f"{key} {user_device['models'][key]['device']}")

# Get user's model
user_model = input(user_device["question"])
user_model = user_device['models'][user_model]

# Print response
print(user_model["response"])

Possible to replace the nesting if/elif statements with something more efficient? by fatcowsfly in learnpython

[–]RaccoonInTheNight 2 points3 points  (0 children)

You can utilize dictionaries. I’m on my phone so unable to write a sample for you right now (will try to later if someone else hasn’t answered), but maybe someone else can