161 karma · joined Mar 16, 2017 (9y ago) · 57 submissions
comment 1y ago · link · parent
let Foo () = getData() |> Task.map _.value
And it'll be easier to work with the .NET ecosystem if you use the task computation expression[1] over the async one.[0]: https://github.com/demystifyfp/FsToolkit.ErrorHandling
[1]: https://learn.microsoft.com/en-us/dotnet/fsharp/language-ref...
comment 1y ago · link · parent
values.[index] // Old way of indexing required a .
values[index] // Supported for awhile now
That's the "biggest" issue I run in to, and it's not that big of a deal to me.Yesterday, it did try to hallucinate a function that doesn't exist; compilation failed, so the agent changed the function to a fold and everything was hunkey-dorey.
comment 1y ago · link · parent
> Stop selling "unlimited", when you mean "until we change our minds"
The limits don't go in to affect until August 28th, one month from yesterday. Is there an option to buy the Max plan yearly up front? I honestly don't know; I'm on the monthly plan. If there isn't a yearly purchase option, no one is buying unlimited and then getting bait-and-switched without enough time for them to cancel their sub if they don't like the new limits.
> A Different Approach: More AI for Less Money
I think it's really funny that the "different approach" is a limited time offer for credits that expire.
I don't like that the Claude Max limits are opaque, but if I really need pay-per-use, I can always switch to the API. And I'd bet I still get >$200 in API-equivalents from Claude Code once the limits are in place. If not? I'll happily switch somewhere else.
And on the "happily switch somewhere else", I find the "build user dependency" point pretty funny. Yes, I have a few hooks and subagents defined for Claude Code, but I have zero hard dependency on anything Anthropic produces. If another model/tool comes out tomorrow that's better than Claude Code for what I do, I'm jumping ship without a second thought.
comment 1y ago · link · parent
I regret adding that last bit to my comment because my main point (which I clearly messed up emphasizing and communicating) is that I think you’re presenting a false dichotomy in the original comment. Now that work can be done with LLMs asynchronously, it’s possible to both write your own code and guide LLMs as they need it when you have down time. And nothing about that requires stopping other functions of the job like mentoring and teaching juniors, either, so you can still build relationships on the job, too.
If having to attend to an LLM in any way makes the job worse for you, I guess we’ll have to agree to disagree. So far, LLMs feel like one of many other automations that I use frequently and haven’t really changed my satisfaction with my job.
comment 1y ago · link · parent
And really, I think many senior engineers are already doing both in a lot of cases where they're helping guide and teach junior and early mid-level developers.
comment 1y ago · link · parent
According to the complaint [0] on page 11, Flores-Ruiz still ended up in a public hallway and was observed by one of the agents. They just didn't catch him before he was able to use the elevator.
INAL but I don't think "Dugan let Flores-Ruiz use a different door to get to the elevator than ICE expected" should be illegal.
[0]: https://static01.nyt.com/newsgraphics/documenttools/3d022b74...
comment 1y ago · link · parent
comment 2y ago · link · parent
If you search "1 plate overhead press" or "1 plate ohp", you'll see many references to how that's a 135lb lift.
comment 2y ago · link · parent
I agree. I'm in .NET land, I use EFCore as my ORM, and I use EFCore's migration features. My ORM models are in a separate project (same git repo) from both the web server project and test project, and any hand written SQL gets added to the migration scripts that EFCore generates.
I spin up a docker container for postgres, my test code clears any existing DB, creates a DB in the container, and then runs the EFCore migrations on the DB. I have simple tests that make sure my CTEs are working correctly and that things like expected unique indices are also setup.
This works both locally and in Github Actions.
I just wouldn't call any of this a "unit" test. I put all this squarely in my integration test suite. I figure if IO is happening as a consequential part of the test (i.e. not setup/teardown), it's an integration test. I wonder how much that distinction is tripping people up? A lot of people think of unit tests as small, independent, and quick, so by only thinking about unit testing, they automatically rule out tests that have app code call out to a DB.
Based on the sibling comment, I'm going to have to take a look at Testcontainers. I'm not sure how much it'll simplify at this point, but who knows!
comment 2y ago · link · parent
It'd be helpful for my household for hot water for coffee and tea, and it'd also help us for heating up some extra water for grits or risotto when they need more.
Also, isn't boiling water just the measurable outcome of the test but what matters is that the pot is coming to temp sooner? Pots and pans heating up more quickly is helpful all the time.
comment 2y ago · link · parent
Additionally, Substack is allowing the monetization of (and thus profiting from) Nazi viewpoints. That's more than "shining a light on it".
comment 3y ago · link · parent
Ilya signed the letter, too, and has posted an apology[0].
[0] - https://nitter.net/ilyasut/status/1726590052392956028?s=20
comment 3y ago · link · parent
Isn't the risk of myocarditis worse from COVID than the vaccines? From [1], "In this systematic review and meta-analysis, we found that the risk of myocarditis is more than seven fold higher in persons who were infected with the SARS-CoV-2 than in those who received the vaccine."
I understand that my linked source doesn't seem to split up the data by age group, but given their overall findings, do you have a source that says the 7x difference doesn't hold in younger men?
comment 3y ago · link · parent
> another example is where you are trying to fetch a file or database record that does not exist
I think this depends on whether or not you expect the file/record to exist. Handling a request from a user where the user provided the id used for lookup? The lookup itself is validation of the user input. But if you retrieved a DB record that has a blob name associated with it and your blob storage says that a blob doesn't exist by that name? I find that to be a great situation for an exception.
The errors-or-exception line is fuzzy and going to be dependent on your team and the problems you're solving, but I've found that it's a decent rule of thumb.
comment 3y ago · link · parent
Given what you've specified, I might organize it like:
notify-user:
if (ValidationError, notify-user-validation-error)
or-if (DBError, notify-user-db-error)
try-update-db:
update-db
or-then retry-in-5
or-then retry-remote
try-send-email:
send-email
or-then (requeue-email and ok)
do-root-level-pipeline:
validate
and-then try-update-db
and-then try-send-email
or-then notify-user
I think I correctly mapped the and/or/thens to map/bind, so I hope that makes sense.comment 3y ago · link · parent
a <- 4 // Assignment, valid
This is a compiler error because you haven't made your variable mutable.Also, I actually like that initial assignment and equality testing both use =. I think of `let a = 1` to be less like assignment and more like `Assume that a = 1 is true`, so using the same operator (e.g. `a = 3`) makes sense for comparisons.
And `<-` as a separate operator is good because mutability should be exceptional for many (most?) codebases.
comment 3y ago · link · parent
And then in the next paragraph the article notes the view and retweet counts that the tweet received (as read from a cached version of the tweet).
comment 3y ago · link · parent
Project owners could do this before the CoC was created, and even if the CoC explicitly disallowed it, the project owners could do it anyway. The existence of the CoC changes absolutely nothing about what the project owners can and cannot do.
comment 3y ago · link · parent
Having "stuff they dislike" removed would be one thing, but using the direct line at Twitter for reporting explicit ToS violations isn't a big deal.
comment 4y ago · link · parent
test <@ width > 0 && x + width < screenWidth @>
And part of the output is: width > 0 && x + width < screenWidth
500 > 0 && x + width < screenWidth
true && x + width < screenWidth
true && 1500 + 500 < 1920
true && 2000 < 1920
true && false
false
[0]: https://github.com/SwensenSoftware/unquotecomment 6y ago · link · parent
https://docs.microsoft.com/en-us/dotnet/api/system.decimal?v...
comment 7y ago · link · parent
We're in funny territory that Microsoft is using a Google open source project in a consumer-positive way that also happens to hurt Google's primary business, but because the feature addition to Edge does not affect interop with other browsers, I don't see how this is EEE.