GithubHelp home page GithubHelp logo

yonaba / 30log Goto Github PK

View Code? Open in Web Editor NEW
442.0 442.0 53.0 732 KB

30 lines library for object orientation in Lua

Home Page: http://yonaba.github.io/30log

License: Other

Shell 5.22% Lua 94.78%
lua object-oriented oop-library

30log's Introduction

  • 👋 Hi, I’m @Yonaba
  • 👀 I’m interested in Hydrological Modelling, R programming, Land use/Land cover mapping, Land change modelling.
  • 🌱 I’m currently learning all of the above 💞️
  • 💞️ I’m looking to collaborate on all of the above, with a focus on arid/semiarid contexts.
  • 📫 I can be reached through email ([email protected]).

30log's People

Contributors

dynodzzo avatar frqnck avatar gitter-badger avatar originalfoo avatar rm-code avatar tst2005 avatar yonaba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

30log's Issues

Subclasses retain old members after changes to superclass

If a class member is replaced after another class has extended from it, the derived class retains the old value. However, if a new member is added, the derived class does see the new value. This is because extend both copies all the class members to the derived class (presumably to avoid the performance cost of having to potentially walk up a deeply nested metatable hierarchy), and also sets the superclass to be the metatable of the derived class.

local Fruit = class("Fruit")
function Fruit:print_thing()
  print("Original function!")
end

local Apple = Fruit:extend("Apple")

Fruit.print_thing = function()
  print("Replaced function!")
end

Fruit.new_thing = function()
  print("A function added after extend!")
end

local a_fruit = Fruit()
local an_apple = Apple()
a_fruit:print_thing()  -- Replaced function! [ok]
an_apple:print_thing() -- Original function! [bad]
an_apple:new_thing()   -- A function added after extend! [ok]

I don't have a good solution, so this is more of an FYI that changing classes on the fly (e.g., in a live coding environment) can have unexpected behavior.

the "1log"

Technically, because of how lua works, you could make it all in one line if you get rid of new lines

`extends` doesn't work anymore?

I have a problem using extends: Using extends returns a class but with an empty "self" (no access to super).

class = require "vendors.30log.30log"

Card = class { __name = "Card" }

function Card:__init()
    self.test1 = "1"
end

Actor = Card:extends { __name = "Actor" }

function Actor:__init()
    self.super.__init()
    self.test2 = "2"
    for k, v in pairs( self ) do
        print( k .. ": " .. v .. "\n" )
    end
end

test = Actor()

Returns the following message:

lua: test.lua:12: attempt to index field 'super' (a nil value)
stack traceback:
    test.lua:12: in function '__init'
    ./vendors/30log/30log.lua:35: in function <./vendors/30log/30log.lua:32>
    (tail call): ?
    test.lua:19: in main chunk
    [C]: ?

I runed telescope on 30log and everything is OK.

the table is not copy~~

my code:
var Obj = class("Obj", {
tab = {}
})

var o1 = Obj:new()
var o2 = Obj:new()
o2.tab.x = "BiuBiuBiu"

print(o1.tab.x) --BiuBiuBiu
print(o2.tab.x) --BiuBiuBiu

it`s a bug? or I understand the wrong?

Troublesome deep-copy on object instantiation

Described in detail here, along with an explanation of how it affects that particular project.

Specifically, this is a feature request for either entirely scrapping deep-copy on instantiation, or allowing 30log to be configured in such a way that it doesn't happen. Deep-copy on inheritance isn't an issue (or rather, it's a separate issue that doesn't happen to affect us right now; see #29).

It looks like we'll be scrapping 30log for now because of this, but the library in question is designed to allow arbitrary class modules to be plugged in by the user. Ideally the user would be able to plug 30log back in without adversely affecting performance and breaking automated tests.

The fact that classes are metatables of their instances is not documented

It probably should be, because knowing this feature allows concise implementations of objects with, say, arithmetic operators.

The feature is particularly useful for implementing declarative interfaces:

local List = class()
function List:__init(...)
   return self(...)
end
function List:__call(x)
   table.insert(self, x)
   return self
end

local list = List "foo" "bar" "baz"
for _, v in ipairs(list) do
   print(v)
end
-- Prints: foo bar baz

The only problem is that access to metatables is raw, so metamethods won't work in derived classes.

Double class inheritence super

I have three classes, two inheriting from the / and calling the previous, IE:

local ClassOne = Class 'One'
function ClassOne:init ( ... )
end 

local ClassTwo = ClassOne:extend 'ClassTwo'
function ClassTwo:init ( ... )
  print (self.super) -- Still prints ClassTwo
  self.super.init  ( ... )
end 

local ClassThree = ClassTwo:extend 'ClassThree'
function ClassThree:init ( ... )
   self.super.init ( ... )
end 

When my code calls ClassTwo from ClassThree, ClassTwo's super is set to itself. I can assume this is because I am relying on double inheritance. Is there any workaround for this, or am I doing something wrong?

Stack overflow when adding static instance.

When adding a static instance to a class like following :

aClass = class("aClass")
aClass.staticInstance1 = aClass()
aClass.staticInstance2 = aClass()
return aClass

It makes the library explode, and throwing a StackOverflow error. This is due to the deep_copy function, which will copy the class, and it static instance, and the class of the static instance, and so on .

Mixin is not working when :new method is present

Modified example from https://github.com/Yonaba/30log/wiki/Mixins is not working. I just added :new method to example from wiki. It raise an error:

attempt to index local 'aWindow' (a nil value)

I use 30log in Corona SDK. After removing :new method there is no errors:)

-- A simple Geometry mixin
local Geometry = {
  getArea = function(self) return self.width * self.height end
}

-- Let us define two unrelated classes
local Window = class ("Window", {width = 480, height = 250})
local Button = class ("Button", {width = 100, height = 50, onClick = false})

function Window:new( name, value )
  self.name = name
  self.value = value
end 

-- Include the "Geometry" mixin in Window and Button classes
Window:with(Geometry)
Button:with(Geometry)

-- Let us define instances from those classes
local aWindow = Window()
local aButton = Button()

-- Instances can use functionalities brought by Geometry mixin.
print(aWindow:getArea()) -- outputs 120000
print(aButton:getArea()) -- outputs 5000

Methods can't be used in initializer

Hello!
It seems that class methods can't be used inside initializer:

local class = require "30log"
local foo = class()
function foo:__init()
    self:some_method()
end
function foo:some_method()
    print("foo:some_method")
end
local instance = foo() -- error: attempt to call method 'some_method' (a nil value)

I guess it happens because initializer is called before the class metatable is assigned to the instance.

Need help on using new()

Hello, I get errors as below while calling new()

/usr/local/share/lua/5.1/30log.lua:12: new() should be called from a class.

This error source from here.

How can I bypass this error?

Since I am using factory pattern like following

-- Where moduleName is an object created by 30log
function factory:createCommandUnit(moduleName):
   return require(moduleName)
end

-- Calling in main()
cmd = factory:createCommandUnit('command_date')
cmdInstance = cmd:new() -- get errors here

Although there is a new version available, there are so much changed which breaks my original codes.

`new` don't assign a new table?

Hi, I encounter the following error: using new to create new instance doesn't seems to create a new table if an another one already exists. This cause data overwriting in loops for example.

debug

As you can see on the screenshot the memory address is already the same.

Inheritance and super

Hello folks! These days I was trying to extend a polygon from HardonCollider and use super to overwrite the polygon constructor using plain 30log syntax. Here is my example:

class = require '30log'
polygon = require 'hardoncollider.polygon'

Tile = class():extends(polygon)
function Tile.__init(x,y)
Tile.super.__init(x+1, y+1, x+2, y+2, x+3,y+3)
end
tile = Tile(5,7) -- big error here

What am I missing?

Bump lua version number to 5.4? All tests pass.

PS E:\dev\lua\30log> tsc -f specs/*.lua
------------------------------------------------------------------------
:cast() method:
cannot be called from a class                                        [P]
when called from an instance, it expects a class as argument         [P]
it does not call :init()                                             [P]
When a cast is made, it changes the instance's superclass:
  instance.class points to the new class                             [P]
  as well as instance:instanceOf()                                   [P]
  and also getmetatable                                              [P]
  instance looses access to its old class methods                    [P]
  but it has access to its new class methods                         [P]
  cast() will not affect an instance attributes, though              [P]
------------------------------------------------------------------------
class():
calling class() with no arguments:
  returns a new class                                                [P]
  this class is unnamed                                              [P]
calling class(name):
  returns a new class                                                [P]
  this class has the given name set                                  [P]
calling class(name, params):
  returns a class with attributes already set                        [P]
------------------------------------------------------------------------
class():
returns a class                                                      [P]
tostring(class) returns a string representing a class:
  it works for named classes                                         [P]
  and also for unnamed classes                                       [P]
------------------------------------------------------------------------
a class should have the following methods:
a method named "new"                                                 [P]
a method named "create"                                              [P]
a method named "extend"                                              [P]
a method named "classOf"                                             [P]
a method named "subclassOf"                                          [P]
a method named "instanceOf"                                          [P]
a method named "cast"                                                [P]
a method named "subclasses"                                          [P]
a method named "instances"                                           [P]
a method named "with"                                                [P]
a method named "includes"                                            [P]
a method named "without"                                             [P]
------------------------------------------------------------------------
a class also implements some attributes:
an attribute "name" which gives the class name                       [P]
yet it returns nil in case the class is unnamed                      [P]
it also has an attribute "super" which is nil by default             [P]
but holds a reference to the superclass of a class                   [P]
it also has some private attributes                                  [P]
and some private metamethods meant for its instances                 [P]
------------------------------------------------------------------------
attributes can be defined:
after initialization                                                 [P]
or while creating them                                               [P]
passed-in attributes can be used to set the class name               [P]
but they will not override the name argument if supplied             [P]
subclasses also have access to their superclass attributes           [P]
and they also have their own copy of their superclass attributes     [P]
------------------------------------------------------------------------
methods can also be defined:
they are set as function member within the class                     [P]
subclasses also have access to their superclass methods              [P]
but they can redefine their own implementation                       [P]
------------------------------------------------------------------------
30log-commons:
Existence of common.class                                            [P]
Existence of common.instance                                         [P]
Creating a class                                                     [P]
Instantiation                                                        [P]
accessing members                                                    [P]
Inheritance                                                          [P]
Calling members                                                      [P]
Initializer                                                          [P]
Inherited Initializer                                                [P]
Initializer available in derived classes                             [P]
------------------------------------------------------------------------
Instantiation:
instances are created via new()                                      [P]
or via a class call, as a function                                   [P]
an instance can also be created via create()                         [P]
calling new() or a function call triggers init() function            [P]
but create() allocates an instance without calling init() functi...  [P]
instances have access to their class methods                         [P]
instances cannot instantiate new instances                           [P]
------------------------------------------------------------------------
init() method:
is not mandatory                                                     [P]
is used as an initialization function when instantiating with ne...  [P]
or via a class call                                                  [P]
------------------------------------------------------------------------
init can also be a table:
its keys will be copied into the new instance                        [P]
------------------------------------------------------------------------
tostring(instance) returns a string representing an instance:
it works for instances from named classes                            [P]
and also for instances from unnamed classes                          [P]
------------------------------------------------------------------------
attributes:
instances takes by default their class attributes values             [P]
these attributes are independant copies                              [P]
modifying them will not affect the class attributes                  [P]
------------------------------------------------------------------------
methods:
instances have access to their class methods                         [P]
but instances cannot call some class methods, such as:
  new()                                                              [P]
  create()                                                           [P]
  extend()                                                           [P]
  classOf()                                                          [P]
  subclassOf()                                                       [P]
  subclasses()                                                       [P]
  instances()                                                        [P]
  with()                                                             [P]
  includes()                                                         [P]
  without()                                                          [P]
------------------------------------------------------------------------
Introspection:
class.isClass(class):
  returns true if given a class                                      [P]
  and false if given an instance or anything else                    [P]
class.isInstance(instance):
  returns true if given an instance from any class                   [P]
  and false if given a class or anything else                        [P]
class/instances relationships can be inspected:
  classOf():
    returns true if the argument is a direct subclass                [P]
    Or the subclass of any of its subclasses                         [P]
  subclassOf():
    returns true if the argument is a direct superclass              [P]
    Or the superclass of any of any of its superclasses              [P]
  instanceOf():
    returns true if the argument is a direct class                   [P]
    Or any superclass of its direct class                            [P]
subclasses():
  returns the full list of a class's subclasses                      [P]
  can also receive an optional filter                                [P]
instances():
  returns the full list of class's instances                         [P]
  can also receive an optional filter                                [P]
------------------------------------------------------------------------
Lua 5.1.x metamethods are supported:
by instances of a class:
  __add is supported                                                 [P]
  __sub is supported                                                 [P]
  __mul is supported                                                 [P]
  __div is supported                                                 [P]
  __mod is supported                                                 [P]
  __pow is supported                                                 [P]
  __unm is supported                                                 [P]
  __concat is supported                                              [P]
  __eq is supported                                                  [P]
  __lt is supported                                                  [P]
  __le is supported                                                  [P]
  __call is supported                                                [P]
  __metatable is supported                                           [P]
  __mode is supported                                                [P]
by instances of a class' subclasses, except "__call" and "__mode...:
  __add is supported                                                 [P]
  __sub is supported                                                 [P]
  __mul is supported                                                 [P]
  __div is supported                                                 [P]
  __mod is supported                                                 [P]
  __pow is supported                                                 [P]
  __unm is supported                                                 [P]
  __concat is supported                                              [P]
  __eq is supported                                                  [P]
  __lt is supported                                                  [P]
  __le is supported                                                  [P]
  __metatable is supported                                           [P]
------------------------------------------------------------------------
Lua 5.2.x metamethods are supported:
by instances of a class:
  __len is supported                                                 [P]
  __pairs is supported                                               [P]
  __ipairs is supported                                              [U]
by instances of a class' subclasses:
  __len is supported                                                 [P]
  __pairs is supported                                               [P]
  __ipairs is supported                                              [U]
------------------------------------------------------------------------
Lua 5.3.x metamethods are supported:
by instances of a class:
  __band is supported                                                [P]
  __bor is supported                                                 [P]
  __bxor is supported                                                [P]
  __shl is supported                                                 [P]
  __shr is supported                                                 [P]
  __bnot is supported                                                [P]
  __idiv is supported                                                [P]
  __gc is supported                                                  [P]
by instances of a class' subclasses, except "__call" and "__mode...:
  __band is supported                                                [P]
  __bor is supported                                                 [P]
  __bxor is supported                                                [P]
  __shl is supported                                                 [P]
  __shr is supported                                                 [P]
  __bnot is supported                                                [P]
  __idiv is supported                                                [P]
  __gc is supported                                                  [P]
------------------------------------------------------------------------
mixins:
with():
  adds mixins to classes                                             [P]
  only functions are included                                        [P]
  including a mixin twice raises an error                            [P]
  with() can take a vararg of mixins                                 [P]
  or just use chaining                                               [P]
  a subclass has access to the new methods                           [P]
  an instance has also access to the new methods                     [P]
includes:
  returns true if a class includes a mixin                           [P]
  and also when a superclass of the class includes a mixin           [P]
without():
  removes a given mixin from a class                                 [P]
  removing a mixin which is not included raises an error             [P]
  can also take a vararg of mixin                                    [P]
  or just use chaining                                               [P]
------------------------------------------------------------------------
require("30log"):
should return a table                                                [P]
this table should contain the following keys and values::
  a function named "isClass"                                         [P]
  a function named "isInstance"                                      [P]
it should also contain the following fields::
  a _DESCRIPTION field, type string                                  [P]
  a _VERSION field, type string                                      [P]
  a _URL field, type string                                          [P]
  a _LICENSE field, type string                                      [P]
class table should be callable                                       [P]
------------------------------------------------------------------------
require("30log-global"):
set a global "class"                                                 [P]
------------------------------------------------------------------------
30log is distributed with a default singleton class implementatio...:
This SingletonClass:
  is recognized as a class                                           [P]
  is named "Singleton"                                               [P]
  this class cannot instantiate                                      [P]
  and cannot be derived to make new classes.                         [P]
  It implements a method named "getInstance"                         [P]
  which returns a private local instance of the SingletonClass       [P]
------------------------------------------------------------------------
Derivation:
extend():
  when called with no argument, returns a subclass                   [P]
  it can also takes a table with named keys to define new attribu... [P]
a subclass' superclass can be retrieved:
  via its "super" attribute                                          [P]
  via "getmetatable(), as a superclass is the metatable of its su... [P]
a subclass:
  has an attribute "super" pointing to its superclass                [P]
  can instantiate objects, just as a regular class                   [P]
  shares its superclass' attributes                                  [P]
  shares its superclass' methods                                     [P]
  can override its superclass methods                                [P]
  leaving the original superclass method untouched                   [P]
class creation:
  can chain                                                          [P]
Initialization:
  can chain                                                          [P]
------------------------------------------------------------------------
184 tests 182 passed 371 assertions 0 failed 0 errors 2 unassertive 0 pending
PS E:\dev\lua\30log> lua -v
Lua 5.4.2  Copyright (C) 1994-2020 Lua.org, PUC-Rio
PS E:\dev\lua\30log>

Subclasse "capture" super's __subclasses entry

Title says it all. Code says it better than words, so, here is a code demonstration (with the irrelevant entries stripped from the tables):

local Class = require "30log.30log-clean"
local Base  = Class("Base")
-- class 'Base' (table: 0x23656b0) * {
--   __subclasses : table: 0x2365980 * {
--                    },
-- }
local Sub1 = Base:extend("Sub1")
-- class 'Base' (table: 0x23656b0) * {
--   __subclasses : table: 0x2365980 * {
--                       class 'Sub1' (table: 0x2367ee0) : true,
--                    },
-- }
-- class 'Sub1' (table: 0x2367ee0) * {
--   super : class 'Base' (table: 0x23656b0) * {
--                __subclasses : table: 0x2365980 * {
--                                    class 'Sub1' (table: 0x2367ee0) : true,
--                                 },
--             },
--   __subclasses : table: 0x23680c0 * {
--                       class 'Sub1' (table: 0x2367ee0) : true,
--                    },
-- }
local Sub2 = Base:extend("Sub2")
-- class 'Base' (table: 0x23656b0) * {
--   __subclasses : table: 0x2365980 * {
--                       class 'Sub1' (table: 0x2367ee0) : true,
--                       class 'Sub2' (table: 0x236a490) : true,
--                    },
-- }
-- class 'Sub1' (table: 0x2367ee0) * {
--   super : class 'Base' (table: 0x23656b0) * {
--                __subclasses : table: 0x2365980 * {
--                                    class 'Sub1' (table: 0x2367ee0) : true,
--                                    class 'Sub2' (table: 0x236a490) : true,
--                                 },
--             },
--   __subclasses : table: 0x23680c0 * {
--                       class 'Sub1' (table: 0x2367ee0) : true,
--                    },
-- }
-- class 'Sub2' (table: 0x236a490) * {
--   super : class 'Base' (table: 0x23656b0) * {
--                __subclasses : table: 0x2365980 * {
--                                    class 'Sub1' (table: 0x2367ee0) : true,
--                                    class 'Sub2' (table: 0x236a490) : true,
--                                 },
--             },
--   __subclasses : table: 0x236af80 * {
--                       class 'Sub1' (table: 0x2367ee0) : true,
--                       class 'Sub2' (table: 0x236a490) : true,
--                    },
-- }
local SubSub2 = Sub2:extend("SubSub2")
-- class 'Base' (table: 0x17614c0) * {
--   __subclasses : table: 0x1761790 * {
--                       class 'Sub1' (table: 0x1761a10) : true,
--                       class 'Sub2' (table: 0x1762140) : true,
--                    },
-- }
-- class 'Sub2' (table: 0x1762140) * {
--   __subclasses : table: 0x1762320 * {
--                       class 'Sub2' (table: 0x1762140) : true,
--                       class 'SubSub2' (table: 0x1762870) : true,
--                       class 'Sub1' (table: 0x1761a10) : true,
--                    },
--   super : class 'Base' (table: 0x17614c0) * {
--                __subclasses : table: 0x1761790 * {
--                                    class 'Sub1' (table: 0x1761a10) : true,
--                                    class 'Sub2' (table: 0x1762140) : true,
--                                 },
--             },
-- }
-- class 'SubSub2' (table: 0x1762870) * {
--   super : class 'Sub2' (table: 0x1762140) * {
--                __subclasses : table: 0x1762320 * {
--                                    class 'Sub2' (table: 0x1762140) : true,
--                                    class 'SubSub2' (table: 0x1762870) : true,
--                                    class 'Sub1' (table: 0x1761a10) : true,
--                                 },
--                super : class 'Base' (table: 0x17614c0) * {
--                             __subclasses : table: 0x1761790 * {
--                                                 class 'Sub1' (table: 0x1761a10) : true,
--                                                 class 'Sub2' (table: 0x1762140) : true,
--                                              },
--                          },
--             },
--   __subclasses : table: 0x1762a10 * {
--                       class 'Sub2' (table: 0x1762140) : true,
--                       class 'SubSub2' (table: 0x1762870) : true,
--                       class 'Sub1' (table: 0x1761a10) : true,
--                    },
-- }

Inheritance and super

I'm trying some code with 30log and hardon and things do not going as smoothly as I expected. Look at this code:

require '30logclasscommons'
Polygon = require 'hardoncollider.polygon'

Tile = common.class('Tile', {
  init = function(self, x, y, color)
    self.color = color
    self.super:init(
        x, y,
        x+10, y,
        x+10, y+20, 
        x, y+20)
  end
}, Polygon)
tile = common.instance(Tile, 10, 12, 0x00abcd)
print(tile:unpack()) -- this does not work
print(tile.super:unpack()) -- this works

Shouldn't both work?

isClass return false when using multiple 30log instances

Because of the way isClass works, it returns false if you are using multiple 30log instances when you check for a class from another instance.

For example when you have a subproject with it's own 30log library. Then you can not check for classes from that subroject in your main project wich is also using it's own 30log from another subfolder/file.

This is not much of an issue, if you are in control of the subproject because you can check for a global 30log or something with a simple workaround.

But maybe you have an idea to solve that kind of problem? Maybe with an (optional) global classes-table or something?

No easy way to clone classes.

Deep copying a class causes a stack overflow due to the __index variable, class won't function properly even when setting __index properly.
Using the provided class.clone function from here keeps classes within classes from being copied properly.

There's simply no easy/fast way to copy an existing class instance.

Singleton version

Is there a way to use this as a singelton? Basically I want an to be able to do something like this:

myClass = require( "my_class.lua" ) -- Should call init
myClass:loadStuff()

the table is not copy~

my code:
var Obj = class("Obj", {
tab = {}
})

var o1 = Obj:new()
var o2 = Obj:new()
o2:tab.x = "BiuBiuBiu"

print(o1:tab.x) --BiuBiuBiu
print(o2:tab.x) --BiuBiuBiu

it`s a bug? or I understand the wrong?

Missing comma

Missing a comma at the end of line 60 in 30logclean.lua:

__call = function (self,...) return self:new(...) end,

Unused code "c.__instances"

Every class is created with a weak table __instances (two underscores) that goes completely unused. Is this code dead? Perhaps it has been included for support with other libraries?

On a related note, shouldn't classes keep weak references to their own instances? It seems like the idea was there, and it could certainly make retrieving lists of a class's instances faster than having to constantly filter them out from the global record through the instances() function.

30logclean seems to be broken

30log itself works without issues, but if I try to use the clean version, I get

Error: Syntax error: 30logclean.lua:13: unexpected symbol near 'or'

on startup.

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.