HNHacker News
TopNewBestAskShowJobs

myco_logic

37 karma · joined December 22, 2015

submissionscomments
myco_logic··on Code as Art
I've written on this matter before[1]. Code being appreciated as an artform would, to my mind, benefit greatly both the worlds of fine art and programming.

[1]: https://istigkeit.xyz/static/writing/essays/hello_artworld.p...

myco_logic··on Crafting Interpreters
Personal choice, is what I'd say. You can get a lot of mileage out of implementing a dynamic language with NaN boxing[1].

It really depends on the kind of language you're trying to build an interpreter for, and what purpose it could serve. For dynamic languages, I'd say looking at the core types of Erlang is a great place to start (Integers, Symbols, Functions, etc.). For a statically typed language things get more complex, but even with just numeric types, characters, and some kind of aggregating type like a Struct you can build up more complex data structures in your language itself.

[1]: https://leonardschuetz.ch/blog/nan-boxing/

myco_logic··on Building an Open Source Decentralized E-Book Search Engine
Depends on how beefy that laptop is...

I've been doing some local LLM stuff at work recently, and even with the amazing advances in quantization lately, doing that kind of stuff on a ThinkPad is feasible, but still strongly inferior to just renting out a VPS with a couple 4090/H100s for several hours.

The biggest thing with summarizing stuff is that most local LLM models often don't have very big context-windows, so they have trouble with larger texts like even a short Vonnegut novel (I was just testing em' with summarizing GitHub issues, and even with a 16k token context window they still sometimes struggle if there are a lot of comments).

There are probably smarter people than I who could get this working on a Raspberry Pi though... ;)

myco_logic··on Why You Should Write Your Own Static Site Generator
I fully support the idea that writing your own SSG can be not only a great learning experience, but also a chance to make your SSG do exactly what you want it to (and nothing more).

I've written a ton of little SSGs over the years, and every iteration I've learned what kind of features I really need, and which I don't.

When I started working on the current version of my personal website (istigkeit.xyz), I also wrote a new SSG just for it. The program is called Hyphae[1], and it's written in Ruby using the Kramdown markdown gem, and pretty much nothing else outside the stdlib. It works perfectly for me, and that's all that matters (that being said, the code is up there, and licensed with the Unlicense, so anyone who finds it useful is free to use and abuse my clumsy code to whatever extent they want).

I'm a big proponent in the idea of writing personal software: that is, programs that are made by you, for you, and with no expectation that they'll be used by anyone else. I think too often developers these days get caught up in trying to make their project be "the next big thing" in whatever domain it serves, but honestly sometimes it's nice to just write something for yourself :)

[1]: https://gitlab.com/henrystanley/hyphae

myco_logic··on Reduce vs. Fold in Common Lisp
While reading this, I was immediately reminded of the reduce operator, glad to see my intuition wasn't far off.

The nifty thing about this operator in the array-langs compared to the usual fold function is that they usually define identity elements for all primitive functions, which means that no initial value has to be provided: https://aplwiki.com/wiki/Identity_element

The downside of this approach though, is that using reduce with non-primitive functions can result in domain errors (at least in APL). I think BQN's version of the operator is a bit nicer, in that it allows you to specify an initial value in this situation: https://mlochbaum.github.io/BQN/doc/fold.html

myco_logic··on DreamBerd is a perfect programming language
I also quite liked that idea. It would probably be a nightmare to actually use, but it's definitely a creative solution to dealing with infix operator precedence.

The only implemented language I know of with this feature is the obscure array lang I (an incrementation of the J language's name I assume) by Marshall Lochbaum:

https://github.com/mlochbaum/ILanguage

myco_logic··on Om is a novel, maximally-simple concatenative language
If you're talking about the curly braces after the backtick in the syntax diagram for operators, I think that's just a way to escape those special characters so you can use them in operator names. It would be the same as escaping a double quotation mark in a string literal with a backslash, i.e: "\""
myco_logic··on Om is a novel, maximally-simple concatenative language
As a concatenative language lover/designer I just thought I'd put it out there how much of an inspiration Om has been to me, I absolutely adore your language! Om is one of the most beautiful programming languages I've ever seen, and surely one of the most unique too.

Most other concatenative languages are Joy/Factor-esque stack languages, so to see an entirely different vision with your prefix notation is an absolute delight . Your panmorphic type system is also genius (the only other language I know of that has something similar is TCL). The way you treat whitespace separators in your syntax is also very clever, I love that it basically enables one to encode strings without a dedicated literal syntax element.

Anyway, I just wanted to let you know how much I appreciate your design and implementation efforts. I hope your rewrite is going well, and I look very much forward to its eventual release...

myco_logic··on Do What the Fuck You Want to Public License
If the WTFPL is a bit too blue for you, you might prefer the Unlicense[0], it's what I tend to reach for when licensing projects these days. Compared to the WTFPL it's a bit more explicit about usage rights (but less explicit word-choice wise), and is basically equivalent in respect to the freedoms it provides. There's also the CC0[1] license, though I tend only to use that one for actual media, and not code.

I really hope more people will start to use these kind of licenses. Releasing something you made into the public-domain without concern about attribution or copyleft nonsense is, to my mind, one of the noblest things a creative individual can do...

[0]: https://unlicense.org/

[1]: https://creativecommons.org/share-your-work/public-domain/cc...

myco_logic··on Ask HN: What's the best source code you've read?
I also came here to mention this video. Watching the solution emerge line-by-line is a profound experience, and highly revelatory towards the kind of iterative problem-solving workflow possible in the Iversonian languages.

In the same vein, John Scholes' collection of APL code in the Dfns workspace[0] is positively wonderful to read through. I think it's probably one of the finest repositories of annotated code ever assembled.

[0]: http://dfns.dyalog.com/

myco_logic··on Programming breakthroughs we need
> It feels like there's an unexplored dimension of abstraction here. Something where generics, interfaces and higher order functions are too static and low level primitives. Something where it's really difficult to pinpoint what exactly is the repeated pattern here and how to exploit it. Instead of generic framework that can do everything, I'd like an efficient way do something specific.

This bit reminds me a lot of a concept Aaron Hsu mentions in his fantastic talk on anti-patterns in the Iversonian languages[0], a paradigm he terms "Idioms over Libraries". The idea being that because of the expressive power of APL's primitives programmers often opt for utilizing easily recalled snippets of symbols over the importing of library code to implement common functionality. This facet of array-lang culture can be seen with sites like APL Cart[1], which serve as indexes of these frequently used snippets.

I think a lot of people miss that this is one of the major advantages induced by the terseness of these languages (it's not just about code-golfing for the implicit joy of laconicism). By allowing for the direct expression of algorithms in the same context they are being used, APL and its kin enable one to tweak and optimize these idioms on a case-by-case basis: precisely the kind of specificity the author of this article is asking for.

[0]: https://youtu.be/v7Mt0GYHU9A?t=1027

[1]: https://aplcart.info/

myco_logic··on Ante: A low-level functional language
This looks really lovely, I look forward to following the maturation of Ante in the future. I've often thought that the niche of a general purpose low-level FP language was a promising space. The only other langs that fit in there are ATS[1], which is notoriously complex/difficult-to-learn, and Futhark[2], which is more GPGPU/scientific-computing specific.

We've got Rust, which is essentially a C-style lang that steals all kinds of goodies from the ML family; it's nice to see Ante as a kind of inverse to this: i.e. an ML style lang that borrows some of the nice bits from traditional imperative langs (and hopefully maintains their performance characteristics).

Looking through the language tour there already seem to be a plethora of very sensible/ergonomic design decisions here. The 'loop' and 'recur' keywords are a great feature, making a nice little functional nod towards while loops. As a long-time Haskell user the explicit currying initially turned me off, but after seeing a couple examples I can see how it's actually a very reasonable solution, and moreover the ability to curry out of order is really nice instead of having to use 'flip' or similar combinators (as a side note, the explicit currying reminds me a bit of APL's α and ω arguments in dfns, a feature I'd love to see pop up more). The paired tuples also seem like they'd be a pleasure to use; certainly a bit more flexible than tuples in other ML style langs. Making '.' the pipeline operator is also a smart bit of syntax, and I can see it being very accessible to OO programmers in that it looks (and acts) like the method chaining they're familiar with. Refinement Types seem like a good alternative to full on dependent typing (ATS has an analogous (and more general) proof system for ensuring things like array indices are valid (an essential feature in a low level FP lang), but it involves threading those proofs through your program which seems much more clunky than what's presented here).

Overall I'm really excited to see where Ante goes, it seems like a very pragmatic functional language, something the world definitely needs more of...

[1]: http://www.ats-lang.org/Home.html

[2]: https://futhark-lang.org/

EDIT: In regards to low level FP langs there's also Carp, Erik Svedäng's nifty little statically typed Lisp. It's like Scheme with a Rust-y memory model:

https://github.com/carp-lang/Carp

myco_logic··on Tech suffers from lack of humanities, says Mozilla head
Just as having an in depth understanding of mathematics, physics, or engineering helps us to make more informed decisions, so too do the humanities. Fields of study such as philosophy, sociology, or aesthetics do not attempt to establish, as you put it, subjective unverifiable "truths" (to do so would be quite infeasible in the first place). Instead they allow for discussion and aggregation of information and reasoned opinions, so that a comprehensive understanding of the field and its many schools of thought may be reached.

Coming back to the wind farm, even once we have the objective variables, the decision we make will be based on factors of morality, geography, aesthetics, sociology and politics. By having a broad understanding of these fields and the various paradigms contained within them, we can produce a more informed decision than if these aspect were ignored completely.