Jun
29
comment Error defining anonymous function in Clojure
for whatever reason the unqualified list isn't getting resolved to clojure.core/list. I don't remember enough about Clojure namespaces to suggest a fix though.
Jun
13
awarded Yearling
Jun
13
awarded Yearling
May
14
comment Shell execute in lua
If I were using just vanilla Lua the solution here would be io:popen to execute the script and read from its stdout, but I guess that isn't available?
May
13
answered Java to Lua socket communication error
May
11
awarded Critic
May
11
answered lua mouse event handler
May
11
comment how to convert to host byte order using lua in wireshark
Possible duplicate? stackoverflow.com/questions/5241799/…
May
10
comment GHC does not accept GADT type signature
Use the infix form of ->. I have no idea why it makes a difference but indeed it does. (i.e. data ... where {Identity :: a -> Identity a})
May
10
comment constantly function not workint in syntax quote
Yes, I see it most in the context of Lua; that's where I learned it anyways.
May
10
revised cryptarithmetic prolog test fails recursion idea
Code formatting
May
10
comment cryptarithmetic prolog test fails recursion idea
I'm not sure exactly what your issue is but you can use trace. to turn on tracing at the prompt, if you need to debug something.
May
9
answered constantly function not workint in syntax quote
May
9
comment constantly function not workint in syntax quote
If anything I would say the second behavior is the 'expected' one. The form you're trying to eval has an actual function object as its head, not a symbol or another expression: the compiler doesn't normally expect that. Note that the class of the anonymous function is going to be something like user$eval141$f__x while the second one is going to be an instance of clojure.core$constantly$fn__x which explains the difference but I'm not sure which behavior is to be expected
May
9
comment installing daylerees color scheme for vim using vundle - mac os x
Are you sure syntax highlighting is on? :syntax on
May
9
comment Solving a puzzle using swi-prolog
It returns quickly for the 8-step case because it finds a solution without significant backtracking--so it runs in close to linear time. Since the 9th step has no solution, it must backtrack through the entire space.
May
9
answered Solving a puzzle using swi-prolog
May
9
comment Solving a puzzle using swi-prolog
The head of the last clause in notdiaglist should probably be notdiaglist(X1, Y1, [[X2, Y2, _] | Tail]), no? step fails very quickly otherwise. I'm also getting a failure for nine iterations of step no matter what options for T there are. It takes a long time (48s) and it fails.
May
3
comment Reading a file on Lua
Like most library functions in Lua, if e.g. load() fails, it returns null and the error message. Try thunk = assert(load(...)) and you should see the error load is giving you.
May
2
awarded Enlightened
1 2 3 4 5