jim

joined 1 year ago
[–] [email protected] 19 points 5 months ago

Yes it can be an issue because the GPS doesn't know where you are and thinks you are on an aboveground street. Freeway tunnels can have multiple exits too.

[–] [email protected] 4 points 7 months ago (1 children)

I disagree. I think the default option should be what users expect, and users expect "copy" to do exactly that: copy without modifying the text.

[–] [email protected] 7 points 7 months ago (9 children)

While it would be ideal to have all datetime fields in databases and other data stores be time zone aware, that is certainly not the case. Also, SQLite (and probably others) do not have great support for time zones and it's recommended to store datetimes as UTC (typically unix timestamps).

Deprecating utcnow was a good idea, but they should have replaced it with naive_utcnow. Oh well.

[–] [email protected] 10 points 9 months ago (2 children)

I've turned off the bot for now.

[–] [email protected] 9 points 10 months ago

The first way to use it is with any type annotation: you just use it for documentation.

# int annotation
def add_1_to_number(x: int) -> int:
    return x + 1

# callable annotation
def printer(x: int, func: Callable[[int], int]) -> None:
    results = func(x)
    print(f"Your results: {results}")

These type annotations can help document and make editors parse your code to make suggestions/auto-complete work better.

The second way to use it is by creating a callable. A callable is an abstract base class that requires you to implement the __call__ method. Your new callable can be called like any function.

class Greeter(Callable):

    def __init__(self, greeting: str):
        self.greeting = greeting

    def __call__(self, name: str):
        print(f"{self.greeting}, {name}")


say_hello = Greeter("Hello") # say_hello looks like a function
say_hello("jim")  # Hello, jim
[–] [email protected] 4 points 10 months ago (3 children)

This and the last episode were kind of weak, to be honest. I think both of them could have been combined. The pacing was a bit too slow compared to the rest of the season.

 

Here's a hypothetical scenario at a company: We have 2 repos that builds and deploys code as tools and libraries for other apps at the company. Let's call this lib1 and lib2.

There's a third repo, let's call it app, that is application code that depends on lib1 and lib2.

The hard part right now is keeping track of which version of lib1 and lib2 are packaged for app at any point in time.

I'd like to know at a glance, say 1 month ago, what versions of app is deployed and what version of lib1 and lib2 they were using. Ideally, I'm looking for a software solution that would be agnostic to any CI/CD build system, and doubly ideally, an open source one. Maybe a simple web service you call with some metadata, and it displays it in a nice UI.

Right now, we accomplish this by looking at logs, git commit history, and stick things together. I know I can build a custom solution pretty easily, but I'm looking for something more out-of-the-box.

[–] [email protected] 4 points 11 months ago

Hah that last page was great. Loved how easy they gave up helping the baka couple.

[–] [email protected] 2 points 11 months ago (1 children)

I've said this before to other people, but over time, those tools eventually became what Airflow and other orchestration tools are: defining DAGs and running scripts.

When I was using SSIS, eventually, every task was a C# or PowerShell executor instead of using the built-in functionality. So glad for Airflow and other modern tools today.

[–] [email protected] 2 points 11 months ago (1 children)

Haha what a lovely chapter. Kind of fluff, but out of nowhere. I wonder what's going to happen at graduation? Will the series end?

[–] [email protected] 2 points 11 months ago

I'm shocked.

[–] [email protected] 4 points 11 months ago

Yep, this is the convention. Unfortunately, I've never been able to enforce it. Encouraging good git commit messages is probably the bottom of the things I can coach. I'd be happy if commits were properly squashed/rebased and that we all followed the same PR merge strategy.

[–] [email protected] 2 points 11 months ago

Fairly substantial price increase. I will admit a major draw of this small truck was the affordability. I think some trims are up as much as $2k. Wonder what kind of effect this will have on demand and the order banks.

I mean, these trucks were on back order for a long time, which suggests that demand was way higher than supply. Yes, affordability was a major draw, but I'm not at all surprised at the price hikes here.

I'm hoping other manufacturers see this and come out with their own compact trucks. There are rumors Toyota is working on one, for instance.

 
 

One of the coolest projects I've seen: a lisp that is embedded into Python. Hy compiles to Python AST so it's (almost) fully interoperable with Python (some notes about it here).

 

Trying to make web applications federated is a popular effort. Examples include things like the “fediverse”, as well as various other efforts, like attempts to make distributed software forges, and so on. However, all of these efforts suffer from a problem which is fundamental in building federated applications built on top of the web platform.

The problem is fundamentally this: when building an application on top of the web platform, an HTTP URL inherently couples an application and a resource.

 

So it's been about a week since I turned on the discussion bot, /u/[email protected] (Mahoro-chan). This bot is a (lazy) fork off of AutoShonenpon, in which I hacked in a connection to Lemmy instead of Reddit.

Anyway, I'd like to get some feedback from the community.

  • Any bugs? Missing titles? Titles I should remove?
  • What do you think about the frequency of posts?
  • Feature requests?
  • Any other feedback?

(side note: since yesterday, federation has been painfully slow from my instance so it might take me a while to respond to messages)

5
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 

The sidebar for our instance has a broken link for programming.dev - it links to https://programming.dev/programming.dev

 

It was a great app! Been a user for as long as I remember using reddit on my phone.

Thanks @[email protected] I appreciate all your hard work over the years.

 

A series that I recently adore even though it's an overused okaku+gyaru trope.

Thanks to the TL!

view more: next ›