Readit News logoReadit News
afraca commented on A visual demo of Ruby's lazy enumerator   joyofrails.com/articles/s... · Posted by u/rossta
afraca · a year ago
When I learned Haskell in college I was blown away by how laziness enables cool things like dealing with infinite lists or more performance even though the UX is exactly the same. (Apparently with Ruby there is the slight hint of adding the lazy method in between)

Later I found out laziness in the whole system by default leads to some difficult issues, which quite a few people seem to agree with. Simon Peyton Jones (Haskell co-creator) apparently has said "The next Haskell will be strict". (https://news.ycombinator.com/item?id=14011943)

afraca commented on Why I love Laravel (2022)   ben.page/laravel... · Posted by u/bdlowery
afraca · 2 years ago
I have about 7 years of professional Laravel experience. I think it's quite slick! There is one aspect I haven't seen mentioned here that frustrates me: the community is quite eager to make new shiny things and forget about existing things. I feel the core framework doesn't get a lot of love anymore, and the same for some other packages. Something like Homestead got introduced as a huge thing, but got relatively quickly replaced with Sail and Valet it kind of seems. (Yes, they have a bit different corners, but I would say it doesn't justify a complete package) For authentication you have multiple packages that were introduced as the holy grail but now sit in an awkward spot with each other, and similar for frontend things packages.

Another small frustration for me is all the huge adjectives being used: - "Laravel Horizon provides a beautiful dashboard ... "

  - "Laravel Jetstream is a beautifully designed application... "

  - "Laravel Octane supercharges your application's performance..."

  - "Laravel Prompts is a PHP package for adding beautiful and user-friendly forms  ... "

  - "Laravel Reverb brings blazing-fast and scalable real-time WebSocket ..."

  - "Laravel Sanctum provides a featherweight authentication system ... "

  - "Laravel Telescope makes a wonderful companion ..."

  - "In other words, Valet is a blazing fast Laravel development environment ..."
I think it would we wise to do a bit of a cleanup and merging of official packages, and to not forget about the core framework. I think Symfony shows you can still do great additions even after many years like Targeted Value Resolvers [0]

You can see all the official packages clicking the "Ecosystem" button in the header of laravel.com

[0] https://symfony.com/blog/new-in-symfony-6-3-targeted-value-r...

afraca commented on Doom Running on a Toothbrush   twitter.com/atc1441/statu... · Posted by u/jonbraun
art0rz · 2 years ago
For those without a Twitter account confused by its hostile UI, here is a link to the video https://twitter.com/atc1441/status/1762969015197053110
afraca · 2 years ago
I'm wondering: IS there a way to get to that video from the linked tweet without being logged in? I could not figure it out.

Thank you for your service of providing the video.

afraca commented on How many IP addresses can a DNS query return? (2015)   ethanheilman.com/x/21/ind... · Posted by u/EthanHeilman
afraca · 2 years ago
Maybe it's the monday morning blues (can't seem to think), but how does this work for DOH/DOT?
afraca commented on Making Rust binaries smaller by default   kobzol.github.io/rust/car... · Posted by u/todsacerdoti
kobzol · 2 years ago
I have implemented the fix and got it approved in the span of about 3 weeks (and that was over the Christmas!). Doesn't seem that bad to me, given that it's a change that will affect pretty much any Rust user by default.
afraca · 2 years ago
I was curious about how an implementation for this would work and browsed the PR. Cool stuff, thanks for putting the effort in!

I noticed a very tiny typo which doesn't affect behaviour I think. https://github.com/rust-lang/cargo/pull/13257/files#r1464506...

afraca commented on YouTube tests blocking videos unless you disable ad blockers   bleepingcomputer.com/news... · Posted by u/jacooper
KomoD · 3 years ago
If you don't pay with a card then what would you pay with?
afraca · 3 years ago
In Europe there are a few options which let you pay with your bank account without a credit card. I tried to look up all the things Wise supports, found part of the list:

Trustly, Sofort, IDEAL

IDEAL is huge in the Netherlands for example.

afraca commented on Keep stuff linkable   animaomnium.github.io/kee... · Posted by u/animaomnium
afraca · 3 years ago
I find it quite odd and funny that the author specifically mentions Google, and his script has a function `def google_it(query):` but then in the function he uses DuckDuckGo. Is the author ashamed, or does he expect people to not trust DDG?
afraca commented on Htmx 1.9.0 has been released   htmx.org/posts/2023-04-11... · Posted by u/vyrotek
recursivedoubts · 3 years ago
this will probably get nuked since it's just a point release (no hard feelings dang), but there is an interesting new feature: it now has View Transitions support, an experimental browser feature available in Chrome 111+ that makes visual transitions between DOM states much easier to animate.

I discuss it in an essay here:

https://htmx.org/essays/view-transitions/

Chrome's docs on the feature are here:

https://developer.chrome.com/docs/web-platform/view-transiti...

MDN:

https://developer.mozilla.org/en-US/docs/Web/API/View_Transi...

will be exciting to see this feature rolled out across the major browsers, as it will make vanilla HTML a lot smoother.

afraca · 3 years ago
I was curious about Mozilla's stance on the API. They have a GH issue for it: https://github.com/mozilla/standards-positions/issues/677

but it's not finalized yet. View the very interesting dashboard here: https://mozilla.github.io/standards-positions/

afraca commented on Wat [video] (2012)   destroyallsoftware.com/ta... · Posted by u/thunderbong
jjnoakes · 3 years ago
TypeScript has its own WATs too, and to me they are almost worse, because you have this false sense of security based on it being TypeScript and not JavaScript.

https://www.typescriptlang.org/play?#code/MYewdgziA2CmB00QHM...

afraca · 3 years ago
I agree with my sibling comments, but want to add that nowhere does TS imply it has it's own stdlib or anything. If you type map, you know fully it's the JS map that's going to be executed. I don't think TS ever wants or could replace the JS stdlib.
afraca commented on Wat [video] (2012)   destroyallsoftware.com/ta... · Posted by u/thunderbong
capableweb · 3 years ago
I gave it a try as well, and GPT-4 taught me something new about Python (I don't normally write Python, so it's not surprising):

    def add_to_list(value, target_list=[]):
        target_list.append(value)
        return target_list

    list1 = add_to_list(1)
    list2 = add_to_list(2)
    print(list1)  # [1, 2]
    print(list2)  # [1, 2]

    In this example, one might expect list1 to contain only 1 and list2 to contain only 2. However, because the default value for the target_list parameter is mutable, it gets shared between function calls, leading to unexpected behavior.
The other examples it gave me were not that unexpected. Prompt was:

> Show me examples of where Python type inference works in unexpected ways.

afraca · 3 years ago
Some people might not know this yet, the common idiom is to have the default value be None, and then start your function with checking if it's None and initializing to empty list.

u/afraca

KarmaCake day156November 15, 2017View Original