Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    HE Chong
    @Ron89
    Well, to be frank, I know very little about web dev, and next to nothing about Javascript. But I have confidence in picking it up relatively fast if there is a need to use it.
    HE Chong
    @Ron89
    I do think it be better for a professional to be familiar with all existing paradigms of programming languages. But I don't think many, if any, would have been familiar with all languages. There is no reason for them to. For beginners, you can just start somewhere and then gradually expand your knowledge and experience. When you starts to get curious, you can watch some online courses or read some books/articles about different paradigms. And then you might get some better sense at this subject.
    I hate batch, and am hostile to anything Windows in general. So I can't comment anything about powerscript, which I only assume to be some cheap knock-off of (sh/bash) shell script.
    Cyric
    @Cyric263
    okay - sounds good
    a lot of the languages are similar
    i was reading what the differences were on javascript... i posted some of the articles i read about it on my site ... https://zack263.neocities.org/coding.html . basically Eric Elliot a javascript programmer talks about "functional programming" and javascript "prototype" instead of using classes. Another article claims javascript is eating all the other languages..but i'm not sure how much hype that is cause theres many languages.
    a lot of the traditional programers hate javascript and say it does things all wrong... but then Eric Elliot seems to think the traditional way of coding with classes is obsolete
    Cyric
    @Cyric263
    i think what Microsoft did in the 90s and what there doing now.. is to make everything work on windows.. so they can lure the people off linux.
    so the developers go work on there system
    i most did python.. id id the coarsera astroid free game programming class... it was very hard for me cause i didnt raelize it wasn't a beginner class.. i barely kept up
    mostly
    and i dable in javascript on my own
    i wouldn't recommend that particular python class
    basically there moving so fast that if u dont know how to code already.. you will have a hard time keeping up
    most of the basics looks the same in javascript and python to me
    lol
    python code looks a lot cleaner
    and easier to write
    but javascript has node.js
    but u would think u would use go language on the server side
    youwould think python could work on the server as well?
    cause it has a lot of administration procedures
    not sure if it does tho
    Cyric
    @Cyric263
    I installed NerdTree and ctrlP pluggins! they seem to work
    Cyric
    @Cyric263
    g00d-after noon Powerful-Spirits of the Universe!
    HE Chong
    @Ron89
    hmm, I never did code for server, so I wouldn't say I can offer my opinion on your question... I have friends claiming node-js is for everything. But then, so is Python. Frankly, if there is a project need me to use javascript, I will. But for now, Python is good enough for my need. Ultimately, language is just a tool to express whatever that is needed to be expressed. So at some point, we need to shift our attention from the language we use to what exactly do we want to do, I think...
    Good afternoon, oh, nope, it's mid-night here, lol
    Cyric
    @Cyric263
    I had an idea... i'm not sure why.. or if it is any good... is there a pluggin to make vim work as a tab in say a firefox browser? I'm not sure why this idea popped to my head... I suppose i saw a room called codemirror on gitterim.. that advertised a text editor in the browser... so i automatically thought why not vim in the browser, LOL
    i will duckduckgo search the topic
    omg - theres a vimb or vim file browser and a few other links i'll have to look at
    woah the design vimb webpage almost looks like it used word from microsoft
    Cyric
    @Cyric263
    bbl
    HE Chong
    @Ron89

    OK, I think it is the time I should remind you, this is a Gitter group for thesaurus_query.vim related discussion.

    Please don't treat it like some random discussion group...

    Cyric
    @Cyric263
    k
    HE Chong
    @Ron89

    Guys, I want to announce here that this plugin will no longer support thesaurus.com because it has taken legal action against its upstream Python project "thesaurus". Here is the email the author of that project sent to me few weeks ago.


    The fated day has arrived. Earlier today as I was enjoying a lecture on undecidability, I got an email: “Infringement of Dictionary.com’s Intellectual Property Rights”. Thought you should know.
    They want me to cease-and-desist by May 3rd. I don’t really know what happens to the forks at that point… I’m going to first try purging the master branch and replacing it with a README that explains the situation. This way, users can still click on the forks and find one to use. If the old code is still accessible somehow from my root url, I’ll probably have to delete the whole thing and then recreate the project at the same url, again with just a README.

    I recommend this guy’s fork: https://github.com/ryh95/thesaurus . He’s added asyncio support and logging. Probably doesn’t work on Python 2.

    Sigh. The world needs more Piratpartiets. One good thing might come of this— this lawyer’s going to get the best damn response imaginable. He’s going to think he accidentally emailed a crackhead poet.

    Thanks for your support,
    Robert Dominguez
    https://robertism.com

    For English query, currently the best thesaurus source would be OpenOffice's thesaurus database.
    Eloi Perdereau
    @perelo
    So sad for thesaurus.com :'(
    Eloi Perdereau
    @perelo
    I have a question on your plugin.
    I see that the function _datamuse_api_wrapper() in backends/datamuse_com_lookup.py have a query_method argument to search for antonyms or suggestions. I also added this argument for the french support with synonymo.fr but how can we use this ? Only synonyms are looked up. It would be great if :Thesaurus word would display the definition along the synonyms, and if nothing found, suggestions.
    HE Chong
    @Ron89
    Hi @perelo , currently I have only exposed synonym for replacement. Designing for anonym replacement is a bit awkward (I mean, I can't think of a case where you type in the exact opposite of what you want to say, then search for its anonym to replace it 😅) in text editing so I didn't expose it. But I think an expansion in query's functionality is possible.
    I am busy with graduation ceremony this weekend
    Will take a look and merge your PR before next weekend. Thank you for the new back end you made 😁😁😁
    Eloi Perdereau
    @perelo

    haha you're right about replacing words by their antonyms! Though, I like querying antonyms, so for now, I just made a small hack to do this for my french backends. Implementing it for real would require quite some refactoring imo.

    Moreover, I think your plugin is great but could benefit some improvements. Few things that came in mind right now :

    • fix missing space after last comma of the lists (done it in my fork)
    • use user-defaults of splitbelow and splitright instead of forcing belowright split
    • fix next and previous queries. The split gets on 1 line with a "--- More ---" prompt if I do 'n' then 'p'
    • possibility to 'n' and 'p' to query next and previous backends in query mode and not only replacement mode
    • maybe add buffer-local mapping <C-n> and <C-p> instead of 'n' and 'p' characters in a prompt
    • better algorithm for local thesaurus.txt queries (results are too long, how to truncate?)
    • maybe make a generic backend which searches in &thesaurus vim variable ? we should see how to integrate this with g:tq_language

    Anyhow, congratz! for your graduation :D :D I'm myself in the process of writing my PhD thesis in CS theory, and when motivation goes down, I 'sharpen my (vim) tools' ;)
    So let me know if you're interrested in pull request, and/or talking further!

    HE Chong
    @Ron89

    fix next and previous queries. The split gets on 1 line with a "--- More ---" prompt if I do 'n' then 'p'

    Yes, Vim's messaging system is not ideal for frequent user interaction. But currently I don't have much idea on what can be done on it.

    possibility to 'n' and 'p' to query next and previous backends in query mode and not only replacement mode

    The query mode was kind of an after-thought. But what you proposed is a good idea. To achieve this, we should allow the key press on thesaurus buffer to control the tq_framework's query session, and tq_framework.session_terminate() only when user leave the buffer.

    better algorithm for local thesaurus.txt queries (results are too long, how to truncate?)

    A truncate mechanism already exists, actually, you can truncate the result based on two criteria, albeit neither of them ideal:

    " This variable is for replacing candidate display. If value is -1, no
    " truncate of output is made upon number of definitions. Else, if number is n,
    " only synonyms of the first n word definitions were retained.
    if !exists("g:tq_truncation_on_definition_num")
        let g:tq_truncation_on_definition_num = -1
    endif
    
    " This variable is for replacing candidate display. If value is -1, no
    " truncate of output is made upon number of synonyms from a single definition.
    " Else, if number is n, only first n synonyms of that definition will be
    " retained.
    if !exists("g:tq_truncation_on_syno_list_size")
        let g:tq_truncation_on_syno_list_size = -1
    endif

    Glad to know that you are wrapping up with your phD as well~ It's always exciting moving from one phase of life into another. Mine was in Physics. Though nowadays I am working on Applied Cryptography in a small Software company. So... although I do enjoy myself these days, the Doctor I got was a wrong kind, I think 😅. Hopefully you'll have a better time finding interesting opportunity in consistent of what you studied.

    I think most of this plugin was created when I was spending most of my time writing. I made it to address my pain point of not being able to efficiently finding appropriate words while writing essays with Vim. As you are also spending most of your time writing nowadays, I believe you already have your assessment on addressing what problem can help you with your productivity the most. If you find some of the items you mentioned above addressing your pain point, please help with the feature development. PR is always welcomed~

    Aaron Hayman
    @ahayman

    @perelo Hi! So, I forked the repo and added a new backend for my own use: http://dictionaryapi.com (Merriam-Webster API). Is this something you would be interested in merging back into your repo? Here's the details of what the backend does:

    This is the Merriam-Webster API and as such is a very high-quality back end. However, it does require registration on their website as a developer in order to gain access to the API Keys. They do explicitly state that it is free for non-commercial use up to 1,000 queries a day, which should be sufficient for most needs. Make sure you select the Thesaurus api key, as that is what you will need in order for this backend to work.

    In order to use this backend, add dictionary_api_com to g:tq_enabled_backend and set your api key to g:tq_dictionary_api_key, ex:

    let g:tq_dictionary_api_key='cxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxa'

    This backend cannot work without an API key.

    The DictionaryApi.com backend returns several categories of information in this order:

    • Synonyms: The most relevant synonyms.
    • Related: Words that are no exactly synonyms, but can be considered related to the word in question.
    • Near: Words that are neither synonyms or antonyms, but are near by words.
    • Antonyms: The most relevant antonyms
    • Definitions: Short definitions. You can replace your word with these, but they're mostly there for information purposes.

    Also, if the word cannot be found, the API may sometimes return a list of word suggestions. These will be returned as Unknown word
    and allow you to choose a replacement from the list.

    Aaron Hayman
    @ahayman

    Also, the output is a little weird because you don't technically support anything but Synonyms. The output format ends up being something like:

    Found as: Synonyms
    Synonyms: .... word list
    Found as: Related
    Synonyms: ... word list
    ...

    I think it would probably look better if the Synonyms: tag said Select List: or Word List: or something like that, but I didn't want to hack the rest of the project to change it.

    Aaron Hayman
    @ahayman

    @Ron89 My apologies. Please see my posts above if you have time. I didn't even realize til now that I had originally pinged the wrong person.

    Also, I added a secondary option to the output format to break up synonyms only by the short definition. This may actually be the better default, as I think it aligns with your output format perfectly.

    Aaron Hayman
    @ahayman
    Okay, I'm not sure anyone is actually reading these messages, but I updated my fork to handle antonyms. I had to change the core code to do this, but antonyms are now bound to <leader>ca. Back-ends can optionally return antonyms by simply returning them as an additional list (identical to synonyms) in the query result. Those are then use only if <leader>ca (bound to: ThesaurusQueryReplaceCurrentWordAntonym, a new function) is used.
    Also, I noticed that use_cache wasn't actually being used. So I added a very simple caching system (basically a list). It's currently boundless, so I may limit the cache if I run into problems with memory. Honestly, on any moderately recent machine, I kind of doubt this will be a problem. I'll probably add a cache_limit variable, but for now I'm out of capacity. Gotta an actual job to do. :-)