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

Add string manipulation capability #166

Closed
47 tasks done
kanaka opened this issue Feb 9, 2016 · 14 comments
Closed
47 tasks done

Add string manipulation capability #166

kanaka opened this issue Feb 9, 2016 · 14 comments

Comments

@kanaka
Copy link
Owner

kanaka commented Feb 9, 2016

Right now there is no cross-implementation way to manipulate (index, slice, etc).

In Clojure, strings are treated as sequences of characters and so sequence functions operate on them. However, as a simple initial (or maybe final) step, simply adding a seq function that turns a string into a list of single character strings would allow manipulation using normal sequence functions (str will already concatenate a sequence of character strings into a single string).

For now I'm thinking this would be an optional stepA function.

So here is the list for adding a seq function:

  • awk
  • bash
  • c
  • d
  • clojure
  • coffee
  • cpp
  • crystal
  • cs
  • erlang
  • elixir
  • es6
  • factor
  • forth
  • fsharp
  • go
  • groovy
  • guile
  • haskell
  • haxe
  • java
  • julia
  • js
  • kotlin
  • lua
  • make
  • mal
  • ocaml
  • matlab
  • miniMAL
  • nim
  • perl
  • php
  • ps
  • python
  • r
  • racket
  • rpython
  • ruby
  • rust
  • scala
  • swift
  • swift3
  • tcl
  • vb
  • vimscript

Also:

  • Update: process/stepA_mal.txt and process/guide.md
kanaka added a commit that referenced this issue Feb 11, 2016
kanaka added a commit that referenced this issue Feb 11, 2016
@kanaka kanaka mentioned this issue Feb 11, 2016
@kanaka
Copy link
Owner Author

kanaka commented Feb 11, 2016

I push several implementations to branch issue_166_string_ops.

@kanaka
Copy link
Owner Author

kanaka commented Feb 11, 2016

@dubek I've started implementing seq and string? on branch issue_166_string_ops. If you want to help, feel free to send PRs to this branch.

I'll probably do make and postscript next.

kanaka added a commit that referenced this issue Feb 11, 2016
dubek added a commit to dubek/mal that referenced this issue Feb 11, 2016
@kanaka
Copy link
Owner Author

kanaka commented Feb 11, 2016

@dubek btw, don't bother waiting for travis. Just send pulls against this branch and I'll merge it as soon as I see it. Any issues caught with travis can be dealt with later before this branch is merged onto the mainline.

I might collapse/rebase all the commits into a single commit before merging to master anyways to reduce churn in the main history.

kanaka added a commit that referenced this issue Feb 11, 2016
@dubek
Copy link
Collaborator

dubek commented Feb 11, 2016

Add a checkbox for process/stepA_mal.txt and process/guide.md updates.

@dubek
Copy link
Collaborator

dubek commented Feb 12, 2016

tcl in #169. I'm working on vimscript and D and go.

dubek added a commit to dubek/mal that referenced this issue Feb 12, 2016
dubek added a commit to dubek/mal that referenced this issue Feb 12, 2016
dubek added a commit to dubek/mal that referenced this issue Feb 12, 2016
@kanaka
Copy link
Owner Author

kanaka commented Feb 12, 2016

I'll take the "javas": groovy, java, scala.

@dubek
Copy link
Collaborator

dubek commented Feb 12, 2016

I'll take the sharps: cs, fsharp, vb

And then crsyal, lua, perl.

kanaka added a commit that referenced this issue Feb 12, 2016
Issue #166.

Also, add keyword? step9 test on zero length strings.
@kanaka
Copy link
Owner Author

kanaka commented Feb 12, 2016

@dubek I discovered a bug in some implementations where (keyword? "") throws an error. I added a test in step9 and I'm just going to use travis to show which others still have the issue: https://travis-ci.org/kanaka/mal/builds/108816302

@dubek
Copy link
Collaborator

dubek commented Feb 12, 2016

Thanks @kanaka, I just noticed myself that c-sharp has this bug.

@dubek
Copy link
Collaborator

dubek commented Feb 12, 2016

@kanaka - Another thing I noticed (in ocaml, maybe others) is that (symbol 'a) and (keyword :a) don't just return the argument (idempotent), as they should (I believe).

dubek added a commit to dubek/mal that referenced this issue Feb 15, 2016
dubek added a commit to dubek/mal that referenced this issue Feb 15, 2016
dubek added a commit to dubek/mal that referenced this issue Feb 15, 2016
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
Issue kanaka#166.

Also, add keyword? step9 test on zero length strings.
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
Issue kanaka#166.

Also, in stepA_mal print out standard startup message.
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
luelista pushed a commit to luelista/mal that referenced this issue Mar 10, 2024
Issue kanaka#166

With assistance from chouser (thanks!).
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

2 participants