Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A little chat #1

Open
thangngoc89 opened this issue Apr 5, 2016 · 5 comments
Open

A little chat #1

thangngoc89 opened this issue Apr 5, 2016 · 5 comments

Comments

@thangngoc89
Copy link

Continue from my blog's comment

Nice to read your introduction about my mdict-js project on GitHub. I have problem to "load/discover local dictionary file without interference from user himself once reconfigured". Do you have any idea? I suppose parsing mdd/mdx through XmlHTTPRequest is quiet dumb, even for local resources.
For a better reading experience with foreign language, I used to make a prototype like this:
http://www.hi-pda.com/forum/vi...
But the public online dictionary stopped to service, that's why I wrote mdict-js. Wish to share idea with you.

(Sorry, I know no Vietnamese. Thanks for Google translating service.)

I'm having trouble accessing Disqus from my country so I will continue the discussion here if it's OK with you.

As you probably know from my blog, I'm planing on building a truely cross-platform application for MDict using React and React Native. I have plan for Android, Linux and Windows (but it's easy to port to the rest thanks to React).

Now get to the point :

XmlHTTPRequest is quiet dumb

AFAIK, for security reason, there is no different way you can do this.

I looked at your project and it's a mess :( . I can refactor them to use npm as a dependencies manager and use Webpack as a build tool. This way, your MDict parser can be re-used elsewhere and decoupled from the website

@fengdh
Copy link
Owner

fengdh commented Apr 5, 2016

Glad to hear.

mdict-js is my hobby project under construction (actually suspending for a
while). Thanks if you can brush-up my code and turn it AMD/CommonJS/Node
compatible.

One reason for why mdict-js running so smooth inside browser is that the
parser reads as little as possible, never loading whole into memory.
File#slice(..) https://developer.mozilla.org/en/docs/Web/API/File works
for browser, but is XmlHttpRequest capable to read partial file (local
inside extension/app) as efficiently as local file assigned by user? I yet
get no resolution for this issue.

You work on React, while I'm now playing with Electron. :-).

2016-04-05 13:21 GMT+09:00 Khoa Nguyen [email protected]:

Continue from my blog's comment

Nice to read your introduction about my mdict-js project on GitHub. I have
problem to "load/discover local dictionary file without interference from
user himself once reconfigured". Do you have any idea? I suppose parsing
mdd/mdx through XmlHTTPRequest is quiet dumb, even for local resources.
For a better reading experience with foreign language, I used to make a
prototype like this:
http://www.hi-pda.com/forum/vi...
But the public online dictionary stopped to service, that's why I wrote
mdict-js. Wish to share idea with you.

(Sorry, I know no Vietnamese. Thanks for Google translating service.)

I'm having trouble accessing Disqus from my country so I will continue the
discussion here if it's OK with you.

As you probably know from my blog, I'm planing on building a truely
cross-platform application for MDict using React and React Native. I have
plan for Android, Linux and Windows (but it's easy to port to the rest
thanks to React).

Now get to the point :

XmlHTTPRequest is quiet dumb

AFAIK, for security reason, there is no different way you can do this.

I looked at your project and it's a mess :( . I can refactor them to use
npm as a dependencies manager and use Webpack as a build tool. This way,
your MDict parser can be re-used elsewhere and decoupled from the website


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#1

@thangngoc89
Copy link
Author

You work on React, while I'm now playing with Electron. :-).

Actually, I planed to use React with Electron.

So my plan is:

  • Rebuild the website with React (for easy prototype)
  • Port the website to Electron
  • Port the website to React Native (for Android app)

It's pretty easy with React when you get used to it.

I'll play around with your code this weekend and send some PR if I can :)

Again. Thanks for an nice project.

@jeka-kiselyov
Copy link

@thangngoc89 @fengdh guys, FYI. There's need for it for my server-side project, so I ported it to node.js: https://github.com/jeka-kiselyov/mdict Sad, but there's no backward compatibility(it doesn't run in browser, as uses fs library), so I published it as separate repository, not submiting pull request to this one. So, if somebody can merge that 2 options, it would be cool.

@fengdh thanks for your work. That job you did here with binary data is real magic.

@A1bertY
Copy link

A1bertY commented Feb 5, 2018

dear fengdh,
you have done an excellent work! but I have two questions about your project
1.will you add css support to the program later?
2.how did you deploy dynamic nodejs code to github pages? As far as I know githubpags can only
support deployment of static pages.
Best Regards,
CraziNerdi

@fengdh
Copy link
Owner

fengdh commented Feb 5, 2018

Hi, CraziNerdi.

  1. What you look at http://fengdh.github.io/mdict-js/ is a prototype to demonstrate my little pure JavaScript implemented mdict parser and a reference renderer for browser. Not a full-fledged product. At this time, I have no intention or time to put more effort on the prototype. But you can improve it by yourself anyway, it's open and free. If you need help, just ask me any question.

  2. It is correct that Github pages can support only static pages, which is exactly how http://fengdh.github.io/mdict-js/ works. It consists only a set of static html/js/css files. You upload a *.mdx with optional *.mdd file, the page parse its header and render what you look up all in LOCAL browser. It will never transfer any file & data to an non-existed magic server behind at all.

You are welcome.
Feng

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants