HN user

finder83

471 karma

[ my public key: https://keybase.io/finder; my proof: https://keybase.io/finder/sigs/fSPF_LrUf1_rF9MuAwNM6rQvSfSMmOwuCh7UAGv5pQw ]

Posts3
Comments164
View on HN

Every time I read things like this, it makes me think that AI was trained off of me. Using semicolons, utilizing classic writing patterns, and common use of compare and contrast are all examples of how they teach to write essays in high school and college. They're also all examples of how I think and have learned to communicate.

I'm not sure what to make of that either.

This looks amazing! I keep loving Phoenix more the more I use it.

I was curious what the pricing for this is? Is it normal fly pricing for an instance, and is there any AI cost or environment cost?

And can it do multiple projects on different domains?

It's very possible they don't replace them, but many libraries also have legitimate sells to clear books from inventory to make room. Usually over like a week or three day weekend once or twice a year, the last day having bags of books for $5. All of them have stamps/card holders/stickers designating the library. So those don't necessarily mean they were borrowed and never returned.

Infinite, yes, but I would say it's not quite as core to the language as it is in Haskell where everything's lazy. Infinite streams are quite simple though:

  Stream.iterate(1, fn(x) -> x end) 
  |> Enum.take(5)
  [1, 1, 1, 1, 1]

The functions don't return a mutable version of a variable or anything. You still get an immutable copy (it may not be an actual copy, I don't know the internals) of the state, and the state he's referencing in a Genserver is the current state of a running process that runs in a loop handling messages. For example in liveview, each connection (to an end-user) is a process that keeps state as part of the socket. And the editing is handled through events and lifecycle functions, not through directly mutating the state, so things tend to be more predictable in my experience. It's kind of like mutation by contract. In reality, it's more like for each mailbox message, you have another loop iteration, and that loop iteration can return the same value or a new value. The new values are always immutable. So it's like going from generations of variables, abandoning the old references, and using the new one for each iteration of the loop. In practice though, it's just message handling and internal state, which is what he means by "from the perspective of our program".

You typically wouldn't just write a Genserver to hold state just to make it mutable (though I've seen them used that way), unless it's shared state across multiple processes. They're not used as pervasively as say classes in OOP. Genservers usually have a purpose, like tracking users in a waiting room, chat messages, etc. Each message handler is also serial in that you handle one mailbox message at a time (which can spawn a new process, but then that new process state is also immutable), so the internal state of a Genserver is largely predictable and trackable. So the only way to mutate state is to send a message, and the only way to get the new state is to ask for it.

There's a lot of benefits of that model, like knowing that two pieces of code will never hit a race condition to edit the same area of memory at the same time because memory is never shared. Along with the preemptive scheduler, micro-threads, and process supervisors, it makes for a really nice scalable (if well-designed) asynchronous solution.

I'm not sure I 100% agree that watching mutating state requires a function to observe it. After all, a genserver can send a message to other processes to let them know that the state's changed along with the new state. Like in a pub-sub system. But maybe he's presenting an over-simplification trying to explain the means of mutability in Elixir.

Telescope feels so game-changing, and I've not found anything like it outside of Neovim and Emacs. Being able to fuzzy search a buffer or my project instantly makes navigation insanely fast.

People talk about not needing to type fast when coding, but I do need to navigate quickly, especially to not lose context while thinking. Ivy/Helm/Telescope with one of the various jump libraries (and LSP of course) makes code navigation feel second nature.

An Internet of PHP 3 years ago

Maybe I'm missing something, but I disagree with the tooling comment. Composer is horrendously slow, taking on the order of multiple minutes just to do a update often times. This is just my experience, but I'd much rather take mix, cargo, or yarn any day.

xdebug, while it works, also feels antiquated. Trying to get it working in a new system or project can take quite a while. Again, compared to python or node's debugging experience or profiling experience, and it feels like something stuck out of the 90s.

Even just getting output from php is difficult for me. Maybe it's because of the webserver I'm using? But python, elixir, node, go, etc, all output logs to stdout while running a local service. Maybe that'd work with the built in webserver, but fpm or modphp, etc, it seems like you have to hunt down logs.

Not to mention that the dev servers almost always require a full apache or nginx setup just to function. Opposed to a node, elixir, python, or go server which all run directly from the directory you're in. (Including things like hot/auto reloading in node and elixir)

I'm not a full time php dev, but my time in php always feels like a grind, and just getting tooling working is not an easy thing. If I'm missing some state of the art alternatives, I'd love to hear them though.

A few reasons:

1. I appreciate open and friendly discussion with people who don't think like me. The atmosphere, even of /r/conservative is very different than something like truth social. I don't want to be in an echo chamber, and the content from the echo chamber seems tailored to click-bate. i.e. "Watch X DESTROY Y with Logic", or conspiracy theories. I read a variety of news, and I don't need another source for it, but would rather watch discussion unfold about different topics by people who may have different opinions as well.

2. I use Reddit primarily for tech, gaming, programming, gamedev, and programming language related topics or other unrelated things like woodworking or bushcrafting. I like the community-based paradigm to social media for that reason, and that content is almost entirely lacking on conservative social networks.

3. I'm not really a Trump supporter. Truth social I believe is also relatively dead, but I've never joined so I can't verify that.

4. Free speech is extremely important to me. Trolling, hating,etc, should be moderated, but a dissenting opinion written respectively should not be, in my opinion. I'm not sure that Truth Social has reputation as a free speech platform. Reddit as a platform has largely been a free speech platform. Independently moderated subreddits have not. But Lemmy instances seem like they're going to take a stance against any communities or instances that don't fit the ideology.

There is value in open debate and conversation, but it does seem like Lemmy is intended to be a walled left echo chamber. I'm curious if your question is reflective of others' opinions as well, in that they'd prefer people not like them ideologically would just go to their own spaces and leave others alone

My impression (which may be wrong) of Lemmy is that a large number of instances are very pro-censorship and heavily left-leaning. Which of course is reflective of Reddit itself. But it doesn't exactly instill confidence in signing up for instances as a relatively conservative contributor, even while abiding by the terms of service of the instances.

Any advice for a conservative Christian trying to find a reddit alternative or Lemmy instance that also doesn't want to be moderated or banned into oblivion (or de-federated because of trolls which I do not represent)? As many conservatives know, even joining /r/conservative and not posting on reddit was enough to entirely be banned from many communities that have nothing to do with politics. Walking into another similarly prejudiced social network (but at a platform level) doesn't sound like fun to me.

For me, it's more about the plugins that are missing, like Telescope. Being able to filter a buffer or project to a search term and go one by one through them seeing the context is huge. (If you know Emacs, Ivy can do similar)

But there are some things that aren't quite right. It may be down to config, but it's frustrating when you use a key binding you expect to work that doesn't work the way it does in just vim. I can't name any specifics because I only use vscode for debugging sometimes.

Sure, that may be the case that they turned it down. It seemed to be a widespread issue though across a lot of reviewers and opinions.

The sound engineer interviews in that article are interesting though, and they seem to be blaming Nolan and the mixing as well.

I also get wanting to turn them down. I've been in theaters so loud that my ears were ringing after the movie, or were actively hurting during certain scenes. The Dark Knight was one of those. It could also just be poor settings at the local cinema in that case as well though.

Given the vast majority of movies are understandable, I just wish Nolan would mix with that goal in mind given I would actually enjoy his movies most of the time if it just weren't for the muffled speech and sound.

I would buy your argument if it were true that the sound wasn't muffled and unintelligible in theaters. But that's not the case. The recent Nolan films are almost as unintelligable in theaters as they are on a stereo home system, even on IMAX.

Nolan himself has tried to make this argument, he's trying to invoke sub-bass frequencies, that his goal was never for movies to be understandable, and that it was an artistic choice that maybe the audience doesn't have to understand everything.

I'm all for artistic integrity and him being able to do whatever he wants, but I'm also ok with calling Nolan wrong on this one. I have no interest in seeing his films if audio clarity is not one of his goals in film-making. It breaks immersion (real life isn't unintelligible and mumbled), it isn't an enjoyable experience for me, and frankly I think is poor decision making on his part. I'm ok with calling Nolan wrong, hand-wavy artistic stuff aside.

Thoughts on Svelte 3 years ago

Thanks for releasing this, saw it earlier this week and am excited to try it! Kind of wish we had had it for the start of our current project 6 months ago, but seems like with SSR Svelte is a great fit for LiveView.

Mostly code here, but I've found a few uses, mostly around brainstorming that I use as a starting point to further thought:

Brainstorming ideas such as around a party theme for my kids. Games we can play, decorations, etc.

Generating exercise ideas, particularly since I don't much like gyms or common methods

Helped me to understand some medical side effects of thyroid issues and the medicine I'm taking. Actually I learned from it that Iron interferes with my medicine, and I was taking vitamins at the same time as I was taking it. Seems minor, but my brain's definitely more active after changing things.

We just started a business, so ideas around sales tactics, what to include in a business plan, etc

Getting my mind going with questions to ask for a Bible lesson I teach around a specific passage. Apparently it can pretty much quote an interpret any passage I've given to it and generate questions, in different styles or levels of depth.

Having it explain or find interesting tidbits around the ancient Greek in a bible passage. This one surprised me. Apparently it understands to some degree declensions, parts of speech, verb tenses, etc. It's not 100% correct here, but maybe as correct as it is with code. I'm not an expert either, just graduated seminary, so it's a nice support

Just wrapping up my first project in Phoenix (and first project in Elixir) and it's been a lot of fun to work in. I'm still learning and haven't quite got the component model down, but it feels like it's been extensible and is easy to refactor things. I do think the productivity has been higher in it than writing a separate API/React SPA or nextjs project. As this is our first saas product in a new business, it feels like a bit of a gamble, but so far Phoenix feels solid.

If anyone has some recommended resources on the right way to write apps in Liveview with components I'd love to read them.

"out of that balloon" -- I see what you did there. :)

I've not really thought about it beyond that it would be nice. I really wanted to love Smalltalk, but Pharo at least didn't run well on Arch for me, and I didn't much love the web frameworks/concurrency story. I will say that Seaside is probably what got me interested in Liveview in the first place though. So many "if only"s...the developer experience is amazing in Smalltalk though.

There's a lot that scares me about making languages and I've not studied it much. I've started reading through SICP though as a starting place. Writing a basic scheme interpreter (and future compiler/JIT compiler) as an image-based language (with change tracking) to make it interactive from the get-go seemed to be as far as I made it, maybe basing it on an existing Scheme, but tacking on preemptive scheduling sounds hard. But so is making a language and entire development environment. :)

Shoot me an email though if you'd like to chat (in my profile, also username@gmail.com), not 100% sold if this is something I'd want to take on in the future or not, I really wish it already existed and someone better than me had already made it. :-D

Interesting, at least when I was using it the goroutines themselves were cooperative, and of course the OS threads were preemptive when GO_MAXPROCS > 1. Not finding much with a search, there was a proposal to make them preemptive. Curious if others will chime in that it's now preemptive. Even so I like Elixir better as a language, but the processing speed of Go with a preemptive scheduler would be tempting for some use cases.

There's a component that seems to be missing here which is preemptive task scheduling. I've not seen another non-OS system do it like the BEAM VM (the VM behind Erlang), though there may be something I'm not aware of. It really prevents a whole class of concurrency issues where a hung process can freeze or slow down the entire system.

For example, if you recreated gen_server in a cooperative concurrency environment, one gen_server could use up all of the CPU and have an impact on the performance of the rest of the system. Maybe the other threads (microthreads, not OS threads) would still respond in <500ms, but if every request takes 500ms when they normally take 15ms you could essentially have outage-like conditions, particularly with upstream timeouts.

Instead, because BEAM is preemptive that one (or 10) hung gen_server doesn't hang up everything else on a node. Sure at some point performance will degrade, but that point is much further down the line than in cooperative concurrency models. There was a fantastic talk by Sasa Juric that demonstrates this in Erlang. [1] Otherwise you run a higher risk of even the supervisors being starved for CPU time, particularly if you are launching hundreds of processes that are all locking the CPU.

It's really the combination of the behaviors (OTP), the scheduler, lightweight threads, message passing, and immutability to me that makes the Erlang (Elixir for me) concurrency model so appealing.

Creating a language with the feel of a lisp, the environment of Smalltalk, and the concurrency of Erlang has been my dream for a long time.

[1] https://www.youtube.com/watch?v=JvBT4XBdoUE

That's kind of my point actually. I do think hospitals should publish their rates and so be forced to compete, but the government should also be regulating the price of services, overhead, and medicines for everyone instead of just medicare/medicaid patients. It's such an essential service that going to a hospital shouldn't be a decision to ruin you for life or not financially while hospital administrators, pharmaceuticals, insurance companies, and lawyers are raking in millions or billions. Instead, there should be some guarantee that you are getting "fair" rates.

I'm of the personal political opinion that almost always when the government steps in to fund things on the demand side of the market equation it leads to massive growth in costs and burden for consumers. Universities are another great example of this. If they do step in, they also have to regulate the supply side as the free market is effectively broken at that point, and people who...say want to pay their own bills or for their own education by working or don't qualify for whatever government program is helping others, are screwed by the system.

Government intervention always seems to rake money into companies' pockets rather than helping consumers and tax payers.

Like many here, I love typescript for library writing, at least internally. I've not made any big npm packages, so not sure how that would do, but I imagine I'd like it a lot too.

What I hate is getting the build system set up to generate the right combination of .js/.d.ts files to work with the build system of whatever I'm using it in, particularly for libraries that use any form of preact/tsx files. I must be seriously missing something, but after 5 years as a node/react developer I still suck at making build pipelines for new projects.