Git Product home page Git Product logo

util's Introduction

Util

Build Status

A ligthweight cross-platform C++ library.

Support Unix & Windows.

Currently can run on MacOS/Linux/Windows.

  • any type
  • typeinfo
  • lexicalcast
  • std::string extension
  • filesystem
  • config file
  • net
  • thread
  • timer
  • csv
  • process
  • regex
  • json
  • trace
  • lua extension
  • unittest

How to build

  • Install cmake
  • Install mingw (On windows)

Build luaexec: execute command "python make.py" on terminal

luaexec is an extended lua script executor which contains basic lua & util extensions (platform, string-ext, file, memory, net, regex, csv, config, cmdline) which is provided by Util lib.

How to get or extend more useful lib written by lua

Run "./luaexec install_luaexeclib.lua" on terminal, it will install the libs in luaexeclib to lua system searching path. Then you can use the libs with "require". e.g.local json = require('json'), which is really easy to use and extend.

How to do unittest

Run "python make_and_test.py". All cpp tests and lua test will run.

How to test on linux if you are using MacOS or Windows

  • Install docker
  • Run "python linux_env.py", you'll be taken to a linux shell container where current dir volumed to container working path.
    • Run "python3 clear.py" in linux shell container to make working clean.
    • Run "python3 make_and_test.py" to do unittest on linux.

util's People

Contributors

jie-meng avatar shawvi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ifzz linecode shawvi

util's Issues

Fix DateTime weekday, yearday bug.

In tm struct of C language, range of week day is [0-6].

  • Sunday 0
  • Monday 1
  • Tuesday 2
  • Wensday 3
  • Thursday 4
  • Friday 5
  • Saturday 6

Make a weekday enum replace raw in values.

Year day range is [0-356].

Refactor luaextend

Move all lua extends (global, file, cfg, net, thread, process, csv, regex ...) to util namespace.

Make lua extends as lua gc objects

Current lua extends objects need to call a destroy method to delete. It is usually be forgotten.

So do some investigate on lua file object, learn how to make extends objects like that.

Unittest

Since Util can run on Linux/MacOS/Windows now, a unit-test should be implemented to ensure Util library works correctly.

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.