36 karma · joined December 26, 2016
i asked it to generate some code for something i've never worked with and it seems to do a good job, not perfect but good enough for me to get a running head start.
on the other hand, i want to try and learn french, but for the life of me, i couldn't get it to provide a good starter page for learning pronunciation and the basics. bard did a good job providing a basic learning plan, but not more than that.
first time using a LLM (chatgpt or otherwise) but it's been pretty neat if a bit limited rn. like everyone else has mentioned, i want the computer from star trek and would probably be willing to pay for for it if the value proposition was high enough (read give me "superpowers" i didn't have before, less about refining my existing skill set).
it's a subtle distinction, but i think it shapes and reflects how you view ai as a tool for humans or as a replacement.
all different ways to write `if err != nil`, none of them are better than the other
> mapping/propagating an error
which is literally what i said "moves all your error handling logic to a separate file"
have you written any long-term maintainable code? comments like yours is why i've lost hope in rust and the community; you don't even understand the challenges large code bases face and yet continue with baseless zealotry.
What took the cake for me though, was a post a couple weeks ago where people were griping about Go's error handling (if err != nil) when Rust is, at best, no better than Go (e.g if you want to add any context to your error), or just objectively worse off (? operator moves all your error handling logic to a separate, completely different part of your code base).
For example, a few areas where Swift reduces boilerplate and the syntax it provides to do so:
- a complete null/optional story: first class optional types (T? = Option<T>), null chaining (obj?.prop), and null coalescing (T ?? "default")
- error handling: fn() throws Err (= fn() -> Result<T,Err>), try, try?, try!, do/catch (out-of-band error handling), w/o stack unwinding, see nulls
- and struct/enum lifecycle management: constructors, getter/setter props, defaults, named functions, named tuples, etc. (this list is loong)
Individually each feature is small and could possibly be argued as bloat or overhead since you can accomplish the same with just regular functions and Rust-like code and abstractions, but combined they make the language feel more expressive (and more fun IMO) than would otherwise be possible and often without sacrificing performance. They also serve to reduce cognitive overhead in the same way using for loops is nicer than desugaring to while loops. This is nothing to say of the syntax itself, and a bunch of other small features; Swift really is a case where the whole is greater than the sum of of its parts.All this study showed was that it was present in adult men, nothing about whether or not this is learned behavior or instinctual, or gender differences.
Does anyone know how c++ classes and struct will interact with ARC?
Example: What would happen if HN found out we’re mining our users’s IMs?
I feel like I might be okay with it if was a university (.edu domain) and I knew it was anonymized. Not sure I'd be okay with a random blog doing that.
1. I feel like there is a really strong push towards writing concise code, which make it really hard to approach for me. I've seen a lot of code which substitues words as function names for 2 or 3 character symbols. I'm okay with learning `>>=` and the like, but when every library want to invent its own symbol-functions, I feel like the barrier to entry for me becomes much higher. This occours in just about every high profile library I've seen, from parsers to web frameworks; everyone wants to invent their own DSL.
2. For as much as Haskell seems to pride it self on function composition I don't think `.` is the best way to do so; Clojure's threading macros are much more readable to me. Comparing the thread-last macro ``` (->> (range 10) (filter odd?) (map #(* % %)) (reduce) ``` to Haskell's composition operator `(sum . (map (\x -> x * x)) . (filter odd)) [1..10]`. (Please correct me if there is a clearer way to write this.) The former is much more readable from and LTR English language PoV. In Haskell I need to start from the right and work my way left; and this become even more harder for me to decipher when function operator precedence starts coming into play. It's small quality of life things life this which makes all the difference IMO.
3. The millions of syntax extensions in ghci, some of which are incompatible with each other. This means ProjectA and ProjectB can be written in completely different, possible incompatible, 'dialects' of Haskell. Now I have to learn the base Haskell languge and whatever language extensions that project has dedcided to use just so I can start reading and understanding the code.
4. AFAIK, there is now easy way to get function documentation in the repl. Sometimes types aren't enough for me and I would like to have some human written documentation guide me when I'm trying to use a library.