HNHacker News
TopNewBestAskShowJobs

gopiandcode

1,210 karma · joined June 5, 2019

pronouns: she/her

url: kirancodes.me

submissionscomments
gopiandcode··on How to (actually) prove it – New Frontiers of Mathematics and Computing in Lean
Oh, really? I'm curious what exactly you mean by limitless metaprogramming. I've really been drawn into Lean specifically because of how easy to extend and malleable the language itself is, so if Agda is even more so then I'd be really eager to try that out.

e.g.:

- embedding a prolog/asp DSL: https://github.com/kiranandcode/cleango

- embedding a tex/latex DSL: https://github.com/kiranandcode/LeanTeX

gopiandcode··on LLMs understand nullability
I am more than aware of Typescript, you seem to have misunderstood my point: I was not describing a particular type system (of which there have been many of this ilk) but rather conjecturing that targeting interfaces specifically might make LLM-based code generation/type inference more effective.
gopiandcode··on LLMs understand nullability
The visualisation of how the model sees nullability was fascinating.

I'm curious if this probing of nullability could be composed with other LLM/ML-based python-typing tools to improve their accuracy.

Maybe even focusing on interfaces such as nullability rather than precise types would work better with a duck-typed language like python than inferring types directly (i.e we don't really care if a variable is an int specifically, but rather that it supports _add or _sub etc. that it is numeric).

gopiandcode··on Google's new pipe syntax in SQL
I find this particular choice of syntax somewhat amusing because the pipe notation based query construction was something I ended up using a year ago when making an SQL library in OCaml:

https://github.com/kiranandcode/petrol

An example query being:

```

let insert_person ~name:n ~age:a db = Query.insert ~table:example_table ~values:Expr.[ name := s n; age := i a ] |> Request.make_zero |> Petrol.exec db

```

gopiandcode··on Underwater Chain Saws
Please also consider how much less inclusive and accessible computing would be if access to development tooling was placed behind such exorbitantly priced paywalls... The things we have at the moment aren't perfect, but I feel like the fact that the barrier of entry to programming is so low is an overwhelming positive that I couldn't see any level of bells and whistles justifying taking it away.
gopiandcode··on The TikTok ban is a betrayal of the open internet
To be fair, the distinction here is about actions by a government, versus actions by private entities. Opposition to the government banning a website does not necessarily mean that you would oppose private companies refusing to provide service to a bad actor.
gopiandcode··on Sci-Hub: knowledge as a human right
> If not, how do you reconcile this belief with the right of scientists and publishers to sell their productive labor?

As many others in the thread have said - the profits from the paper paywalls go to the publishers, reviewing is done by volunteers.

As an aside, it's funny how often defenders of intellectual slavery are so dug in to their beliefs while being completely unaware of the mechanisms of what they're defending. I suppose such ignorance is a necessary precondition to support such injustice.

gopiandcode··on If the Moon Were Only 1 Pixel (2014)
Funny you should mention that - I actually ran into another in-proportion solar system park model in Eugene, Oregon, USA: https://eugenesciencecenter.org/exhibits/eugene-solar-system...
gopiandcode··on A fully open-source and end-to-end encrypted note taking alternative to Evernote
Wow! GPL-licensed, Free as in Freedom, encrypted note taking! This is great. I think I'll probably end up self hosting this just on principle, but I signed up for a year just to show support! The fact that the Notesnook community is on discord is a little annoying, but other than that, I have no qualms with this, can't wait to try it out.
gopiandcode··on The Big [Censored] Theory
> I see this misunderstanding constantly online - honestly it's hideous to see people twisting Popper's pro-free-speech message into an excuse to crush those they misunderstand or disagree with. Literally inverting his meaning.

Yeah, it really is sad to see people so eager to embrace authoritarian sensibilities like this. The paradox of tolerence has seemingly become a buzzword without meaning, perverted beyond its original intent; a simple facade that enables people to feel self-justified about their own intolerance while still allowing them to claim progressive ideals.

gopiandcode··on Unifying fold left and fold right in Prolog
Yes, good catch! I actually wrote the fold predicate thinking of fold left, hence the naming, but as the same predicate can simulate both fold left and right, for the purposes of the blog post, I figured I could get away without renaming the variables.
gopiandcode··on Unifying fold left and fold right in Prolog
> It's not clear whether the author means to say foldl and foldr are equivalent, or only that any foldl call which terminates can be converted into a foldr call.

Oh, no, I wasn't trying to say that they were equivalent in general - of course, fold right is the more general operator, as you can implement fold left in terms of fold right. (As an OCaml programmer, I'm used to assuming that all my lists are finite[1]).

The interesting part that I wanted to highlight was the fact that when you express fold as a declarative relation, it is possible to obtain both fold left and fold right essentially for free. Maybe this is an obvious fact for Prolog practitioners, but as a functional programmer this was a somewhat surprising discovery for me.

> Here's a neat paper on fold by Graham Hutton: "A tutorial on the universality and expressiveness of fold"

> https://www.cs.nott.ac.uk/~pszgmh/fold.pdf

Oh, nice! Thanks for the pointer, that's a great paper!

[1] Although technically it is possible to represent certain restricted classes of infinite lists in OCaml: https://v2.ocaml.org/manual/letrecvalues.html

gopiandcode··on Ask HN: What are some cool but obscure data structures you know about?
Shameless plug, I also maintain an OCaml implementation of egraphs (named ego) at https://github.com/verse-lab/ego

While the most popular implementation at the moment seems to be egg in Rust, I find that OCaml serves as a much more ergonomic environment for quickly prototyping out uses of egraphs in practice. As a bonus, ego also shares the same logical interface as egg itself, so once you've finalised your designs, you shouldn't have much trouble porting them to egg if you need the performance gains.

gopiandcode··on Copilot sells code other people wrote
> > Copyright and licensing are bad, actually.

> This is why we have "Copyleft".

This. Exactly. It's suprising how many developers have strong anti-copyleft/anti-GPL opinions while being completely uninformed on what they're talking about (but hey, I guess "uninformed but strongly opinionated" is HN in a nutshell). The purpose of GPL and other copyleft licenses is exactly to combat the insanity of intellectual slavery.

gopiandcode··on Copilot sells code other people wrote
I feel like you're missing the forest for the trees here - making code freely shareable and remixable is exactly the purpose of GPL and other free-software licenses, but you can bet that the proprietary codebases Copilot will be used in will go out of their way to prevent any such uses of _their_ particular code snippets.

IMO, the only way to use Copilot's output in an ethically sound way is to only use the output it produces in AGPL licensed projects (assuming that Copilot has not been trained on any non-free software codebases which in itself is a strong assumption).

gopiandcode··on Inkscape 1.2 released
Yep, exactly. It's absolutely insane we've now reached for a point where when people see a standalone, working, polished piece of software that respects your freedom, they somehow feel that it is "inferior" because it doesn't take away your rights.

I, for one, am glad that Free/Libre software like inkscape continues to be heading strong, and find that it far outpaces any of the proprietary malware SAAS applications out there.

gopiandcode··on A CEO's Guide to Emacs (2015)
> For example, there will be more posts about how they mimicked most of the functionality of VSCode or a Jetbrains IDE than about any actual code they wrote (other than elisp).

Are we reading the same articles at all? Most of the Emacs posts I see are about extending features that lesser editors could only dream of supporting (using it as a window manager, media center, GUI etc.).

I always find it suprising how far anti-Emacs zealots will go to try and cast GNU+Emacs is a bad light. Somehow the fact that the GNU+Emacs community cares enough to share their configuration tips is a "bad" thing, rather than just being indicative of a supportive and friendly user community.

I guess if you are stuck in proprietary, telemetry-ridden editors like M$ vs-code, or sublime text, somehow you have to convince yourself that the grass truly isn't greener on the other side, and this is just one such coping mechanism.

gopiandcode··on Russia bans coupon payments to foreigners holding ruble bonds
> Pretty much ALL major developed western country went through such revolutions to earn their freedom. It is time for you to go get it.

You realise that you're asking innocent people to risk violence and potentially even give up their lives, to protest an invasion by a despot that they had little opportunity to oppose right? It's pretty easy to take credit for the bravery and fortitude that your predecessors had to bring about their revolutions from the comfort of your first-world home at little to no risk to yourself.

Honestly, this seems like the most out of touch call to action that I've ever heard. Also, it only starts to feel even more hypocritical when you realise that there have been several anti-war protests going on in Russia, for which the participants faced brutal violence at the hands of the state.

gopiandcode··on Don't Write a Programming Language
The problem with writing a _general-purpose_ programming language (as a solo-developer), is the fact that writing the language (i.e defining the syntax+semantics, writing the parser/compiler) is only half the battle - the rest of your time is spent on less technically interesting QoL features, like an IDE, standard library, debugger, syntax highlighting etc. which are nonetheless vital for making the programming language actually usable. (I still think writing your own PL is a useful exercise just to see how the sausage is made, but it should be made clear that there is a world of difference between a toy language and one that people would actually want to use)

It's for this reason that nowadays I rarely write my own "new" programming languages from scratch, but rather embed them as DSLs inside existing programming languages using macros. This way you get the full ecosystem of the host language for free, leaving you more time to work on designing the language to suit your needs. If you combine macros with clever uses of GADTs you can even get the host language to "type-check" programs written in your DSL. OCaml and Lisp/Racket are my favourite host languages to use for this approach.

gopiandcode··on Show HN: Social network that looks and works more like a forum
...for now. It's a proprietary, centralised service, so there's pretty much _nothing_ stopping it from doing that in the future ("money left on the table" and all that).

I think for now, the fediverse seems to be the most sustainable alternative to modern social media.

gopiandcode··on How to write LaTeX without writing LaTeX
..except it's quite different though?

Adding a hook for compilation in most decent editors is only a few lines of config, and many popular editors (GNU Emacs, vim, m$ vscode) nowadays have packages that have these hooks predefined, so it pretty much just comes down to installing a package, which I hope you don't think is beyond the capabilities of the average user. Alternatively there are editors like texworks which provide exactly this feature out of the box.

gopiandcode··on Stack safety for free?
I would highly recommend that the author look into continuation-passing-style - the general construction they discover in their blog just seems to be a reinvention of the pretty old observation that we can make any program tail-call recursive if we write it in a CPS form. In fact, in languages like OCaml, it's fairly common to do this transformation to avoid stack overflow (typically paired with a Monad), especially when compiling to JS. The requirement of generators isn't actually needed - you just need first class functions - although, generators and coroutines do allow expressing the code in a slightly more concise way.
gopiandcode··on Whitehead and Russell’s Principia rewritten in Coq
Also nice to see that this project is licensed under the GPL - very much in keeping with the spirit of open access to knowledge and information; this way future generations will also be able to benefit from these efforts, and malicious evil companies won't be able to steal this work and deprive their customers of the 4 computing freedoms.
gopiandcode··on The Fastest FizzBuzz Implementation
You're totally right. I think a lot of rust developers are going to be absolutely distraught that rust isn't the fastest language for writing fizzbuzz programs.

I guess they're just going to have to settle with rust being the best language to write safety-critical high performance concurrent low-level code.

gopiandcode··on Calling Rust from Python using PyO3
FeO3 (Iron Oxide) can be referred to as Rust and presumably the name PyO3 makes reference to that.
gopiandcode··on German state planning to switch 25,000 PCs to LibreOffice
> OSS is dead.

Given that OSS was a corporate sponsored perversion of Free/Libre software designed to trick naive developers into contributing unpaid labour without getting anything back, I would hope so.

Free software, on the other hand, is roaring ahead, and doing better than ever.

gopiandcode··on Decentralized Woo Hoo
Stephen seems to be a perfect example of how being an expert on one subject doesn't mean that someone has any kind of deeper insight or experience about unrelated areas. If you look at the history of his blog, for the entire last year his mind has seemingly only been filled with hatred for crypto - the man seems to have a serious ideological hatred of the technology and obstinately refuses to ever reconsider his position.
gopiandcode··on Updates to the Twitter developer platform
Not just mastadon, but the fediverse in general, which encompasses quite a diversity of software (pleroma, pixelfed, etc.) and has apparently now even started to threaten twitter enough to make it start initiatives to try and EEE it.
gopiandcode··on A no-go fantasy: writing Go in Ruby with Ruby Next
I think the process is exactly the same as the ruby example, except for the fact that while in ruby it was a hack, in racket, a programming-language programming language, is explicitly designed to allow for this kind of process. The linked website just mentions that the algol60 package also provides additional functions that allow executing over strings. The default mode of usage is to place a "#lang algol60" at the start of your files, and that configures the lexer/parser to allow the rest of the file to be parsed and interpreted as ALGOL code (just check out the examples in the packages's git forge page).
gopiandcode··on Making Emacs Popular Again (2020)
I see many people on here (likely non-emacs users) claiming that Emacs is obsolete/outdated/dying by completely misunderstanding its position in the ecosystem.

Maybe it's easier to understand via analogy. Let's consider cars. Of the global population of car users, relatively few of them are F1 racecar drivers. Furthermore, you can easily make the case that the particular features (aerodynamics, speed etc.) that make the F1 a good racecar, would not be useful for the average driver - the time they spend honing their skills to handle such a beast, you could argue, would be better spent on other things. But, at the same time, the F1 car has and will continue to have a place in the car ecosystem.

In the case of developers, you might be right that, for the average developer, working on your run of the mill, mundane, forgotten-in-a-few-years, CRUD web apps, a normal _average_ car (M$ vscode) would be a better investment, but no matter what, you will never be as fast or flexible as an F1 car (GNU Emacs).

← PreviousPage 2 of 6Next →