HNHacker News
TopNewBestAskShowJobs

amitu

403 karma · joined March 12, 2009

founder, fifthtry.com (amitu@fifthtry.com). creator of fastn.com (a full stack programming language designed for non programmers), and malai.sh (a peer to peer internet protocol).

Email: amitu@fifthtry.com

submissionscomments
amitu··on Building single-page-apps with PostgREST
Point taken. But I am not hyping the specific technology here, I would be glad FTD ends up being the language, but I believe a FTD like like language is definitely needed. We need a programming language for human beings, that we can hope all humans can write. Unfortunately JS is not that language. You can do very little with just knowing JS, you have to learn a lot of other technologies.

FTD is my proposal for one such language. https://ftd.dev/philosophy/:

> If the vision is for every human to own their data, one must ask, data in what format? XML? JSON? YML? Markdown? FTD hopes to be that format.

amitu··on Building single-page-apps with PostgREST
Hey, can you tell me what phone you are using and what exactly do you mean by "crashes my phone"?

Thanks for the design feedback. The theme is new. The language itself is new. The static generator is new. Sidebar issue on mobile, and contrast issue we are aware of and are working on. Markdown styling is not a trivial issue to fix as we do not allow authors or theme builders to access CSS directly, [1] is the design we have come up with.

[1]: https://fpm.dev/journal/#markdown-styling

amitu··on Building single-page-apps with PostgREST
FTD: https://ftd.dev/language/. A DSL for creating "programmable prose". Markdown with data declaration, event handling and soon arbitrary computation.
amitu··on Building single-page-apps with PostgREST
I am a huge fan of this stack. I love that Supabase is spending millions of VC money to popularise this stack, solving all issues, improving PostgreSQL and PostgREST, writing documentation, conference talks etc. kind of sucks the stack success requires Supabase to die (technology becoming commodity, which it already it, Supabase people did make everything open source, true to their promises).

Supabase has zero differentiation. They have a nice "PGAdmin" if you may, but no one will pay for entire database hosting because of an admin interface. When it comes to hosting DB AWS, Azure etc have massive advantage.

Supabase will simply popularise the stack, and then when time to actually host the database comes people will move from Supabase to AWS etc.

Also the best language for UI is not JS, but something like FTD if we continue to make the progress we are making. Hopefully FTD + SQL Is all you need to know soon. Checkout this design that we are working towards for making this a reality: https://fpm.dev/journal/#explanation-of-dynamic-documents-an...

amitu··on Contexts and Capabilities in Rust
This proposal addresses a problem that I have faced all the time. I used to use Golang before Rust, Golang uses `context` package for this, and I have created `In` objects to emulate context. Consider this code[1], I pass it all over the place. I never liked it, it made function signatures complex, and did not always solve it, I had to keep track of more than one "context" types as different parts of code need different capabilities.

So I am glad people are working on it. I also find the solution quite ingenious.

The main concern that came to my mind was aliasing. This is like "spooky argument at a distance" kind of thing happening, and how do I "rename" these arguments in transit?

Say I am going to call two methods, both of them require different context data but with same "thing", eg say I want to implement a custom deserialiser that deserialises into same type, `Vec<String>`, but instead of allocating new ones I want to deserialise them into two different pre allocated buffers which I want to pass as context. But each call must get a different buffer.

Of course things would be easy if they were clear different `with` clauses, but if they overlap then I am not sure.

[1]: https://github.com/FifthTry/realm/blob/master/src/urls.rs#L1...

amitu··on Ask HN: Programming talks that made something click for you?
"Making Impossible States Impossible" by Richard Feldman (2016): https://www.youtube.com/watch?v=IcgmSRJHu_8

"Understanding style" by Matthew Griffith (2017): https://www.youtube.com/watch?v=NYb2GDWMIm0

amitu··on Ask HN: What are you building this weekend?
Created first release of `ftd`, a mark-up language for defining schema and data, and UI: https://www.fifthtry.com/ftd/

  -- record product:
  description: caption
  type: integer

  -- list products:
  type: product

  -- products: iPhone
  type: 12

  -- products: Google Chrome
  type: 123

  -- ftd.text: ref product.description
  $loop$: products as product
  size: 30
  color: red
This weekend working on improving `ftd playground`: https://play.fifthtry.com.

Mocking playground in playground itself: https://play.fifthtry.com/?ekey=xzdf7HJFB6LxfpGER2X9Bg

Will be open sourcing it soon, have built it in Realm, a full stack web framework using Rust+Elm, want to use it as a demo to showcase some features of realm: https://www.amitu.com/realm/.

amitu··on Show HN: FTD, an Alternative to HTML/CSS/JS/JSON/XML etc.
This is the idea! Check out some examples of what you can do with FTD already: https://play.fifthtry.com.
amitu··on Show HN: FTD, an Alternative to HTML/CSS/JS/JSON/XML etc.
FTD is XML with neater (hopefully) syntax. XML got a lot of things right, XML has XSD for rich data schema definition, Unlike JSON/YML. FTD too has first class data modelling capabilities, you can specify schema for a "record", which is equivalent of struct. And you can have ADT's (which we call or-type). Then we have variables, lists, etc.

If you want to share a data file with someone, FTD is a very compelling alternative to define the schema, represent the data.

Further, XML also has XSLT, which can be used for rendering XML data to arbitrary strings, but is mostly used for creating HTML, so data can be visualised properly.

Unfortunately XML relined on HTML (which in turn relied on CSS and Javascript). With FTD you do not have to mess with such 4 technologies (these are hotchpotch mix, not a well designed whole).

XML was meant to be handwritten, but markdown vs HTML has clearly demonstrated SGML syntax is not great for writing, markdown is.

You will see that authoring types, representing data, and writing prose is really pleasant in FTD compared to all of them.

Check out this FTD fiddle for example: https://play.fifthtry.com/?ekey=z2jcGxP1hAI01i1Fho515Q, this has record definition, list creation.

And then you can do event handling etc, for example here: https://play.fifthtry.com/?ekey=pMsktS3rOFnS0sGaSe3K0w

amitu··on Show HN: FTD, an Alternative to HTML/CSS/JS/JSON/XML etc.
Hey,

I am the founder of FifthTry.com and creator of the FTD document format.

Backstory: I came across Matthew Griffith’s Style Elements library[1] years back, it made me rethink how to build and style user interface: thinking in terms of rows and columns was very intuitive to me compared to the CSS box/flex models. Style-Elements and then `elm-ui` offer a really small set of properties, and they are good enough for us to replace CSS for most part, this makes me think CSS is a bit over designed, or may be not designed at all, a hack gone too long.

But CSS is not the only thing I struggle with, there is also the complexity of three completely different language you have to learn to build any simple user interface today, HTML, CSS and JavaScript. You can do a lot with just HTML / CSS, especially if you are not building web-apps but web pages, but with just HTML / CSS its not possible to create re-usable components.

And Javascript is just too much (so much so that a lot of backend developers declare themselves incapable of building basic web interfaces).

Another problem that bugs me is the data representation / exchange languages: JSON/YML/CSV are too popular, and yet they leave a lot to desire, there is no way to define schema in any of them, writing them by hand is too cumbersome without programming editors, and then its just one more thing to learn on top of the three named above.

It always bugged me that this can not be the best we can do.

FTD is an attempt to take Griffith’s ideas, create a (hopefully) simple syntax, and create a unified language that replaces HTML/CSS/Javascript for user interface creation (think web pages, not web apps). A language that has first class data modelling capabilities[2].

I would love to hear your thoughts about it.

PS: apologies for the back button bug, I have created a full stack web framework: Realm[3], and it’s under a lot of flux right now.

[1]: https://www.youtube.com/watch?v=NYb2GDWMIm0

[2]: https://www.fifthtry.com/ftd/data-modelling/

[3]: https://www.amitu.com/realm/

amitu··on Ask HN: What tools do you use to write techinal documents
I am working on fifthtry.com to solve exactly this problem.

We organise stuff in tree. Eg you can see my person blog hosted on it: www.fifthtry.com/amitu/.

We are working integrating with diagram tools.

Regarding sync: we connect with github and block pull request till it is documented and approved on fifthtry.

Would love to demo it to you if interested, email in my profile.

amitu··on Ask HN: How many of you guys like erlang
I loved erlang. I still do. To me it is the most well designed language/library set for distributed programming. I love their approach about error handling.

But I find golang much more accessible. Erlang does not scale down, for simpler tasks, erlang feels like an overkill.

Also while I love erlang syntax, and the functional style, my colleagues find golang lot more palatable than erlang.

amitu··on Ask HN: Would you use a Django package that models the AWS console?
Thanks for the screenshot. Interesting.

I am not getting the point of it. I mean, its kind of a "api translation" right? Instead of using boto, you will be using django's db-api to create/manage things. This in itself is quite compelling, who wants to learn boto? I am wondering if this was the reason you built it, or you had some other use case?

Also, this is a little bit less "accurate" than boto right? If for example I have to query the number of instance running using my account, a direct query using boto will give me accurate result, but a query on django can be out of sync due to any number of reasons.

Is there anything to summarily say if my data is in sync with EC2?

Good work btw, I think you should def open source it. :-)

amitu··on Ask HN: Would you use a Django package that models the AWS console?
Can you show some screen shots? I think it could be useful in getting more interest.
amitu··on Using Django for mostly static sites
Or you can use djangothis[1].

  $ pip install djangothis
  $ cat > views.py 
  from importd import d
  
  @d
  def hello(request):
     return d.HttpResponse("hello there")
  ^D
  $ djangothis
  Validating models...
  
  0 errors found
  February 18, 2014 - 16:43:31
  Django version 1.6.2, using settings None
  Starting development server at http://127.0.0.1:8000/
  Quit the server with CONTROL-C.
Any html files would be automatically served, files in static folder in current folder will automatically be mapped to /static/ and so on.

[1]: https://github.com/amitu/djangothis

amitu··on Show HN: Myth – CSS the way it was imagined
That would be a noop with LESS/SASS unless the input CSS was not a "valid" CSS.

This project will "enhance" "normal" CSS to take care of polyfill, which alone is a win. Take any CSS file you got, and it suddenly has all browser prefixes thanks to this tool. This is something LESS/SASS can not do.

amitu··on Python-based static site/blog generators?
I built and use djangothis[1] for my blog. It gives you most of the power and flexibility of django, like templates, arbitrary urls and views [which gets converted to static html], templatetags and a few other niceties.

[1]: https://github.com/amitu/djangothis/.

amitu··on Ask HN: What is your favorite system for static website generation?
I love djangothis, https://github.com/amitu/djangothis. http://amitu.com/2013/09/djangothis-for-blogging/.

I am biased because I built it, but if you like jekyll, but prefer django/python, you should give djangothis a try.

amitu··on Dojo for jQuery Developers: A comprehensive tutorial
Hey, it was just a tutorial feature, I have tried to faithfully copy the feature as done in jquery to demonstrate its not really any different from jquery, and if you read till near the end, its arguably much better than jquery based solution. Of course you can use MVC/AMD etc with jQuery, but it will send you in search of a new solution, unlike dojo which has it covered, rather nicely.
amitu··on Dojo for jQuery Developers: A comprehensive tutorial
Dojo is trying to get rid of the design elements present since as early as 2005. In another decade yes, but this whole shift to is geared towards a more stable 2.0. It is the developers who want more change, not the dojo foundation, who is more focused on backward foundation.

And changing the way you access a method (from global variable to requiring them through AMD) is not relearning everything.

amitu··on Dojo for jQuery Developers: A comprehensive tutorial
True, but it is not like dojo is continue to do that. Dojo is going to a 2.0 release and there is a massive change between 1.0 and 2.0, primarily AMD. Dojo has previously shown a long history of backward compatibility. One of concerns of many dojo developers is that they should abandon the old code and directly switch to new one as the transition period is not doing any good to new developers trying to learn dojo, but if you have already written an app, dojo provides excellent backward compatibility.
amitu··on Dojo for jQuery Developers: A comprehensive tutorial
Please guys, ignore the dojo history. There is massive difference between dojo 1.6 and 1.7, and 1.9 is much more improved version of 1.7 too. Dojo is changing fast, do not dismiss dojo1.9 because you burnt your fingers with dojo1.3 or due to migrations.

For a new project, give dojo 1.9 a try.

amitu··on Dojo for jQuery Developers: A comprehensive tutorial
I am here saying you must consider it for next, especially large scale javascript project. Start with dojo-1.9, assume anything before this never happened. Read my tutorial. I dont want to be contradictory, but dojo truly shines in large scale javascript project, where jquery has no help, unless you use something else.
amitu··on Dojo for jQuery Developers: A comprehensive tutorial
In my opinion you need dojo-scaffold (now outdated) or dojo-boilerplate(still recommended by dojo developers) only if you do not understand dojo well. I am quite sure after reading the article I wrote you will not need any of those clutches, and do things the way you please.

Dojo's learning curve is a big problem, and I am trying to do my bit to address that.

The changes are confusing, yes, but what can you do? You can not live with old just to not make things confusing.

I believe the great programmer bit is only another way of saying the documentations are lacking, and not that dojo itself is more "complex" than jquery (of course it does much more, so compare it with jquery+requirejs+backbone+<there is no widget library in jquery i believe>).

Debugging is a pain in the ass, yes. I am not sure what is the answer to that.

I am planning to do a few more articles, covering MVC etc in a little bit more detail.

To me the first question is technology, dojo represents a solid, well thought out technology, secondary is documentation/learning. I would be willing to spend an extra week to learn something with sparse/confusing documentation, if it provides me with an edge when it comes to future work. And in my opinion dojo does.

amitu··on Dojo for jQuery Developers: A comprehensive tutorial
There is no "vendor lock-in". If you read the article I have written, if you have written AMDs you can use requirejs.

What I highly recommend if use dojo's declare way of doing object oriented javascript.

Specialized libraries are always going to beat general purpose libraries, but the reason big frameworks are popular is because they give a structure to the project. The dojo project I did will look quite similar and familiar to any other dojo developers, we will use same way to build our builds, same way to represent data using object stores, our classes will be compatible with each other, and our widgets will look familiar.

There is value in it.

amitu··on Dojo for jQuery Developers: A comprehensive tutorial
I have written the article because I agree with you, dojo is not intuitive. Dojo has a lot of documentation, but since dojo is in such a flux there is a lot of documentation that is out of date.

After using dojo for at least one big project I am have a different experience. For the first time I started thinking about software engineering principles when I used dojo in client side. All my previous projects were in jquery and while they work, jquery has not helped me one bit in managing complexity.

I have written my experience about how to use dojo right. Do not use too much of dojo, don't use dojo for page layout, do not use dijits that may not be as well tested as the core.

I would highly recommend you give the tutorial a try.

amitu··on Dojo for jQuery Developers: A comprehensive tutorial
If you do not do JS compilation then you are either forced to not split up your project into logically different files, or you incur too many HTTP requests over head.

If a project is just a few lines copy pasted here and there, then sure, but for any more complex project you have to build.

amitu··on Dojo for jQuery Developers: A comprehensive tutorial
Thanks to be of use :-)
amitu··on Dojo for jQuery Developers: A comprehensive tutorial
I take your point. Dojo has tried to do a lot of things, and some of those have not panned out as well as the other parts.

I am getting your point. I would prefer if dojo lowered the marketing on the rich set of existing widgets, as very few people will every use dijit/Button over native button.

But dojo's object store/MVC, dojo's widget system itself, the build system/AMD, they have proven themselves over a period of time.

Don't use dijit widgets, but do create widgets using dijit/_WidgetBase is my recommendation to everyone learning dojo. And none of the grids, and layouts and SVG etc etc. They inclusion in dojo code base is one of the reasons so many developers get put off by dojo.

amitu··on Dojo for jQuery Developers: A comprehensive tutorial
Please take a look at the application I have built, the build step is just two commands: https://github.com/amitu/dkudos/blob/master/build_dojo, and the "require boilerplate" is just 7-8 lines: https://github.com/amitu/dkudos/blob/master/prof.js (if you ignore the comments).

A lot is happening in dojo, the dojo development has picked up pace lately and dojo2.0 is going to be a huge step forward for simplicity and richness.

I have mentioned at the beginning, if you just want a jquery like work, Google's CDN is available for dojo too, and the CDN has all the modules required to get jquery level functionality baked in.

← PreviousPage 2 of 3Next →