[HN Gopher] Quran API
       ___________________________________________________________________
        
       Quran API
        
       Author : asim
       Score  : 158 points
       Date   : 2021-09-20 10:15 UTC (12 hours ago)
        
 (HTM) web link (m3o.com)
 (TXT) w3m dump (m3o.com)
        
       | suriyaG wrote:
       | This is cool, dunno why the hate though. There was I think a
       | similar one for Bible as well.
       | https://news.ycombinator.com/item?id=23737601
        
         | friendly_chap wrote:
         | Yeah, I am somewhat appaled by that too, why could we not have
         | APIs of religious texts (edit: unless it is against the
         | particular religion in question, thus offending believers)?
         | 
         | Disclaimer: I am one of the contributors of the site.
        
           | bastardoperator wrote:
           | I'm not religious, but I've always assumed belief in one
           | religion means you believe other religions are false maybe
           | even fake. To say you are a practicing _____ (insert
           | religion), you're in essence saying my religion is right and
           | others are wrong maybe even infidels or heathens. I can see
           | how people who believe in these things could take offence if
           | they're of a different belief.
        
             | Arnavion wrote:
             | >To say you are a practicing _____ (insert religion),
             | you're in essence saying my religion is right and others
             | are wrong maybe even infidels or heathens.
             | 
             | I don't really want to shit on any particular religion, so
             | I'll just say that what you've written does not apply to
             | most religious people. Most religions have a live-and-let-
             | live attitude when it comes to other people's religious
             | beliefs.
        
               | buu700 wrote:
               | The premise doesn't make much sense to me in the first
               | place.
               | 
               | I think all religions are probably wrong, as far as their
               | metaphysical hypotheses go. By the same logic, that
               | should actually be _more_ offensive than thinking that N
               | - 1 are religions are wrong, not less. (I don 't
               | personally see how either is offensive, to be clear.)
        
               | sinyug wrote:
               | > Most religions have a live-and-let-live attitude when
               | it comes to other people's religious beliefs.
               | 
               | This does not apply to monotheistic faiths. The first
               | problem is that they claim that their god is the _only_
               | god. The second problem is that they prescribe
               | punishments (death, eternal hellfire etc) for those who
               | do not accept their god. True believers then go out and
               | implement these policies making liberal use of both the
               | carrot and the sword. This has been observed everywhere
               | from ancient Egypt under the rule of Amenhotep IV to
               | modern religions like communism where persecution of
               | other religions is almost a given.[1]
               | 
               | [1] https://en.wikipedia.org/wiki/Atenism
        
               | bobthechef wrote:
               | > This does not apply to monotheistic faiths. The first
               | problem is that they claim that their god is the only
               | god. The second problem is that they prescribe
               | punishments (death, eternal hellfire etc) for those who
               | do not accept their god.
               | 
               | You've completely misconstrued the nature of tolerance.
               | 
               | First, the only valid reason to hold to any religious
               | faith is that you are convinced that it is true. Period.
               | This isn't a narrative among many that you can pretend to
               | believe because it adds structure to your life or some
               | other benefit. You believe it primarily because you think
               | it's true. (The benefits are secondary, though you would
               | expect them if you've got truth. Truth allows you to live
               | in conformity with reality and your own nature and thus
               | your own good.)
               | 
               | Second, you have completely misconstrued what Abrahamic
               | religions believe w.r.t. God. God is not comparable to
               | pagan gods. Pagan gods are just more powerful beings.
               | Each pagan god is just one being among many. That is not
               | the case for the Abrahamic religions, certainly not
               | Christianity and definitive not Catholic understanding.
               | God is the Ipsum Esse Subsistens or subsisting Being
               | Itself. Jesus is the Logos, not some guy competing for
               | marketshare with other gods. This sort of monotheism
               | isn't the reduction of the pantheon to one god. It is the
               | definitive abolishment of the superstition of pagan
               | religion. You actually don't need to appeal to any of
               | these religious faiths to arrive at God thus understood.
               | All you need is metaphysics.
               | 
               | Third, the claim that a lack of faith in God is sure to
               | lead you to hell has nothing to do with intolerance.
               | That's like saying that anyone who claims that driving
               | off a cliff will kill you or taking drugs will destroy
               | your life is an intolerant person engaging in
               | fearmongering to control people and keep them from having
               | fun. If you were headed toward a cliff, or about to shoot
               | up some heroin, wouldn't you want someone to tell you
               | that you'd about to ruin your life or kill yourself? If
               | someone believes that a lack of faith will lead to your
               | eternal damnation, then it is rather a sign of charity
               | and love that they should let you know you're in danger,
               | even if they're wrong. You can appreciate the concern at
               | the least. You seem to be suggesting the absurd idea that
               | it is intolerant to be certain of your beliefs and thus
               | certain that someone else is in error. That's
               | preposterous. What's intolerant is this definition that
               | requires people to artificially deny their certainties
               | and "tone it down" because their beliefs make some people
               | feel uncomfortable for some weird reason. Mind you,
               | believing a lack of faith is a path to hell does not
               | imply forcing people to accept that faith. The Catholic
               | and Christian tradition recognizes the need to
               | evangelize, but not the legitimacy of coercion. Coercion
               | doesn't even make sense since free assent is necessary
               | for faith to be authentic anyway. All you'd get are
               | people pretending to believe to avoid unwelcome
               | consequences, and that's pointless and would constitute
               | fraud at best (for which they might not be culpable if
               | the coercion were severe enough). And FWIW Catholic
               | tradition as far as I know is more or less consistent in
               | at least suspecting that most CATHOLICS probably end up
               | in hell.
        
               | Arnavion wrote:
               | >This does not apply to monotheistic faiths. The first
               | problem is that they claim that their god is the only
               | god. The second problem is that they prescribe
               | punishments (death, eternal hellfire etc) for those who
               | do not accept their god.
               | 
               | No, your "second problem" does not apply to _all_
               | monotheistic faiths.
        
               | schoen wrote:
               | I think technically they are henotheistic or monolatrous
               | if they don't deny the existence and divinity of other
               | gods.
               | 
               | https://en.wikipedia.org/wiki/Henotheism
               | 
               | https://en.wikipedia.org/wiki/Monolatry
               | 
               | (although there are probably religious traditions that
               | don't have an explicit view or doctrine about some of
               | these questions, so they might be hard to classify in
               | this framework)
        
               | AnimalMuppet wrote:
               | Classifying communism as a monotheistic religion is... an
               | interesting take.
               | 
               | I'm not sure that I disagree. But I'm not sure that I
               | agree, either. I'm going to have to think about it. (This
               | is about the highest compliment that you can pay to an HN
               | comment.)
        
               | jl6 wrote:
               | Most religious texts don't admit a consistent reading, so
               | the degree to which live-and-let-live applies depends
               | almost entirely on interpretation and culture, and very
               | little on what the text actually says.
               | 
               | For example, most real-world Christians and Muslims are
               | highly tolerant of unbelievers in their everyday lives,
               | but that is _not_ what their books say.
        
               | [deleted]
        
             | [deleted]
        
             | r00fus wrote:
             | It all sounds so childish to me as a current atheist. Like,
             | who's sports team are you a fan? If not mine, then you're
             | against me.
             | 
             | In fact, an API that allows access to a religious text
             | should be useful for everyone - even those detractors of
             | said religion.
             | 
             | Next up, we need a legal code API and versioning.
        
               | cat199 wrote:
               | many subgroups of atheism, and many of those fight and
               | have fought each other..
               | 
               | agree 100% on legal code versioning - legislation should
               | be a version control diff with 'git blame' like things
               | for contributors ..
        
               | bobthechef wrote:
               | It's childish to have issues with someone making their
               | religious texts available via API just because they take
               | that religion to be false, yes. But you're sort of
               | erecting a strawman. I don't see anyone claiming "I hate
               | this API because I disagree with Islam.".
               | 
               | Also maybe this is it? Haven't checked. https://eur-
               | lex.europa.eu/content/help/webservice.html
        
               | cphoover wrote:
               | a law API makes sense to me because laws are updated all
               | the time, especially when you take into consideration all
               | the various jurisdictions. A Quran or biblical text API
               | makes less sense to me because it is essentially
               | unchanging static text until the religious doctrine is
               | amended.
        
               | CitrusFruits wrote:
               | Three things: 1. It may not be as unchanging as you
               | think. The different translations of the Bible (NIV, ESV,
               | NKJV, NASB, etc.) are a pretty important facet to many,
               | with newer translations coming to prominence in English
               | speaking communities every ten years or so (for better or
               | for worse, but that's another topic). I can't speak to
               | other religious texts, but keeping new translation
               | available could be enough of a reason alone to make an
               | API. 2. Having an API can facilitate internationalization
               | if you wanted to ship a project in other languages. 3.
               | Having an easy way for a computer to look up a particular
               | passage is a non-trivial problem to solve, and something
               | like this could give a huge jump start for hobby/personal
               | projects.
               | 
               | Yeah you could just download the Quran and reference it
               | locally or someone could (relatively) easily roll their
               | own version of this, but I think something like this is
               | nice and I can appreciate it's value, even if Islam isn't
               | my cup of tea.
               | 
               | [edited for clarity]
        
             | trutannus wrote:
             | Well, to take the example here of Islam, that's not
             | entirely correct. In Islam, those who are following Judaeo-
             | Christian belief systems are considered 'brothers of the
             | book' (or something to that effect). The worst that some
             | sects believe is that they are 'well meaning, but not aware
             | of the truth of Mohamed'. I'm specifically not talking
             | about radical Jihadist sects, but the more 'middle of the
             | road' Muslims who are closer to the average church going
             | American than an Al-Qaeda member.
        
               | icemelt8 wrote:
               | "People of The Book" Jesus is the most named person in
               | Quran, along with Mary.
        
               | omarfarooq wrote:
               | Ahlul-Kitab or People of the Book.
        
           | bastawhiz wrote:
           | I think it has less to do with the content of the API and
           | more to do with the fact that it's essentially a way to query
           | a small number of megabytes of structured data. You could
           | encode the whole thing as JSON or SQLite and eliminate the
           | network round trip (latency, security footprint, privacy
           | implications) entirely.
           | 
           | In fact, the memory usage required to establish a few TLS
           | sessions might even be greater than the size of the full
           | dataset.
        
           | mrd3v0 wrote:
           | >unless it is against the particular religion in question,
           | thus offending believers
           | 
           | Based on how many religions and sects of these religions out
           | there, it is entirely unfeasible to have that as a criteria
           | for anything. Human knowledge/text no matter what it contains
           | could have APIs just fine.
        
       | midoreigh wrote:
       | This is really useful. Please do an API for Hadiths too.
        
         | asim wrote:
         | Thank you. That's what I just started work on! It will be here
         | soon :)
        
       | kamranahmedse wrote:
       | What about the authenticity of the data?
        
       | yessirwhatever wrote:
       | If you understand Arabic and are interested in the exploration of
       | the history of Muhammad, Islam, and the Arabic language, I'd
       | recommend checking out https://www.youtube.com/c/KhaledBalkin
        
       | schoen wrote:
       | I took the view in this thread that downloading a file with the
       | whole text would have a lot of big advantages compared to an API.
       | A lot of other commenters have expressed this idea too.
       | 
       | But I want to highlight something from a comment of mine further
       | down: while looking for examples of downloadable sacred texts, I
       | found this page
       | 
       | https://hackathon.bible/data/
       | 
       | which has -- alongside downloads -- a _whole bunch_ of actively-
       | maintained APIs for Christian Bible verse access, some of them
       | run by pretty prominent organizations.
       | 
       | So, all of our intuitions about the merits of downloading sacred
       | texts to bundle with apps are, apparently, not entirely shared by
       | other developers. :-)
        
       | jjice wrote:
       | Seem like query parameters are going out of style. Doesn't really
       | matter if we use them or a small JSON payload instead, same end
       | result, but it is pretty interesting. This API opts for a body
       | like:                   {"chapter":1}
       | 
       | instead of ?chapter=1 in the URL. Just something I've noticed in
       | a lot of APIs recently.
        
         | jagged-chisel wrote:
         | POSTing a body, when a GET param is more RESTy, is unfortunate.
         | But I am curious if some amount of developer convenience is
         | leading to REST-like APIs (I like the way you put it) going out
         | of style.
         | 
         | A curiosity to be sure, and by no means a critical problem.
         | 
         | EDIT: added some commas to help with parsing since I have my
         | phrasing all turned about.
        
           | SahAssar wrote:
           | Query-params are not "un-RESTy", and posting when requesting
           | static data is worse primarily for caching and semantics.
           | 
           | For this usecase a ?chapter=1 query string would have been
           | better and not at all less "RESTy".
        
             | jagged-chisel wrote:
             | I think you're read my message in reverse. I've said that
             | POSTing is unRESTful when a GET is preferred.
        
               | SahAssar wrote:
               | Ah, yeah, seems I misunderstood!
        
           | trutannus wrote:
           | Wait until you come across an API that uses POST requests as
           | GET requests. Worked on one recently where all search
           | operations were submitted by POSTing the data. And it wasn't
           | even something like a "send a search request to a queue".
        
           | 1_player wrote:
           | It's not even a case of being RESTy or not.
           | 
           | A GET request with a `?chapter=1` argument is more correct
           | than POST because then it's cacheable by browsers, proxies or
           | middleware clients, and thus respects the spirit of the HTTP
           | protocol.
           | 
           | Only if the Qur'an is immutable, that is.
        
       | whitefirered wrote:
       | I am waiting for someone to make a spoof of Ask Jeeves called Ask
       | Allah.
        
       | cphoover wrote:
       | what is the point of an API for static data like this? storage is
       | cheap... why not just download the entire Quran, Bible, Torah,
       | whatever to your local hard drive... why incur network latency
       | for this task?
        
         | josephwegner wrote:
         | I am not familiar with the Quran, but for the Bible, different
         | translations have different copyright policies. For instance,
         | the ESV text is free for non-commercial use, but if you want to
         | use it for commercial purposes you must pay a licensing fee.
         | 
         | ESV has a pretty decent API, actually! https://api.esv.org/ I
         | used it way back when when Google TV was a thing, to make a
         | verse-display used during bible studies.
        
         | rocketpastsix wrote:
         | maybe they hope someone will do a verse (is it a verse in
         | Islam? I'm not sure) type app that will text that data to
         | subscribers or something.
        
           | yebyen wrote:
           | I think you mean Surah/Ayah (those are the expressions for
           | what in the Quran is akin to Chapter/Verse)
        
             | jagged-chisel wrote:
             | Linguistic curiosity: why would these expressions not be
             | translated into English?
        
               | icemelt8 wrote:
               | its perfectly ok to call it a verse. Dr Zakir Naik, calls
               | it Chapter/Verse in any of his speeches.
        
               | jdmichal wrote:
               | Domain-specific languages / jargon are not just a
               | computer science thing.
        
         | whitefirered wrote:
         | It might be easier to use an api instead of having to go
         | through it yourself.
        
           | bastawhiz wrote:
           | The alternative to the API is not plain text, it's structured
           | data like SQLite.
        
         | diskzero wrote:
         | Some people find joy and satisfaction in developing systems. I
         | don't have total insight on their plans, so I am not going to
         | ask "What is the point?" I prefer never to ask "What is the
         | point" to anyone unless somehow their efforts are providing a
         | net negative to the human condition.
         | 
         | Sometimes the "point" is because it can be done. Sometimes the
         | point is someone wants to learn about building an API and would
         | prefer to do it with the Quran rather than with movie quotes.
        
           | drooby wrote:
           | ....? Or maybe there is a interesting and expected answer
           | that provides a learning experience? It doesn't hurt to ask.
        
             | midev wrote:
             | > Or maybe there is a interesting and expected answer that
             | provides a learning experience?
             | 
             | Then it should be phrased like that. It's obvious the
             | original comment was phrased as a condescending question,
             | especially since they tried to answer it themselves.
             | 
             | There's a difference between genuine interest and trying to
             | show off how smart you are.
        
               | cphoover wrote:
               | So quick to offense. it wasn't meant to be condescending,
               | it was meant to be a serious technical critique of what
               | appears to be a publicly advertised product.
        
               | midev wrote:
               | > it wasn't meant to be condescending, it was meant to be
               | a serious technical critique of what appears to be a
               | publicly advertised product
               | 
               | Oh, I think everyone was confused because there was no
               | serious technical critique. You made a flippant comment
               | about disk space and network latency. Basic observations
               | that anyone building this would have considered.
               | 
               | You can see from all the comments that everyone viewed
               | you as condescending and unhelpful. You might want to
               | revisit your writing style, since your intentions are not
               | clear to anyone.
        
               | cphoover wrote:
               | Judging by the other comments in this thread and the
               | upvotes to my original comment, many people seem to agree
               | with me also.
               | 
               | you are an unpleasant person to talk with
        
             | diskzero wrote:
             | It never hurts to ask. It also never hurts to learn the
             | appropriate way to phrase questions that are genuine. For
             | some reason, a pattern develops in some people where they
             | think there is value is just asking why all the time. It is
             | best to stop and think before firing of your "Why didn't
             | you just use solution X". This rarely leads to constructive
             | dialog and instead generates a low-value conversation a lot
             | like job interview situations where poor interviewers are
             | trying to set up a candidate with why questions just so
             | they can unload some ego boosting bit of advice.
        
           | cphoover wrote:
           | woah woah calm down... I wasn't trying to insult anyone.
           | 
           | "I wanted to build a fun, cool project." Is a perfectly valid
           | answer.
           | 
           | I think there is value in people critiquing methods and
           | designs for various systems. If I were building some new
           | project I would want my peers to give me honest critique and
           | constructive probing. I make mistakes all the time and would
           | never learn from those mistakes if others didn't point them
           | out to me.
           | 
           | > "liabd 1 hour ago [-] This is awesome and will enable a
           | whole suite of apps to be build on top of it. Great work"
           | 
           | So even in this thread people are discussing adding this
           | service as a dependency to their own applications. I think if
           | you are building a project for yourself for fun that is one
           | thing... but If you advertise it for public use, criticism is
           | perfectly valid, and should be expected.
        
         | bserge wrote:
         | Scratching my head over this, too... I have over 50 ebooks on
         | my phone, it barely even registers compared to the videos and
         | apps. All perfectly searchable, too.
        
       | [deleted]
        
       | shaunxcode wrote:
       | This is brilliant.
        
       | asim wrote:
       | It's a shame this was flagged. It's unclear why.
        
         | b0rsuk wrote:
         | Likely because Muslims are very prickly.
        
           | vmception wrote:
           | For context, there are a lot of people that also only want
           | the Quran to be consumed in a certain way, such as original
           | language variant, possibly even publisher, binding format.
           | 
           | So English via API doesn't satisfy that.
        
           | asim wrote:
           | Could you elaborate?
        
           | dang wrote:
           | We've banned this account for religious flamewar. Not cool,
           | and not what this site is for.
           | 
           | https://news.ycombinator.com/item?id=28595832
           | 
           | If you don't want to be banned, you're welcome to email
           | hn@ycombinator.com and give us reason to believe that you'll
           | follow the rules in the future. They're here:
           | https://news.ycombinator.com/newsguidelines.html.
        
       | thendrill wrote:
       | What a great initiative! All important human know lage should
       | have free publicly available apis!
        
       | orliesaurus wrote:
       | Is it free?
        
         | asim wrote:
         | It is free yes
        
       | itisit wrote:
       | Verse'); DROP TABLE Quran; CREATE TABLE Progress;--
        
         | throwawayswede wrote:
         | Might as well `drop db religion` :)
        
           | bob229 wrote:
           | Love it!
        
           | bserge wrote:
           | I thought it was funny
        
           | dang wrote:
           | Please do not perpetuate religious flamewar on HN. It's not
           | what this site is for.
           | 
           | https://news.ycombinator.com/newsguidelines.html
        
             | [deleted]
        
         | dang wrote:
         | Religious flamewar will get you banned here. No more of this,
         | please.
         | 
         | https://news.ycombinator.com/newsguidelines.html
         | 
         | Edit: you've unfortunately been posting a lot of unsubstantive
         | comments to HN. Could you please not do that? We're trying for
         | something a bit different here.
        
         | 29athrowaway wrote:
         | https://www.genealogy.math.ndsu.nodak.edu/extrema.php
         | 
         | Go to the one with most descendants, then keep visiting the
         | descendant with most descendants.
         | 
         | See how the flags start changing. From Islamic scholars to
         | Italian to other European countries to American.
         | 
         | Did we learn anything today? What does this mean?
         | 
         | It means the only reason you have a computer today is because
         | the Islamic civilization passed the torch of knowledge to the
         | West. Then they got invaded by Mongols and we kept the flame
         | alive.
        
           | whitefirered wrote:
           | So Afghanistan is the most technologically advanced country.
        
             | 29athrowaway wrote:
             | I am talking about 1000 AD not 2000 AD.
             | 
             | Also, have you ever heard of UAE?
        
           | throwawayswede wrote:
           | > It means the only reason you have a computer today is
           | because the Islamic civilization passed the torch of
           | knowledge to the West.
           | 
           | Overstatement of the day.
        
             | nanis wrote:
             | Maybe, but not too far off.
             | 
             | Without the Ottoman Empire standing between Europe and
             | trade with Asia, there wasn't going to be much of a
             | motivation for exploring new trade roots.
             | 
             | In fact, had the Ottomans just built proper toll roads,
             | they may have held back the Reformation _and_ Renaissance
             | for a 100 or so years. So, even if the preservation of
             | mathematical and scientific knowledge during the dark ages
             | were not a factor, the world would have ended up a rather
             | different place.
             | 
             | I know in European and American histories the existence of
             | the Ottoman Empire and it's impact is not considered when
             | evaluating the external forces that were nudging societies
             | one way or another, but that does not mean there was just a
             | void in the Eastern Mediterranean.
        
               | 29athrowaway wrote:
               | Ottomans came much later. I am talking about the Islamic
               | golden age.
               | 
               | The Islamic world introduced paper to Europe and the book
               | translations that served as the basis for the
               | Reinassance.
               | 
               | https://en.wikipedia.org/wiki/Latin_translations_of_the_1
               | 2th...
        
               | bobthechef wrote:
               | > In fact, had the Ottomans just built proper toll roads,
               | they may have held back the Reformation _and_ Renaissance
               | for a 100 or so years.
               | 
               | Now sure I follow. The Reformation in my view was not an
               | inevitable advancement but an unnecessary disastrous
               | event (involving a good deal of looting by
               | protestantizing princes lusting after Church property)
               | that plunged Europe into disastrous religious wars. Why
               | would toll roads have slowed the arrival of this revolt
               | against the Church?
               | 
               | The Renaissance, pace the tidy myths we're taught in
               | schools, was not some clean break from the Middle Ages or
               | even a revolt, but a transition that was heavily indebted
               | to the Middle Ages (actually, in terms of philosophy, it
               | was kind of a mediocre period of history, save for
               | perhaps some exceptions). Are you claiming that
               | exploration was essential to the Renaissance? I'm not
               | sure I buy that.
               | 
               | > I know in European and American histories the existence
               | of the Ottoman Empire and it's impact is not considered
               | when evaluating the external forces that were nudging
               | societies one way or another,
               | 
               | I wouldn't generalize. Had the Ottomans conquered Vienna,
               | it is argued that this breach through the Alps would have
               | allowed the Ottomans to conquer the rest of Europe. Or at
               | least tried to. That much is taught in some European
               | countries.
        
       | killingtime74 wrote:
       | I'm sorry why wouldn't I just download the whole text? It's a
       | document?
        
         | marginalia_nu wrote:
         | I'm not a muslim, but I do build a lot of tools for myself (and
         | to a lesser degree for the public), and open APIs like these
         | are incredibly convenient. Saves me from having to do a lot of
         | data processing.
        
           | jhgb wrote:
           | I believe the gist of the question was "why provide remote
           | access to data that is just several megabytes in size?". You
           | could easily pack both the code AND all the data into a
           | single package. Equally convenient AND works offline at the
           | same time.
        
             | cphoover wrote:
             | good explanation summarizing my critique as well
        
         | jhgb wrote:
         | Didn't you hear? APIs are the new religion. ;)
        
         | pletnes wrote:
         | Is it freely available in a structured, machine readable <<here
         | is verse XX>> format?
         | 
         | I could ask the same for other holy texts, I guess.
        
           | jhgb wrote:
           | I bet pretty much all of them will be. People have all sorts
           | of weird hobbies, so for every holy text three thousand years
           | old, there will be at least six machine-readable versions.
        
         | asim wrote:
         | People may want to not only read but build apps, websites,
         | include the text, translate, etc. So it's more about
         | programmatic access to the text. If you see Quran.com this is
         | exactly what it does.
        
           | cphoover wrote:
           | why can't you have programmatic access to local data though?
           | Store the data in a sqlite database if you care to. there are
           | all sorts of different clients that interact with local or
           | embedded data
        
       | fredros wrote:
       | Checking chapter 9, verse 30 to check if god still wants
       | Christians and Jews to be annihilated.
        
         | dang wrote:
         | Religious flamewar will get you banned here. No more of this,
         | please.
         | 
         | https://news.ycombinator.com/newsguidelines.html
        
           | fredros wrote:
           | I often see anti-Christian rants here. I suggest you become
           | more supportive of free speech.
           | 
           | By the way I'm just paraphrasing a problematic verse. Go and
           | check yourself. Is it ok to link to hateful content?
           | 
           | Your rules though, noted.
        
             | dang wrote:
             | We crack down on religious flamewar regardless of which
             | religion is being flamed or doing the flaming. This is one
             | of the easier aspects of moderation, actually, because such
             | flamewars are easy to identify and relatively easy to
             | avoid.
             | 
             | https://hn.algolia.com/?dateRange=all&page=0&prefix=true&qu
             | e...
             | 
             | It's common for people to believe that the community and/or
             | the mods are biased against their side, but I can tell you
             | for sure that anti-Christian rants aren't any more ok on HN
             | than anti-any-other-religion rants. If you think you're
             | seeing otherwise, the explanation is almost certainly a
             | combination of:
             | 
             | (1) People tend to notice what they dislike and put a
             | stronger emphasis on it - https://hn.algolia.com/?dateRange
             | =all&page=0&prefix=true&que.... This leads to false
             | feelings of generality - https://hn.algolia.com/?dateRange=
             | all&page=0&prefix=true&que.... Usually the feeling is "the
             | community (or mods) are biased against my side". Literally
             | all sides end up feeling this. I guarantee you that people
             | on the other side feel just as aggrieved about it.
             | 
             | (2) We don't see everything that gets posted and it takes
             | time to moderate what we do see - https://hn.algolia.com/?d
             | ateRange=all&page=0&prefix=true&sor....
             | 
             | Now I need to ask you again to stop posting religious
             | flamewar comments because you just did it again. If you
             | keep that up, we are going to have to ban you.
        
               | fredros wrote:
               | Thanks for taking the time to explain the rationale. I
               | guess there are always subjective motives when
               | moderating.
        
               | dang wrote:
               | I'd be curious to hear what you find subjective in the
               | above, or what you think the motives are!
        
       | roschdal wrote:
       | What is the API call for the Four wives request?
        
       | pwnapple wrote:
       | This seems very similar to the work over at Quran.com and their
       | API: https://quran.api-docs.io/v4/getting-started/introduction
       | 
       | If you did use their resources, please cite/reference them :)
        
         | asim wrote:
         | Yes, we are building on that API. It's referenced here
         | https://github.com/micro/services/tree/master/quran.
         | Unfortunately we're having some issues with our readme
         | processing and haven't yet fixed. All credit will be given
         | where it is due.
        
       | croumet wrote:
       | Verse 9:30
       | 
       | The Jews say, "Ezra is the son of Allah "; and the Christians
       | say, "The Messiah is the son of Allah." That is their statement
       | from their mouths; they imitate the saying of those who
       | disbelieved [before them]. May Allah destroy them; how are they
       | deluded?
       | 
       | Come on dang, ban me for HATE FACTS.
        
       | fjfaase wrote:
       | Or just downloaded it as a PDF, from for example wikimedia:
       | https://upload.wikimedia.org/wikipedia/commons/b/b2/The_Holy...
        
         | midev wrote:
         | Or even buy a copy of the book! We can do anything if we throw
         | out all our requirements!
         | 
         | Can you explain how I'd make calls from a frontend to a PDF?
         | I'd like to include various search terms, and then get back
         | well-structured data.
         | 
         | Is this something PDF's recently started supporting?
        
       | roschdal wrote:
       | Jihad as a service.
        
       | b0rsuk wrote:
       | You might be interested in:
       | 
       | WILL A CAT WALK ON THE QURAN? 2ND EXPERIMENT (100% ARABIC
       | QURANS!)
       | 
       | https://www.youtube.com/watch?v=mBwvPJa0HPE
        
         | dang wrote:
         | Religious flamewar will get you banned here. No more of this,
         | please.
         | 
         | https://news.ycombinator.com/newsguidelines.html
        
       | oa335 wrote:
       | Revelation place and revelation order should be tagged with the
       | source (I.e. where that information is conning from), as it's not
       | 100% known in either Muslim canonical or western academic
       | histories, whereas this dataset makes it seems like it is a known
       | agreed upon fact.
        
       | 2Gkashmiri wrote:
       | cool
        
       | aliabd wrote:
       | This is awesome and will enable a whole suite of apps to be build
       | on top of it. Great work
        
       | hsn915 wrote:
       | You can download an xml or sql file from here
       | 
       | https://tanzil.net/download/
       | 
       | They also provide metadata for download
       | 
       | https://tanzil.net/docs/Quran_Metadata
       | 
       | If you instead send an http request to antoher server, you are
       | just introducing a pointless dependency in your system. It will
       | make your system generally slower because it will take more time
       | to get answers. There's absolutely no benefit.
        
         | foobarian wrote:
         | If you use the API, the service maintainer can transparently to
         | you switch to a better storage format, or query engine, or
         | invent a whole new CMS.
        
           | bastawhiz wrote:
           | Your phone can scan the whole dump in-memory, byte by byte
           | faster than your eyes can blink. If the query engine is the
           | problem, you've chosen a very bad query engine.
        
         | friendly_chap wrote:
         | I can think of a few:
         | 
         | - type safe clients provided by M3o
         | 
         | - reducing app/webapp/binary space by relying on APIs to get a
         | subset of the content you need
         | 
         | - a web interface to query the data
         | 
         | There are probably a few more, YMMV
        
           | hsn915 wrote:
           | How is it type safe? Type safety is worse for http calls
           | because you literlly have no idea at compile time what the
           | data will be. Where as, when all the data is in your
           | repository, you can verify the data matches what you expect.
           | 
           | Reudcing space? Really? The data is actually very small. Your
           | npm modules take a lot more space. If anything is really
           | cheap and not worth worrying about, it's disk space.
        
             | friendly_chap wrote:
             | Have a look at the Go clients for example. There are proper
             | type safe clients for each API generated form our protobuf
             | definitions.
             | 
             | > Type safety is worse for http calls because you literlly
             | have no idea at compile time what the data will be.
             | 
             | We promise we will return data as per API spec ;)
             | 
             | > The data is actually very small
             | 
             | For this particular example, I guess you are right.
             | 
             | Our vision is that all APIs will have uniform clients, docs
             | etc, so in aggregate it will provide a very convenient
             | workflow. So instead of downloading a.json and b.xml and
             | c.yaml (if possible at all due to size) and defining data
             | structures yourself, just import our library and you are
             | good to go.
             | 
             | But as I said, YMMV. If it's not your cup of tea, I
             | understand that too.
        
               | schoen wrote:
               | > We promise we will return data as per API spec ;)
               | 
               | Unfortunately, I don't think that an assumption about the
               | data that's returned from a web API based on a
               | developer's statement on an online forum is really what's
               | meant by "type safety". :-)
        
             | schoen wrote:
             | Above I suggested that reducing space could sometimes be
             | relevant -- I think interactive maps are a very familiar
             | example, although offline maps are _great_ for privacy and
             | for being able to use them in the wilderness.
             | 
             | Even though I don't think that the Quran API will benefit
             | many applications, you could probably envision some, like
             | very tiny embedded systems that don't have even megabytes
             | of spare local storage (but do have some kind of user
             | interface).
        
         | anosidium wrote:
         | So the entire Qur'an in XML or SQL file? Is that how some
         | Qur'an apps are able to provide offline reading?
        
           | donkeybeer wrote:
           | I hope my question isn't seen as rude, but have you worked on
           | a non-web app before? Its been the natural thing to bundle
           | all data needed offline and locally along with the app
           | throughout history. I emphasize I don't mean to sound rude,
           | your question just felt surprising to me. (It seems you are
           | been downvoted and I gave you an up personally.)
        
           | schoen wrote:
           | Probably so!
           | 
           | Here's a list of electronic text resources for the Christian
           | Bible
           | 
           | https://hackathon.bible/data/
           | 
           | of which (surprisingly to me) many are also APIs rather than
           | downloads. But there are lots of downloads like XML and text
           | files. One that I found of the King James Version translation
           | has lines like
           | 
           | Gen|4|26| And to Seth, to him also there was born a son; and
           | he called his name Enos: then began men to call upon the name
           | of the LORD.~
           | 
           | i.e. book of Genesis, chapter 4, verse 26, followed by an
           | ASCII string of that verse.
           | 
           | The Quran download mentioned in the grandparent comment at
           | 
           | https://tanzil.net/download/
           | 
           | includes text files with lines like
           | 
           | 2|150|ai au aaa aaWi aaa aa aii aai  aau a uu aaWu uuau aau
           | iaWa aua iWai aau uWaun iWa Waia aau iu aa aau aai aiuiWa iai
           | aau aaaWau aaua
           | 
           | i.e. surah 2, ayah 150, followed by a Unicode string of the
           | text of that ayah. (There's no "book" field because of the
           | sufficiency of the surah numbers.) This file is about 1.3
           | megabytes uncompressed, although of course it doesn't include
           | additional data that a user might want to have presented (the
           | transliterations or translations mentioned elsewhere in this
           | thread, for example).
           | 
           | There are probably lots of mobile apps that have graphics
           | files alone that are larger than this 1.3 megabyte Quran text
           | file. (Not that mobile apps are the only application for the
           | APIs or anything.)
           | 
           | Another online text at
           | 
           | https://www.sacred-texts.com/isl/htq/index.htm
           | 
           | gives each surah in a separate file (less convenient for
           | downloading, although you could still do it in a few
           | minutes!), so that ayah is
           | 
           | 150 wamin Haythu kharajta fawalWi wajhaka shaTra 'lmasjidi
           | 'lHarami  waHaythu ma kuntum fawalWuw wujuwhakum shaTrahu
           | liy'alWa yakuwna lilnWasi `alaykum HujWa@un ilWa 'lWadhiyna
           | Zalamuw minhum fala takhshawhum wa'khshawni~ wali'utimWa
           | ni`mati~ `alaykum wala`alWakum tahtaduwna
           | 
           | There's some kind of Unicode issue where the letters in the
           | second version seem to be connecting better (e.g. ma rather
           | than a), but my knowledge of Arabic isn't enough to make it
           | obvious to me whether the second one is a more correct
           | encoding or the first one is just making more assumptions
           | about the rendering or something.
        
         | Zababa wrote:
         | > If you instead send an http request to antoher server, you
         | are just introducing a pointless dependency in your system. It
         | will make your system generally slower because it will take
         | more time to get answers. There's absolutely no benefit.
         | 
         | To expand on that, here downloading the file is a way of
         | caching the data. Caching invalidation can be tricky, but for
         | something like this it's actually easy, so you can afford all
         | the benefits of a cache.
        
           | bastawhiz wrote:
           | What about the Quran is changing often enough for cache
           | invalidation to be a problem?
        
         | asim wrote:
         | Sometimes its a preference of use. If the API is simple and
         | easy to use, if it provides translations and transliterations
         | you prefer, if it means not needing to process xml or sql which
         | I believe a lot of us would prefer not to do.
        
           | schoen wrote:
           | Sure, at the cost of having something that usually has a
           | higher latency for lookups, that only works online, that
           | could have outages due to data center or network problems,
           | that could get hacked and made to return corrupted data, and
           | that may or may not be available forever.
           | 
           | Those seem like pretty high costs to me mainly to avoid
           | processing a local database. Especially if someone could wrap
           | the local database with a library that has the same interface
           | as the network API! (That library could stop being
           | maintained, but the failure modes are much narrower than the
           | failure modes of a network service.)
           | 
           | A lot of the comments in this thread are suggesting that an
           | API to search small public data is not a very productive
           | approach compared to having that data present locally in
           | programs that will use it. I can think of lots of advantages
           | that network APIs could have:
           | 
           | * querying nonpublic data (including nonpublic data that the
           | end user is fully entitled to access all of, but doesn't want
           | to cache on a mobile device because of its sensitivity)
           | 
           | * applying a sophisticated algorithm to the data
           | 
           | * offloading computation or storage to a more powerful device
           | 
           | * dealing with frequent updates or edits to the data
           | 
           | * ...
           | 
           | However, none of those seem to apply readily to the case of
           | searching a specific religious or literary text, because
           | downloading the complete text is usually a very practical
           | option. (I guess the "nonpublic data" part could also apply
           | because some of the translations and transliterations and
           | associated information might be under copyright, and the
           | copyright holder might choose to authorize the API but not
           | authorize bulk downloads of the database. That could also be
           | true for modern commentaries and annotations.)
           | 
           | The only other one that comes to mind for me in terms of
           | people's enthusiasm for this API approach (and indeed in the
           | comment I'm replying to) is
           | 
           | * developers are very used to querying web APIs (and don't
           | like writing their own parsers)
           | 
           | That's fair, but I feel like it's best mitigated by having
           | someone develop a reliable library for parsing a particular
           | database or dataset, with a nice API that the developers will
           | be happy with.
        
       ___________________________________________________________________
       (page generated 2021-09-20 23:01 UTC)