Code Monkey home page Code Monkey logo

Comments (39)

hkjels avatar hkjels commented on August 25, 2024

Why not a C-executable?

from clib.

tj avatar tj commented on August 25, 2024

or that, I started a c version but I need to finish it up :D

from clib.

jwerle avatar jwerle commented on August 25, 2024

I think a C version would be better !!

from clib.

hkjels avatar hkjels commented on August 25, 2024

Now there's dotc that uses npm and a naming-convention. The main purpose is to provide node-like imports, which c could really need. Personally I think dotc fills too many roles, but I guess the overall experience is pretty good.

from clib.

tj avatar tj commented on August 25, 2024

yeah I don't want any preprocessing requirements, one could also argue if you really need that your program itself is too large :D so it's a little "anti-substack" for a substack module, and you'll run into issues with macros and other globals, you might as well use a higher-level transpiler at that point

as far as npm goes, the extra indirection for management and super slow search is no good:

$ time dotc search
NAME                  DESCRIPTION                                                   AUTHOR                DATE              VERSION KEYWORDS
colors.cc             colors for C++                                                =divanvisagie         2013-09-19 18:18  0.0.0
log-timestamp.c       A logger function with the current timestamp prepended        =bahamas10            2013-10-02 21:29  0.0.2  log logger dotc timestamp
path.h                Split a delimited path string into a char array like the `$PATH` variable =werle    2013-10-03 15:57  0.0.2  path vairable string split
shift_register.cpp    shift_register class for working with 74HC595                 =wraithan             2013-10-04 23:11  0.0.5  dotc c c++ shiftregister 74HC595
uppercase.c           uppercase a string in-place in c                              =substack             2013-09-19 04:21  0.0.0  dotc c c++ preprocessor compile modul

real    0m54.997s

time dotc search
NAME                  DESCRIPTION                                                   AUTHOR                DATE              VERSION KEYWORDS
colors.cc             colors for C++                                                =divanvisagie         2013-09-19 18:18  0.0.0
log-timestamp.c       A logger function with the current timestamp prepended        =bahamas10            2013-10-02 21:29  0.0.2  log logger dotc timestamp
path.h                Split a delimited path string into a char array like the `$PATH` variable =werle    2013-10-03 15:57  0.0.2  path vairable string split
shift_register.cpp    shift_register class for working with 74HC595                 =wraithan             2013-10-04 23:11  0.0.5  dotc c c++ shiftregister 74HC595
uppercase.c           uppercase a string in-place in c                              =substack             2013-09-19 04:21  0.0.0  dotc c c++ preprocessor compile modul

real    0m3.707s

from clib.

stephenmathieson avatar stephenmathieson commented on August 25, 2024

imo, preprocessing = no; one of the projects i'm working on isn't be able to run c++, making dotc worthless

however, a c executable would be great. i've started converting clib-create to c, but i'm stuck at windows support (no access to a windows machine atm). is the eventual plan for clib-* to be c programs? if so, is windows a requirement?

from clib.

tj avatar tj commented on August 25, 2024

yeah I'd love to have it as something other than node, shell script, python, C, I wouldn't be able to maintain windows support though

from clib.

jwerle avatar jwerle commented on August 25, 2024

So is C what we're going to go with here? I think its a good idea to not be dependent on node

from clib.

dubcanada avatar dubcanada commented on August 25, 2024

If you do Linux or Mac I can maintain Windows. Do you have a working/semi working version?

from clib.

stephenmathieson avatar stephenmathieson commented on August 25, 2024

anyone making any progress on this? i'd like to start on #8, but don't want to clobber anyone's work...

from clib.

tj avatar tj commented on August 25, 2024

nope not yet. Go would be good as well :D

from clib.

hkjels avatar hkjels commented on August 25, 2024

The purist in me, says that this definitely should be written in C. Why Go?
Because it's nice?

from clib.

jwerle avatar jwerle commented on August 25, 2024

@hkjels I agree. Go is a fascinating language, but keeping this pure is more important. Using Go would be no different then sticking with the Node implementation. It is just another dependency.

@stephenmathieson Did you already have an implementation in mind?

@visionmedia What are your thoughts?

from clib.

stephenmathieson avatar stephenmathieson commented on August 25, 2024

@jwerle i've got a mostly working node impl, but i really don't want to go down that route. doing it in c would be best imo, but it's quite a lot more work haha. i'll start putting a poc together and will hopefully have someone to review soon-ish.

from clib.

jwerle avatar jwerle commented on August 25, 2024

@stephenmathieson I think sticking to C is the best route. We can make use of libcurl or libgit2 for package retrieval from github (or any remote?)

This was a little experiment (unfinished) I did a while ago https://github.com/jwerle/repo that makes use of libgit2.

What do you think?

from clib.

stephenmathieson avatar stephenmathieson commented on August 25, 2024

yeah, i've started with libcurl which reduces the work quite a bit. using libgit2 may be more interesting though

from clib.

jwerle avatar jwerle commented on August 25, 2024

@stephenmathieson +1 !

from clib.

dubcanada avatar dubcanada commented on August 25, 2024

@stephenmathieson I can help if you want some.

from clib.

tj avatar tj commented on August 25, 2024

well with Go you can distribute binaries no problem too, but C would be fine

from clib.

hkjels avatar hkjels commented on August 25, 2024

libcurl would be a better choice I think, It's simpler and you might have stuff in your repo that is not necessarily source-code, like Readme.md, designs etc. So using libgit your potentially downloading a whole lot of garbage that your code is not dependent of.

from clib.

dubcanada avatar dubcanada commented on August 25, 2024

I don't think it really matters, libcurl and libgit have the same amount of effort. Downloading a zip archive then unzipping it (which requires two libraries) vs using libgit to clone the repo.

I would prefer cloning the repo, therefore updates are as simple as git pull and it's easy to monitor when their is updates.

from clib.

stephenmathieson avatar stephenmathieson commented on August 25, 2024

@dubcanada atm, I'm just hitting raw.github.com via libcurl, much like component(1). no need for zip/etc

from clib.

jwerle avatar jwerle commented on August 25, 2024

@stephenmathieson wooooooot !

from clib.

hkjels avatar hkjels commented on August 25, 2024

@stephenmathieson Yeah, I think component got that part right. As I said, you wouldn't have to download a bunch of static garbage.

from clib.

thlorenz avatar thlorenz commented on August 25, 2024

👍 rewriting it in C since it would lead to higher adoption rate among ppl already doing C IMO.

from clib.

jwerle avatar jwerle commented on August 25, 2024

@thlorenz +1

from clib.

tj avatar tj commented on August 25, 2024

SGTM C it is :D

from clib.

jwerle avatar jwerle commented on August 25, 2024

woooooot !

from clib.

thlorenz avatar thlorenz commented on August 25, 2024

@visionmedia lmk if you need help and/or if this effort can be split up.
Would love to work on a real life project to practice my C ;)

from clib.

jwerle avatar jwerle commented on August 25, 2024

@thlorenz @visionmedia ditto !

from clib.

hkjels avatar hkjels commented on August 25, 2024

Nice. If the issue-list is updated, I might contribute a line or two myself.

from clib.

stephenmathieson avatar stephenmathieson commented on August 25, 2024

i've started porting the install command to c here: https://github.com/stephenmathieson/clib-install. gladly accepting any help :)

eventual plan is to integrate back into the clibs name when its stable-ish...

from clib.

hkjels avatar hkjels commented on August 25, 2024

@stephenmathieson I see that you've come quite far with the implementation, looks damn good 👍
What's next? I'd be more than happy to help out, so let me know if you want any help.

from clib.

jwerle avatar jwerle commented on August 25, 2024

@stephenmathieson @hkjels I think we need to solve the dependency issue. Do we want packages shipped with their dependencies?

from clib.

stephenmathieson avatar stephenmathieson commented on August 25, 2024

@hkjels thanks! i'll create some issues in regards to what still needs to be done

@jwerle right now, i'm installing everything listed in src, as well as dependencies listed like this. the eventual plan is to specify deps exactly like component(1) expects you to, and clib-install(1) will fetch them for you. you won't have to specify anything other than your source files in src.

from clib.

stephenmathieson avatar stephenmathieson commented on August 25, 2024

@hkjels i've created a ton of issues for clib-* and related projects. if you've got time/inclination, any help/suggestion would be most appreciated!

from clib.

jwerle avatar jwerle commented on August 25, 2024

Closing this as it is irrelevant. See #12

from clib.

mattn avatar mattn commented on August 25, 2024

Sorry for noisy. How about golang?

from clib.

haneefmubarak avatar haneefmubarak commented on August 25, 2024

@mattn purity, purity, purity 😆

from clib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.