The language, Sapphire, is Ruby inspired, so the most interesting part is digging into the internals of the latter when I'm trying to figure out how something should work.
480 karma · joined December 17, 2010
Github: https://github.com/nithinbekal
The language, Sapphire, is Ruby inspired, so the most interesting part is digging into the internals of the latter when I'm trying to figure out how something should work.
I was reading the fantastic Crafting Interpreters book, and been wondering what it would be like to design a language from scratch. I really enjoy using Sorbet with Ruby, so wanted to design a small language with Ruby's object model, and a gradual type system.
Despite not knowing much programming language theory, I was able to make a surprising amount of progress over a couple of weekends using Claude Code, including building a simple version manager for the language - https://github.com/sapphire-project/facet
Photography: https://photos.nithinbekal.com/
Directory of free technical books: https://devlibrary.org/
This is such a key thing I remind myself when I build apps like this for myself. I have a similar app that has a page with 900-odd ratings, and another with 550 owned books. I decided that I won't bother with infinite scroll or complex search and filtering until my browser can no longer handle rendering that data. "Find in page" works well enough for me for now.
someMethod:
self subclassResponsibility
I've suggested the name in the ruby bug tracker issue here:https://elixir-lang.org/blog/2023/06/22/type-system-updates-...
It's still early, but there are plans to introduce a type system for Elixir:
https://elixir-lang.org/blog/2023/06/22/type-system-updates-...
The team I joined worked on a Ruby codebase, and there were people with background in other languages, where method visibility worked differently. A short post I wrote [1] was being shared around in the team, and the manager decided to interview me.
Funnily enough, that same post was quoted to me by a colleague during a code review a few months later! So it turned out that it's still working as intended - as a reference for myself. :)
My random notes about programming, primarily about Ruby and Rails.
Built with Jekyll, and hosted on Github pages. Source can be found here:
In the browser console:
$('.js-start-download > a').each(function(a, b) {
console.log($(b).attr('href'))
})
Paste the URLs in list.txt and run wget on the list: wget --content-disposition --trust-server-names -i list.txtAre you thinking of Rails Assets?
"Hello World" in Brainfuck:
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.http://en.wikipedia.org/wiki/BANCStar_programming_language
Here's an article about it:
I've been looking around to see if ImageMagick could do rotation without degrading quality. (I'd also asked a question about that elsewhere in this thread.) So I assumed that most devices use something similar even for displaying on the screen. It appears I assumed wrong. :)
I saw your other comment about axis-aligned rotation not being too computationally expensive. In that case, why aren't iPhones doing it by default? Wouldn't their computation power be comparable to that of most of the cameras that rotate the images? Or are cameras better equipped to handle such transformations?
Unfortunately, with JPEG this would cause some loss of quality, so we're probably going to have to keep the original quality image as well as the auto-orient'ed image to display on the site. Has anyone here worked on something similar? Any ideas on a better way to handle this would be extremely helpful.
[1] http://www.imagemagick.org/script/command-line-options.php#a...
http://softwaremaniacs.org/media/soft/highlight/test.html
I wonder what would happen to the accuracy of highlight.js highlightAuto method if more languages were to be supported. Highlight.js recognizes languages based on how many language constructs it can recognize. More languages = more overlap in language constructs, and therefore more likelihood of wrong matches.
It does a decent job with Perl, Python, Ruby, Bash, etc.
It uses the highlight.js API for making the guesses, which provides the 2nd best option as well. :)
As for being a word in South Indian languages... it's possible that it's an archaic word, but it's certainly not used commonly, at least in Kannada (which is my first language).
Anyway, my point is that it shouldn't have been there in the wikipedia page as a "common Hindu name", but I should probably be discussing this on the wiki talk page rather than HN. ;-)
And all that for inserting the values taken from the three tables into a 4th table. This could have been done with a simple 3-table join query. Hell, it could even have been done with a single insert statement! I wonder how people fail to recognize an N+1 selects problem when it's staring them in the face.
Well, to be fair, this problem I described isn't exactly an N+1 problem is it? More like an N(M(L+1)+1)+1 selects problem. ;-) (Unless I've got my math all wrong there?)
How I hate working with PL/SQL stored procedures! :(
- Start with a smaller project, something that you could finish over a weekend. Finishing that kind of a project will leave you with the confidence to continue with more demanding projects.
- If you're working on a larger project, split it into smaller chunks. Make a list of things that could take, say, half an hour, and complete them as and when you get the time.
- Don't depend on others for motivation - motivate yourself. If you don't know why you want ot work on your own hobby projects, nobody else would.
There are lots of people I know that struggle to find the time to work on side projects. Funnily enough, I see that people working in startups find it as hard as us corporate IT folks to find the time.
Any plans from Foradian on this front?