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

What are the practical ways to increase throughput for both DBs?


With postgres you could vertically scale the database or shard the data.

With cockroach you could add more nodes while keeping the replication count constant.


Anyone built simple (but not trivial) projects with Haskell or OCaml with source that I can look at?


I built a compiler and interpreter for a statically typed but fully inferred functional programming language in OCaml a while ago: https://github.com/coetaur0/nox The project is fairly simple, but there are non-trivial parts such as the type-system's implementation that might be worth looking at.


I'm sure a lot of people here have much better examples, but I wrote some basic regular expression and finite automata algorithms in Haskell a long time ago:

https://github.com/jl2/Compiler-Algorithm-Code/tree/master/h...

I tried it out and after renaming fold -> foldr, it still builds and seems to work. The main function takes a regex as a command line argument and creates a finite automata graph using GraphViz's dot.

In the Compiler-Algorithm-Code/haskell directory:

    make
    ./test "(foo)+(bar)*(foo+)" | dot -Tpdf -ofoobarfoo.pdf && xdg-open foobarfoo.pdf


The are LLVM Caleidoscope (toy compiler) in both Haskell and OCaml

https://github.com/sdiehl/kaleidoscope https://github.com/arbipher/llvm-ocaml-tutorial

The Haskell one is a nice one. Can say nothing about the OCaml one since I found it using a google search.

I've had a try at implementing an Caleidoscope compiler in OCaml but did not finish it. But it was fun to write.


I wrote this like ~10 years ago as a "Hello World++" type demo (basic key/value server) in Haskell. It's about 200 LoC, with a Haskell and Python client. http://github.com/wyager/neks


Some time ago I made a chip-8 emulator with haskell https://github.com/EzequielRamis/chisito. I suppose it may be easier the state management in ocaml.


I released a game using OCaml bindings to the Raylib library. I had never written OCaml before and I didn't spend very much time refactoring, so the code is pretty messy and maybe isn't the best example of the language. But some of it turned out pretty nice - the first ~90 lines of this file detect collisions between two shapes using the Separating Axis theorem: https://github.com/mega-dean/hallowdale/blob/main/src/collis...


This should be short enough to read: https://github.com/Artamus/git-split/


https://github.com/matthiasgoergens/Div7 is a simple one that you might like.


This seems more on the trivial side to me.


Yes, depends on where you draw the line.

XMonad is a bit bigger: https://github.com/xmonad/xmonad


I wrote a Lox compiler and interpreter in OCaml a few years ago: https://github.com/gaultier/lox-ocaml

No idea how it holds up, it was my first try at a compiler, but it’s quite small. I was following the Crafting Interpreters book.


You can check my (not finished) example of GitHub TUI built in OCaml:

https://github.com/chshersh/github-tui


An unfinished command-line client for Hacker News:

https://github.com/LucianU/hn-reader


"In the following chapters, we will explore the core concepts of category theory — objects, morphisms, categories, functors, natural transformations, Yoneda Lemma, 2-categories, (co)limits, sketches, Cartesion closed categories & typed lambda, Curry–Howard–Lambek corresponding, adjunctions, (co)monads, kan-extensions, toposes, and more..."

That'll be a no from me


Yes. In this day and age have people not learnt the lessons from having a single point of failure in their local economy?


Users included George Santos, but also Rudy Giuliani. Yuck. What a turnoff


I have to admit there is a certain price I would pay to get Giuliani to record a video in front of the Four Seasons gardening shop. I'm not sure what I would ask him to say, but I definitely would pay for something.


A site like that is going to be a magnet for grifters, but there are plenty of not horrible people on there, too.


weren't jack black & jean norris (hank schrader) on there?


The Lua fullmoon web framework is built around redbean. https://github.com/pkulchenko/fullmoon


Wow this is awesome, thanks for the tip


I walk almost every lunchtime outside, barefoot or with flat sandals, for 1 hour. I also do squats, sit-ups, push-ups and stretching exercises.

Fixed my back pain as well as my short-sightedness and hay-fever. I swear by it.


Makes me wonder if organisms on Mars (if they ever existed) used such a mechanism


On work laptop (Windows) at the moment. Will get to it in the weekend, but can some kind soul tell me: is the lua and js generated code readable?

(Standard for readable for me is ReScript)


I don't think the airships were powered by hydrogen. They had diesel-powered engines. The hydrogen was used to lift the thing.


I'm pretty sure the internal heating of the Hindenburg was hydrogen powered.


Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: