Arc Forumnew | comments | leaders | submit | krapp's commentslogin

I'm still working on it, but it's just in my spare time. Better API functionality is definitely on the todo list.

I added a project page to the github[0] to loosely collect and organize forum issues and development. Anyone is welcome to contribute.

[0]https://github.com/arclanguage/anarki/projects

reply

3 points by krapp 133 days ago | link | parent | on: Pg just released a new Lisp: Bel

I assume someone is already working on a Racket implementation.... wish I knew how, it looks like it would be fun.

Might I suggest calling it "Babel?"

-----

4 points by rocketnia 130 days ago | link

There's at least one implementation attempt starting up here: https://github.com/luksamuk/believe

Other name ideas:

- (isa bel)

- Rebel -- similar in theme to "Anarki," although there's already an unrelated Racket library called "Rebellion"

- Bombelli -- analogous to the spelling of "Anarki," and it can refer to a mathematician credited for putting complex numbers on solid ground

- Pachelbel -- would be a good name for an implementation written in D :-p

-----

2 points by rocketnia 109 days ago | link

That one was Believe, written in C11. Here's the link again: https://github.com/luksamuk/believe

Looks like there's another project now, BelJS, written in JavaScript: https://github.com/ajlopez/beljs

-----


We already have syntax in the form of bracketed functions (or whatever they're supposed to be called) and {} for tables.

I'm speaking out of my depth here, but I think it would be nice if scoped syntax extension were a "first class" feature of Arc. It would be nice to be able to load, say, native support for XML syntax as a library or something, or to easily extend the language through grammar definitions.

Also, infix notation in a Lisp? If I had a monocle I would drop it into my coffee with shock forthwith!

-----

3 points by akkartik 217 days ago | link

Have you seen my proposal for infix syntax for Arc? I think it's pretty nice: http://arclanguage.org/item?id=16775. The big drawback: you have to give up '-' in symbol names.

-----

3 points by krapp 214 days ago | link

>The big drawback: you have to give up '-' in symbol names.

I wouldn't have a problem with that, but I'm probably of a minority opinion, since that seems to be a Lisp thing. When I started with Arc it took me a while to realize that symbols with asterisks in the name weren't something special like pointers, and using angle brackets just seems wrong after years of writing HTML.

Although if it were possible to do something along these lines, one could have the best of both worlds:

    (defgrammar infix ...)
 
    (w/grammar 'infix (do


    ))

-----

2 points by krapp 304 days ago | link | parent | on: Ask Arc: Arc forum RSS

There does already appear to be an RSS feed in the footer, but it doesn't appear to be sending the correct MIME-type so Firefox at least thinks it's just a malformed HTML page.

If I remember, I'll try to get it working later tonight since I'm messing with the stylesheets and HTML anyway.

Does anyone think a subscribe link to each thread would be a good idea?

-----

3 points by shader 303 days ago | link

I think a subscribe link for each thread would probably be overkill. Most threads don't last very long, especially since there's a time-limit on responses.

What exactly is it you're working on?

-----

3 points by krapp 303 days ago | link

>What exactly is it you're working on?

ATM, simplifying the HTML and CSS, removing obsolete tags (like font) where possible. Also eventually themes and having the base font size be selectable, since not everyone is comfortable reading 10pt grey on grey text.

-----

4 points by shader 301 days ago | link

Sounds good.

I guess these improvements will only affect people using the Anarki implementation of the forum? It would be nice if we could get some upgrades to the original arclanguage.org instance.

Specifically turning off the feature that disables replies on old threads, and probably switching to a most-recently-updated ordering scheme.

-----

2 points by krapp 312 days ago | link | parent | on: Noob resources for Arc/Anarki?

>"Package manager" means wildly different things and has wildly different responsibilities in different contexts and languages and platforms

I disagree. Most package managers for most languages share the same core functions and responsibilities: import and export code (likely from or to a repo), organize code into "packages" or "applications" according to some hierarchy, describe dependencies for packages using metadata and manage those dependencies when importing or updating.

The "special sauce" between them is in the way packages are defined and the metadata, and the way dependencies are handled, and those are details the Arc community could argue about until the heat death of the universe. But ~90% of what new people will want from Arc is to import News as an application or import libraries into their own local version of News.

-----

2 points by akkartik 305 days ago | link

Hmm, we've had this conversation a few times, and I think I may be unfairly holding others back. To reiterate the obvious, you should absolutely feel free to create a package manager in Anarki. The way you put it suggests it may not even be that much work for a rudimentary tool. Why not try it? Let a thousand flowers bloom :)

-----

2 points by krapp 304 days ago | link

>The way you put it suggests it may not even be that much work for a rudimentary tool.

From what little I know, it would be an exercise in suffering [0,1] and that's not even getting into arguments over how versioning should work. But I still want to do it... eventually.

I kind of suspect it would be pointless without some changes to the language itself which I don't know how to implement myself yet, and I don't want to just wait for other people to do the work. Basically, I don't think we can have useful packages until we can do something about the possibility of packages being able to globally redefine things and create unintended havoc. Namespaces would be nice too.

I am hoping to get something like plugins working in the forum, though. I've already combined the repo and what was the plugin manager and I've been trying to get hooks to work through it so that it would be possible to 'plug' scripts in or out of those hooks during runtime. It might also be useful as a way to add updates by hotpatching the existing code (which is really the only valid use I can even think of for being able to redefine things in Arc.)

Maybe, if that ever gets anywhere, something like a package manager can emerge from it.

[0]https://medium.com/@sdboyer/so-you-want-to-write-a-package-m...

[1]https://news.ycombinator.com/item?id=11088125

-----

3 points by shader 303 days ago | link

I'm actually somewhat intrigued with the idea of using guix[0] as a language package manager. It has really nice facilities for setting up "environments" that contain a set of packages, so you can use it for bundling together all of the deps needed to build a particular application. As a bonus, it uses scheme as its configuration language :)

It wouldn't solve arc side of actually loading packages, which probably still needs work, but it should work pretty well at managing them.

____

[0] https://www.gnu.org/software/guix/

-----


relevant HN thread: https://news.ycombinator.com/item?id=19430840

-----

3 points by krapp 344 days ago | link | parent | on: Noob resources for Arc/Anarki?

>I install packages (although I think the only ones I use are ones I've created) by downloading the file, then calling `(load "/path/to/file")`.

To be fair, though... when most people say they want to "browse and install packages" for a language, they don't mean including local files through a REPL. Although that is the best we can do in Arc for now.

-----

3 points by krapp 358 days ago | link | parent | on: Noob resources for Arc/Anarki?

In Windows, the install instructions in the readme should work. You may or may not have to set environment variables, I don't remember if I had to do that, but I don't remember having any issues. You'll probably want Git and MinGW as well.

If by "browse and install packages" you mean for Arc, you can't, yet.

I use Sublime Text with the syntax set to Lisp (which works well enough) and the terminal plugin, so I can open a Powershell prompt with Ctrl-Alt-T.

-----

2 points by nupa 358 days ago | link

Thanks for the advice! I figured I was just missing something, but if it doesn't exist yet then that's reasonable enough.

I've heard of foreign function interfaces, does Arc have one of those?

Regardless, I'm sort of getting the impression that Arc is something I should come back to someday when I'm able to contribute tooling to it -- it's an amazing core but not much else.

-----

2 points by krapp 358 days ago | link

>I've heard of foreign function interfaces, does Arc have one of those?

If Racket interop counts, then yes, albeit not seamlessly.

>it's an amazing core but not much else.

Yeah, it's mostly News and some random experiments. Fun to mess around with, though.

-----


Just in case anyone might care, the current version of news deprecates npage and the subpage templates for a single layout macro and no longer uses the table layout, so that all news pages have a consistent look and navigation. I'll get around to finishing my vague plans to clean up and update the HTML eventually, since there are still some inline styles and font color tags and such that need to be gotten rid of.

Also, there's no longer any (gen-css-url) or votejs*, those have been moved entirely to external js and css files (except for the topbar color.)

Also eventually, I'm hoping to separate the layout stylesheet from the color stylesheet so that the latter can be swapped out as themes.

[0]https://github.com/arclanguage/anarki/blob/master/apps/news/...

-----

2 points by krapp 367 days ago | link | parent | on: Variables & scoping complaint

>So you could have lib#1 set var 'x' only for it to get clobbered by lib#2's version of var 'x' and arc just ignores this. That's bad. Really bad.

And how often is it intended behavior? How often does one want to have a macro parameter or apparently "local" variable overwrite an existing symbol globally and arbitrarily?

I can see it being useful in the case of "hot patching" code to just redefine a function, but that's still kind of crazy, since now the source code and running code are no longer the same. Might as well just edit the file and reload it, and have one source of truth.

It seems like an anti-feature. Something that seemed like a good idea in theory, but which in practice does more harm than good.

-----

2 points by akkartik 366 days ago | link

I'm not following the two of you on precisely what this anti-feature is. Assigning to local variables using '=' does not create new global variables. Can you share a code sample showing what you're talking about?

-----

1 point by i4cu 366 days ago | link

> Assigning to local variables using '=' does not create new global variables.

We're referring to the original posts problem where using = inside a function can redefine global variables:

  arc> (= data* '(green red)) 

  arc> (def my-fn () (= data* nil))
  #<procedure: my-fn>
  arc> (my-fn)
  nil
  arc> data*
  nil
Now my comment was referring a bigger problem that falls out of this 'feature' or 'anti-feature' (depending on your point of view).

assume you place this in html.arc

  (= data* '(blue red))

  ; (add-color 'purple)
  (def add-color (color)
    (push color data*))
    
Then I create apple tracker library 'lib/apples.arc' with:

  (= data* '(green red))

  ; (add-apple 'golden)
  (def add-apple (color)
    (push color data*))
Now at the top level of my progam:

  (load "lib/apples.arc")
  (load "lib/html.arc")
; now say the first apple in storage has gone brown:

  > (string (car data*) " has gone brown")

  "blue has gone brown"
say what? my blue apple has gone brown?

why is there no warning or error on loading my lib? That's pretty bad IMO.

-----

More