Better HN
topnewbestaskshowjobs
Log inSign up

shaunxcode

1,751 karma · joined Mar 26, 2008 (18y ago) · 893 submissions

symbolic homoiconicist

shaunxcode@gmail.com

Submissions

comment 16y ago · link · parent

I think I need to change the name of my repository now. I am now the author of "phlisp" http://github.com/shaunxcode/phlisp to avoid confusion. hah. It is cool to see a different approach to the same problem! I am going more for source -> source, quasiquote macros, TCO, some arc-esque syntactic sugar etc. and back to php4 compat. Definitely a kick in the ass to release it now as I have stalled since april due to "work".

comment 16y ago · link · parent

Solution? A framework which allows you to write lisp which turns into php written in php? Below is how I would do this in what I am calling "lisphp" http://github.com/shaunxcode/lisphp

  (map-dict
      [k v | tag :li (tag :strong k) (join "," (map [get :name _] v))] 
      (group-by :color (sql-query "select * from favcolor order by color, name")))

comment 16y ago · link · parent

Yeah I would normally never mix the templating/html w/ the data processing but I was trying to stick to the example but w/ one line hah. Right now it is part of my new web framework which is very much a work in progress but available on http://voltron.googlecode.com the relevant code for the Array dsl is under Model/Type/Array.php and FluentLambda.php and the constant declarations are in bootstrap.php - again total work in progress so things are not as clean as they should be just yet.

Also http://commonphp.blogspot.com is where I write about it.

comment 16y ago · link · parent

I'll raise you my bleeding edge dsl:

  echo $conn->execute('select * from favcolor order by color, name')
            ->groupBy(L(val)->color)
            ->map(L(key)->wrap('<li><b>', '</b>')
                        ->append(
                          ': ',
                          L(val)->map(L(val)->name)->join(','),
                          '</li>'))
            ->join("\n");

comment 16y ago · link · parent

racket allows this! I would love a keyboard w/ a lambda key.

comment 16y ago · link · parent

This book is great - it is also a "photo journal" of all the people/industries that it focuses upon. I think the author definitely hit the mark with what he wanted to accomplish which was an adult version of the richard scary "what do people do all day" kids book. I wish he had followed both a "I hate my life" corporate software developer and a work from home start up developer.

comment 16y ago · link · parent

"Underoop does not support inheritance. Inheritance breaks miserably under AJAX requests without a lot of ugly hacks. After many years of OOP I’ve come to the conclusion that inheritance is a bug. Clojurians and Haskellers agree. Use Modules."

It would be interesting to see a smalltalk w/o inheritance that utilized composition instead (does this already exist?) which accomplishes everything the current object hierarchy does.

comment 16y ago · link · parent

yeah that would be pretty cool if they worked w/ fathomdb for mysql as part of the cost.

comment 16y ago · link · parent

drop me a line - my email is in my profile.

comment 16y ago · link · parent

this is cool - but the real magic lies with in recur right? How is that implemented in clojure itself or does that require bytecode magic?

comment 16y ago · link · parent

yay! two other people in utah. At this rate by 2015 I think we can schedule our first meeting. I am pretty surprised by this considering the university of utah uses "how to design programs" as their intro to CS. Maybe if they used SICP it would be different?

comment 16y ago · link · parent

A few thoughts - I have already ordered a physical copy because I definitely agree that the medium of print is one which yields better long term absorption of content. But I couldn't resist downloading the pdf first to get at taste of what the content would be - I was sort of disappointed that there were not more articles w/ code in them. I am still stoked on the articles that ARE there I guess I just want more haha, but being a magazine that is a good thing as I will want the next issue.

I am not sure how mag cloud works (print on demand or do they actually create the "plates" for offset printing and thus unique issues are not doable?) - but if it is print on demand could you not have a button which says "Add comments to this issue" which would collate and generate the pdf then and there by the users own interaction thus side-stepping the legal issues?

comment 16y ago · link · parent

take the bag! There is a good chance that a permanent solution will be more than viable in your lifetime if not in the near future! Life is far far too precious to not take the risk.

comment 16y ago · link · parent

Dylan is worth taking a look at to consider what lisp sans parens might look like. http://en.wikipedia.org/wiki/Dylan_%28programming_language%2...

comment 16y ago · link · parent

Just typing out loud here: I usually just define a function called Tag which returns a jquery handle to said tag i.e.

  function tag(name) {
    return $('<' + name +'></' + name + '>');
  }

  tag('div').append(
    tag('ul').append(
      tag('li').html('a'), 
      tag('li').html('b')))
which would become:

  ['div', 
     ['ul',  
        ['li', 'a'], 
        ['li', 'b']]]
That seems substantially nicer to look at - but lacks the ability to easily add event handlers etc. that I get w/ the jquery approach. There is no reason it could not be inter-operable though:

  ['div', tag('span').html('click me').click(function(){alert('clicked')})];

comment 16y ago · link · parent

Rather, it should strive to be "art" by means of elegance, purpose, originality and in general an aesthetic which speaks of form and function joined appropriately. Anything less is merely "kitsch code" http://en.wikipedia.org/wiki/Kitsch. Most of us spend our days programming the equivalent of replicated garden gnomes each with a slightly different expression and perhaps a different hat.

comment 16y ago · link · parent

  (if (you-have-to-learn-one-language)
      (begin
          (make-highly-subjective-claims)
          (eliminate-good-candidates-for-specious-reasons)
          (arive-at-questionable-conclusion))
      (begin
          (broaden-your-understanding-of-programming)
          (be-able-to-evaluate-multiple-solutions-for-problem)))

comment 16y ago · link · parent

Exactly - his point is that he doesn't care how map is implemented but really it should be a matter of not caring how recursion/tco is implemented so long as it does not blow the stack.

comment 16y ago · link · parent

these look really really cool. I hope they enter the market at a level which actually makes them applicable for kids to own (think 5, MAYBE 10 dollars a piece). I hope they release an API/sdk sooner than later as well. I am throwing together a quick analog in jquery just for fun to play with "spatially aware" blocks as the math and word finding examples seemed like they would be really fun on the ipad.

comment 16y ago · link · parent

and yet your comment was created on a machine built upon rational being used to communicate on a network built upon freedom. start? more like recognize and celebrate what has already happened whilst rejecting the birthing pains.

comment 16y ago · link · parent

How is this comparable to fathomdb in terms of what it provides on a business level. (not how i.e. fathomdb leverages 'the cloud' where as this seems to be using specialized hardware?)

comment 16y ago · link · parent

shift arrow is on bottom left. I got one when I found out it could easily run guile etc. so that I have a tiny scheme interpreter to play around with at coffee shops etc. Once you get used to typing with your thumbs it is really not that bad. the biggest down side is no built in wireless. there is micro sd though so in theory if someone starts making micro sd wireless cards again you could use that. As it stands you have to connect it to your computer via usb ethernet and forward internet that way.

comment 16y ago · link · parent

would you mind posting your definition?

comment 16y ago · link · parent

how would one define SolvePoly or even Take for that matter in terms of Mathematica if it were not "built in"? I am not saying it is impossible (I really do not know and thus I am curious).

comment 16y ago · link · parent

Has anyone managed to get the whisker/stacked editor/browser working in pharo?

comment 16y ago · link · parent

My first problem with scratch was that it was client based and the "player" is java based. It absolutely needs to be web (not flash or java) based. I actually had a good portion of a jquery/drag and drop code editor written a few years ago when I was stuck at a 9-5 programming gig. I am going to dig it back up as the time seems right to move forward with it.

comment 16y ago · link · parent

I think the growth pattern/cycle of hacker news is a factorial of sorts in that with the influx of new hackers there will always be a re-iteration of classic material, in fact there will be a re-iteration of ALL classic material "plus some" new material now to be known as classic by the next influx. This makes me more happy than it makes me bothered.

comment 16y ago · link · parent

because the whole 3 of us that compile lisp type languages into php need it for TCO.

comment 16y ago · link · parent

While I am not part of the project - based on the fact the wikipedia link just goes to http://en.wikipedia.org/wiki/Lisp_%28programming_language%29 - I would assume that any lisp listed in the "dialects" in the sidebar would be a go? Meaning arc, scheme, clojure etc.

comment 16y ago · link · parent

thanks - I am always hesitant to release projects where I know it is only a quarter of the way there. But what good does it do just having it sit on my hard drive? hah. There are some key bindings working ctrl+space creates a new editing pane, ctrl+arrow keys should let you move between panes - however I wrote this so long ago that I did not know ctrl+space brings up a menu on mac. hah. The other key bindings do not seem to work on my mac either. If I get some time this weekend I think I will polish this up, get saving/loading/exporting working etc.
1
192021
30