These are chat archives for got-lambda/expression

1st
Apr 2016
Jean-Louis Giordano
@Jell
Apr 01 2016 06:08
I personally <3 Clojure(Script) but you all know that :smile:
Jean-Louis Giordano
@Jell
Apr 01 2016 06:15
on the other hand, if you don't need a lot of JS libraries (like locale, time handling) or working with a designer (that would like to have proper HTML templates), then Elm might be faster to get off the ground and straightforward?
Jean-Louis Giordano
@Jell
Apr 01 2016 06:28
I can vouch for cljs at least. We use the re-frame "framework" with reagent and react with an "FRP" architecture https://github.com/Day8/re-frame
demo: https://demo.zimpler.net/ (also we just released a new version and we'll be routing all our traffic there next monday! exciting)
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 08:08
Hello, I'd appreciate an invite to the got-lambda org.
Fredrik Dyrkell
@fredyr
Apr 01 2016 08:25
what's that?
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 08:31
Fredrik Dyrkell
@fredyr
Apr 01 2016 08:32
ah right
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 08:33
Oh, I see now this gitter room isn't strongly connected to the corresponding GitHub organization. I thought there was a more direct link.
Fredrik Dyrkell
@fredyr
Apr 01 2016 08:33
we're just using it as a chat room for the meetup mostly
but the connection you've made to github became apparent once you linked to the repo :D
so it could've en just be me being slow
i give up on trying to correct the grammar in the above sentence
btw i liked the ray tracer stuff you've made
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 08:49
Thanks! I suppose the GLSL stuff since I touched that most recently.
Fredrik Dyrkell
@fredyr
Apr 01 2016 08:50
i both browsed your github repo and looked at some pics on the webpage
Magnus Therning
@magthe
Apr 01 2016 08:51
@fredyr "it could've just been me being slow"
Fredrik Dyrkell
@fredyr
Apr 01 2016 08:51
@magthe thanks >D
i started correcting the sentence with s/change/me syntax
you can update your latest message in place!
butt made it worse
s/butt/but
ouch
nvm, getting back to work
Erik Svedäng
@eriksvedang
Apr 01 2016 08:56
@larsbrinkhoff I had a question for you yesterday that I didn't get the chance to ask – Is it correct to say that the concatenative-ness of Forth is equivalent to point free style in Haskell/Lambda calculus? they seem very similar, only reversed
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 08:57
Right, that's what I was trying to explain.
But failed miserably.
Erik Svedäng
@eriksvedang
Apr 01 2016 08:58
I think you did a good job :)
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 08:58
So e.g. f . g . h in Haskell is equivalent to h g f in concatenative languages.
(It's spelled ., right?)
Erik Svedäng
@eriksvedang
Apr 01 2016 08:58
so currying kinda falls out of it automatically?
(yeah)
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 08:59
Nah, you can't partially apply a Forth word.
Erik Svedäng
@eriksvedang
Apr 01 2016 08:59
ok
I need to play around with it to really get it, obviously
but writing "half a function" in forth should be somewhat like a curried function, maybe..?
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 09:00
Yes, probably, if we both are thinking along the same lines. :-)
Erik Svedäng
@eriksvedang
Apr 01 2016 09:01
1 +
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 09:01
A concrete example would probably be good.
Erik Svedäng
@eriksvedang
Apr 01 2016 09:02
if I store that in a word I can later apply it, right?
I'll just download your code and play around with it before I ask more questions, heh
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 09:08
Maybe check the code in lib, those are usually small and focused on a specific task.
Erik Svedäng
@eriksvedang
Apr 01 2016 09:09
cool, got it up and running now
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 09:09
Yes, if you define a new word like : foo h g f ;, that's like foo = f . g . h or whatever the typical syntax is.
Check out Factor if you want a more modern, maybe functional, concatenative language.
Erik Svedäng
@eriksvedang
Apr 01 2016 09:12
ok!
Fredrik Dyrkell
@fredyr
Apr 01 2016 09:12
i had a lot of fun with joy
i played a fair bit with this impl and wrote some own stuff in clojure
Erik Svedäng
@eriksvedang
Apr 01 2016 09:13
hmm, found one interesting thing at least... this forth thing:
: tre + + + ;
adds the top three elements
this haskell thing:
tre = (+) . (+) . (+)
... does not, definitely. It's type is funny: a -> ((a -> a) -> a -> a) -> (a -> a) -> a -> a
cool
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 09:17
I guess the outputs must match the inputs.
Erik Svedäng
@eriksvedang
Apr 01 2016 09:17
yeah, it makes sense
the latest "Read, Eval, Print, Love" zine is about forth by the way – https://leanpub.com/readevalprintlove003/read
I like his "mini implementation" in Clojure:
(defn postfix [& words]
(reduce #(if (fn? %2)
(let [[l r & m] %]
(cons (%2 r l) m))
(cons %2 %))
[]
words))
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 09:18
My brain is like 80% at work, so there's not much capacity left for thinking about functional programming.
Erik Svedäng
@eriksvedang
Apr 01 2016 09:19
fair enough ^^
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 09:19
I'll quote myself here: "it's slightly weird to see a Lisp publication writing about implementing Forth in Ruby."
Fredrik Dyrkell
@fredyr
Apr 01 2016 09:19
yeah the read eval zine was a nice read
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 09:20
And a half- or even quarter-assed Forth at that...
But hey! Forth!
I'll take it.
Fredrik Dyrkell
@fredyr
Apr 01 2016 09:22
i read somewhere (i.e. prolly hacker news comments) that they stopped reading once they saw clojure code
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 09:22
At the first opening paren?
Fredrik Dyrkell
@fredyr
Apr 01 2016 09:22
so i guess if you want to print in more ppl ruby is a fair choice
bring more ppl in
im unable to write today i would seem
it
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 09:22
Lisp and Forth have so much in common, like being sneered at by the mainstream programmers.
Fredrik Dyrkell
@fredyr
Apr 01 2016 09:23
hah yeah
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 09:23
If they see Lisp, they're like (()))()(((())()()).
And if they see Forth, they're like: this read not can I.
Fredrik Dyrkell
@fredyr
Apr 01 2016 09:24
:)
tbh, i have the same reaction when i see ruby code
end end end
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 09:26
I suppose those details usually fade from view after a few weeks working with a new language.
But you may have to take that time.
Fredrik Dyrkell
@fredyr
Apr 01 2016 09:26
yes exactly
if anyone is curious about Joy, von Thun's papers are quite nice intros
Fredrik Dyrkell
@fredyr
Apr 01 2016 09:34
if i understand correctly, factor is similar to joy, but perhaps more of a real and usable language?
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 09:34
Quiz: Which language does this describe? http://lars.nocrew.org/quiz.txt
I haven't looked at either Factor or Joy, really. But Factor seems have an active community.
Fredrik Dyrkell
@fredyr
Apr 01 2016 09:36
is the quiz a trick question?
the obv answer seems to be CL
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 09:37
Right! I wrote it to match CL ... and one other language!
Fredrik Dyrkell
@fredyr
Apr 01 2016 09:39
gotta be forth then
:)
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 09:39
Yes, not that hard to guess in this context.
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 09:56
@eriksvedang Please point out areas in the sparse lbForth documentation that needs to be fleshed out.
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 10:19
I'd like to play around with Haskell.
Is there some forgiving and smart implementation which doesn't require type annotations before defining a function?
Or maybe there's some syntax I don't know about.
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 10:29
Ok, got it.
Erik Svedäng
@eriksvedang
Apr 01 2016 10:43
which file is the docs?
wow, this pdp1 handbook is very cool
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 10:44
Obviously README.md failed spectacularly to be a useful introduction. Good to know! ;-)
Fredrik Dyrkell
@fredyr
Apr 01 2016 12:09
Current status: 3 separate Visual Studio instances running
send help
Jean-Louis Giordano
@Jell
Apr 01 2016 13:14
@larsbrinkhoff I've added you to the gotlambda github org!
I think everyone in the org can make other people part of the org (note to everyone in case I'm not available)
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 13:23
Thank you!
Marco Zocca
@ocramz
Apr 01 2016 16:56
@larsbrinkhoff ghc (the most common haskell compiler)infers the types for you
you need some l33t skillz and some funny syntax extensions to make the typechecker diverge
Lars Brinkhoff
@larsbrinkhoff
Apr 01 2016 19:08
Thanks. The problem was that I was trying to use the interactive prompt, and it doesn't quite use the same syntax as a source code file.
Marco Zocca
@ocramz
Apr 01 2016 21:04
hmm, what do you need to do?ghci has the :t macro for deriving the types, e.g. :t map . map
apart from this and other macros for e.g loading modules, the ghci prompt is pretty much the same as working in the IO monad
i.e. let statements, do this, do that
Marco Zocca
@ocramz
Apr 01 2016 21:11
or did I completely misunderstand what u were asking for ? : D