Git Product home page Git Product logo

slash's People

Contributors

bouk avatar filp avatar haileys avatar mariovisic avatar richo avatar vstm avatar zzak 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  avatar  avatar

slash's Issues

split default keyword argument not working

making a note, i will check on this later if noone else gets to it:

def foo {
  "zomg split already".split();
}

results with: ArgumentError: Too few arguments. Expected 1, received 0.

to work around this i can do the following:

def foo {
  "zomg ok this works".split(" ");
}

Install Slash via Homebrew

You could easily make Slash installable via Homebrew using a script like this:

require 'formula'

class Slash < Formula
  homepage 'http://slash-lang.org'
  url 'DOWNLOAD_LINK'
  mirror 'DOWNLOAD MIRROR'
  sha1 'SHA1 HASH' # or md5

  DEPS = ['gmp', 'pcre', 'libgcrypt', 'yajl', 'discount']
  DEPS.each do |dep|
    depend_on dep
  end

  def install
    system "./configure --prefix=#{prefix}"
    system 'make && make install'
  end
end

Tailing \x00 with String#lower

I got a curious \x00 like below.

>> "Å".lower
=> "å\x00"
>> "Å".lower.length
=> 1
>> ("Å".lower + "a").length
=> 3

Is this known?

./configure not detecting libcurl

I'm trying to install Slash on a Linux Mint system.

$ ./configure --with-lib-dir=/usr/lib/i386-linux-gnu/

CC environment variable not set, falling back to 'cc'...
Checking for cc... cc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
Checking for flex... flex 2.5.35
Checking for libgmp... ok
Checking for libiconv... ok
Checking for libpcre... ok
Checking for a thread-safe time.h... ok
Checking for -march=native... ok
Checking for -flto... ok
Checking for __builtin_expect... ok
Checking for unistd.h... ok
Checking for -Wno-gnu... ok
Checking for computed goto... ok

Configuring ext/base64
Configuring ext/curl
Checking for libcurl... failed

Could not find libcurl (used -lcurl)
Please make sure it is available before building Slash

The directory /usr/lib/i386-linux-gnu/ contains:

libcurl-gnutls.so.3
libcurl-gnutls.so.4
libcurl-gnutls.so.4.2.0
libcurl-nss.so.3
libcurl-nss.so.4
libcurl-nss.so.4.2.0
libcurl.so.3
libcurl.so.4
libcurl.so.4.2.0

I assume I'm doing something wrong. How can I get ./configure to detect libcurl?

./configure not checking ruby

I tried to build slash on my laptop which did not have ruby.

The configure did not warn me about it, and make obviously thrown an error when executing gen scripts.

I think it may be good to check ruby on configure to warn the user.

Build process should provide shared libraries as well

As far as I see 'make' builds only static library.

Some distros (e.g. Linux Arch) strongly prefer to deal with shared libraries. shared libraries are handly in many cases.

It would be really useful if slash provided shared libraries as well.

Alternative syntax for Lambda expressions (?)

I'm really new on this, but the syntax for lambdas it feels weird:

print(foo(\x { x * x }), "\n"); # => 81
print(foo(λ x . x ** x), "\n"); # => 38742048

In other languages:

print(foo(x -> { x * x }), "\n"); # => 81
print(foo({ x -> x * x }), "\n"); # => 81
print(foo({ |x| x * x }), "\n"); # => 81

print(foo(x -> { x ** x }), "\n"); # => 38742048
print(foo({ x -> x ** x }), "\n"); # => 38742048
print(foo({ |x| x ** x }), "\n"); # => 38742048

Which feels less weird?

Nginx Support for SAPI?

Could we see Nginx support for Slash's SAPI some time in the future? There is a nice guide on creating Nginx modules here.

test.sl doesn't work from the test directory

Given: slash-cli is compiled and you have the slash source code

When: You're in the slash/test directory
And: You run slash-cli test.sl core/array.sl
Then: You see this error:

NameError: Undefined constant 'Test' in Object
  at <main> in /Users/acook/Pork/slash/test/test.sl, line 3
  at <main> in test.sl, line 3

However

When: You're in the slash root source directory
And: You run slash-cli test/test.sl test/core/array.sl
Then: Tests are run successfully with this output:

...................

Tests finished. 19 passes, 0 failures, 182 assertions.

That seems weird to me. I can't figure out why just from looking at the source code either.

NoMethodError: Undefined method '[]' on #<Method:0x2348bc8>

In the following situation, an error will be thrown because slash thinks I want to call the [] method of the Method (bar) that I'm defining, while in reality I want to do something completely different.

def bar {
  ...;
}

[1, 2, 3].each(\n { n * n });

Produces:

NoMethodError: Undefined method '[]' on #<Method:0xdeadbeef>
...

Implement File.exists

There's currently no way to check if a file exists. The only way to do this is to attempt to read the file and catch the NotFound error.

File.exists?(path)
 #=> True | False

Documentation -- can I help?

I'd like to contribute to this project. Is there a repo containing the documentation anywhere? I would like to dig into this language, ask a bunch of stupid questions, and hopefully add to the documentation what I find. I am an experienced Rubyist (2005 - present), and a recovering PHP user (1999 - 2010), so I hope I can bring something to the party. I can sort of limp through C, so maybe there wouldn't need to be too many stupid questions...

Allow class declaration with fully-qualified name

It would be nice to have the ability to declare classes without explicit nesting.

Currently:

class Foo {
  class Bar {
    class UhOh { }
  }
}

This can quickly become a bit cumbersome.

Suggestion:

class Foo::Bar::UhOh {
  def init { 'yay } 
}

Add __FILE__ and __DIR__ constants

The following two (magic) constants are missing, and would be useful:

__FILE__ : absolute path to the current file
__DIR__ : absolute path to the directory of the current file

I need a tutorial

Hello

I would like to use this. However, I would need a tutorial, on how to set up a complete environment in my laptop. I am running cherokee to serve to outside world. How do I use slash with it? Do I make a slash page to dump its output to a socket? This can be achined by calling slash-cgi - like here : https://github.com/slash-lang/slash/tree/master/sapi/cgi , and then read it out by cherokee? Or is there a parser module that goes through the page, performs parsing and so on? How are the get / post methods handled?
I need some simple directions to get started with this.
Thank you.

PS : Current setup :

  1. Cherokee running.
  2. Did not find slash in the official LXLE repos . DOwnloaded the GIT repo using the zip file in the github page.
  3. will get started with installing as soon as I get an heads up from you guys.

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.