Hacker News new | past | comments | ask | show | jobs | submit | birdfood's comments login

I too have been working on a CRUD app using Dream, SQLite, and Caqti (with HTMX and ReasonML) for a few months in my limited free time. I think I've hit a few of the same issues as OP. There's definitely painful points, but overall I'm really enjoying working with this stack. (For reference, my background languages are python, typescript, c++ and some spare time rust). First and foremost, I'm really enjoying having a fast compiler with a good type system as I feel it allows me to "unload" this project from my brain then pick it back up more readily. I'm using typed JSX thanks to tyxml and ReasonML. I've got templated .odt reports working with the mustache package which can then be opened perfectly fine in Google docs. I can create in memory zip files using zipc to allow downloading multiple files at once without needing to touch the disk. And I've just wrapped my head around abstraction using modules to write generic code for things like tabular data views.


Building a CRUD app.

It's been a while since I've worked on a CRUD app so I'm finding the whole thing quite interesting. The purpose of the app is to solve a scheduling problem.

I've written my own CDCL SAT solver (now just using google or tools), and on the app side I've jumped from Phoenix (elixir) -> Dream (ocaml) -> axum (rust) -> Django. I feel like Phoenix probably perfectly suits what I'd like to do with this app (long running tasks and collaborative editing) but I'm at the point where I want to support this app long term and I don't see me not being familiar with python anytime soon.


Interesting, what’s the scheduling problem?


Writers Festival program: basically you have a 100+ authors, a handful of venues, and 3 or 4 days to run the festival. The nature of writers festivals is interesting because there are a lot of panel sessions (multiple authors on the one session). The formulated problem is to produce a valid schedule such that the number of required accommodation nights is minimised - ultimately to reduce operating costs.


I find it interesting that this green/orange colour palette so commonly appears in midjourney images, seemingly regardless of the subject.



https://gleam.run is a statically typed language on the BEAM


I've been thinking about similar things lately, and particularly I think about the 3 billion humans who have never used the internet. How will this affect them? And how do they interpret this existential crisis we are facing?

Additionally, when the internet is mostly created by bots, why would I go online to look up a recipe on a bot cooking blog that was generated yesterday when I could have my pocket bot generate a brand new, tailor made cooking blog for me whenever I want? Ditto for instagram/tiktok. Generate the next image based on how long I looked at the last one.


I felt similar last year. I was trying to do them in Zig and Rust, and it felt like most of the challenge was just writing custom data parsers for poorly formatted data which felt too much like my day job.


> felt too much like my day job

Agree.

I think it helps to do it in a language you're not familiar with, or with some artificial limitation on how to solve it (no third party libraries for instance).

It takes more time, but felt less like a grind for me.


Last year I have used Python without using any imports and, whenever I felt like it, tried to golf it as much as I could. Turned out easier than I expected, even without any libraries Python is pretty powerful for this kind of tasks: https://gitlab.com/dos1/AoC21

There were only like two or three days that felt frustrating, but mostly because of the problem being poorly specified.


I'm using a language with easier data parsing this year and so far I'm having a much better time (I'm also more time poor and these exercises fit in pretty nicely to a bit of after dinner free time).


Fwiw there’s a few recurring formats, the old hands have a bunch of helpers for that and other things. Sometimes there’s something completely bespoke but the most commons are space-separated lines of things, usually ints, commonly fixed-size.


For 2022 day 5, the hard part was parsing the input.

https://adventofcode.com/2022/day/5


Same feeling for me as well. At a certain point it just stopped being fun and felt like work.


If twitter were to cease operation today, what is the maximum amount of money Elon can personally recuperate?


Probably zero.

Musk paid 44B for Twitter.

This was with some loans and some equity sold.

Generously, Twitter was worth half what he paid, 22B at the time he took over, given the decline in the market from when the Twitter tender offer was made.

$13B in loans $7.1B from equity investors (did they have a liquidation preference?)

How much has he degraded the value by scaring away all the advertisers?

https://archive.ph/JhTuM


Just to nit pick - Musk didn't pay 44B for Twitter. The total value was 44Bn, that was structured as 13B debt secured against Twitter. So let's say Twitter goes bankrupt (not totally ceases operations) - files for chapter 11.

You'd have to find some way of restructuring the company to pay the creditors. In the most simplified approach, the most likely the only way of doing that is to sell the company. If the company sold for more than 13Bn (perfectly possible, although not hugely likely given the damage he's done) then anything above that would go to Elon and his equity investors, but we'd be talking about them walking away with close to nothing. But it's also perfectly possible that Elon just steps in and buys the 13Bn debt and continues to run the company.


It's cool to read that treeform is using Nim at reddit (and helps explain why he's so prolific!). I see the same question sometimes asked "what is Nim's killer feature", "what is Nim better at than other languages" and the answer given is usually "there is no killer feature, Nim is great at lots of stuff!". But I would argue Nim's killer feature is pragmatism. I think it's the most pragmatic language I've come across.

I love that I feel like I'm writing a cross between a dynamic scripting language and a functional language, but that nothing is off limits. I can still dive into memory management if I want to, yet I'm not forced to deal with a cliff of complexity up front. I'd be happy to choose Nim for command line tools, server code, or games and I can't think of another language where this is the case for me.

I've started writing some small internal tools in Nim for work. The language is approachable for other devs who "aren't into languages" to pick up if needed, but I can also share binaries with them so they can just use the tools without needing to set up an env.


I hope I won't start yet another flamewar.. Have you tried D?

It's also a language I'd call pragmatic.


The worst thing about D is the forum full of sad and bitter people complaining that D isn't more popular.

Other than that, it's a spectacular language.


Haven't tried it really only due to a lack of time (and I've played with too many languages in the past 12 months)


Bit left field, but I think Haxe is a good "higher level rust".

* It's garbage collected

* Has algebraic types (enums similar to rust's)

* Pattern matching as good as rust's

* Null check strictness can be configured with the compiler

* Package manager

It's somewhat OOP geared though.


I'm looking forward to the day when we have bio-engineered slugs that feed off the left over food in our mouths while we sleep. If their trails can strengthen enamel all the better!


Thanks, but I rather not choke on slugs in my sleep.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: