I read Simon Parent's thesis, How Programmers Comment When They Think
Nobody's Watching. Simon is analyzing comments in source files.
Simon quotes two other sources about comments to try to find a
classification scheme. I've quoted the summaries Simon quoted from the
sources [1] and [2]. I've
I heard the stand that functional programming made it difficult to write
secure programs. I do not know enough of functional programming yet to
determine the value of a statement like this. What is the take here about
it?
--
Cecil Westerhof
--
You received this message because you are
I am mostly a back-end writer. I dabbled a little with Scala before going
to Clojure. (And more on the back-end as on the front-end.) But there was a
discussion (I do not remember if it was on a Java or Scala newsgroup) that
Swing was not the right interface for writing GUI's. I settled for
Hi Petr,
Did you see this?
https://github.com/clojure/tools.namespace#warnings-for-aliases
Also mentioned: Aliases to reloaded namespaces will break if the
namespace containing the alias is not reloaded also.
I've been writing per-project wrappers over the refresh function to do
the
There's really no only way to do anything in Clojure, since you can
always drop down to Java interop. So anything that's available to Java is
available to Clojure, too. Not all the options have a nice Seesaw-like
wrapper over it of course, but they're generally still quite usable. I do a
2014-05-04 10:09 GMT+02:00 Colin Fleming colin.mailingl...@gmail.com:
There's really no only way to do anything in Clojure, since you can
always drop down to Java interop. So anything that's available to Java is
available to Clojure, too. Not all the options have a nice Seesaw-like
wrapper
Here's a wrapper over (refresh) that updates the aliases in the user namespace
as well. You can put it in the :repl-options in your project.clj.
:init (do
(require '[clojure.tools.namespace.repl :refer [refresh]])
(defn r []
(refresh)
;
Thanks for the wrapper, that turned out to be the problem with 'user'
namespace I was REPLing in (other namespaces were refreshed as expected).
While resolving this I also found out that :after option of refresh
function is indeed useful (my server was re-created with older version of
ring
2014-05-04 10:20 GMT+02:00 Cecil Westerhof cldwester...@gmail.com:
2014-05-04 10:09 GMT+02:00 Colin Fleming colin.mailingl...@gmail.com:
There's really no only way to do anything in Clojure, since you can
always drop down to Java interop. So anything that's available to Java is
available
I've never heard anyone express that sentiment before. If anything the
opposite is true.
A large part of writing secure code is about avoiding errors, so any
language feature that helps you write error-free code is good for security.
Functional programming eliminates mutable state as a source of
I'm a massive fan of Qt and have done a lot of Qt/QML in C++ in the past,
but lately when I've needed to do a GUI (and could use Clojure), I've been
making it Web based and using ClojureScript with Om. Since jetty/http-kit
run nicely as embedded servers, you could have your application run locally
How do you call a method which accepts Object arguments?
String/format |
http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html#format(java.lang.String,
java.lang.Object...)
user= (String/format %s foo)
ClassCastException java.lang.String cannot be cast to [Ljava.lang.Object;
I highly recommend taking a look again at JavaFX2. The latest version
(released as part of Java 8 or as a separate jar with Java 7) has a very
unified API and is a joy to work with.
I've been hacking on a library that provides a data centric API to JavaFX2.
The cool thing is that most of it is
C:\lein repl
nREPL server started on port 61472 on host 127.0.0.1
REPL-y 0.3.0
Clojure 1.5.1
Docs: (doc function-name-here)
(find-doc part-of-name-here)
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
Hello,
For 4clojure I have to find the second to last item.
So I did this:
(fn secondlast [v]
(get v (-(count v)1)))
Now it's only failing at this test : (= (__ (list 1 2 3 4 5)) 4)
Can anyone tell me where I did take the wrong way.
Roelof
--
You received this message because you
Hello!
I am working on a small Clojure web application, and while still in the
early stages of development, I have been thinking, among other things,
about a deployment plan.
The production environment for the webapp will be a CentOS server (not
virtual), the webapp will be sitting behind
On May 4, 2014, at 10:42 AM, Roelof Wobben rwob...@hotmail.com wrote:
For 4clojure I have to find the second to last item.
So I did this:
(fn secondlast [v]
(get v (-(count v)1)))
Now it's only failing at this test : (= (__ (list 1 2 3 4 5)) 4)
Can anyone tell me where I did
Also, don't forget that vectors are zero indexed, so (- (count v) 1) will
give you the last element, not the second last.
Cheers,
James
On Sunday, May 4, 2014 4:49:45 PM UTC+2, Lee wrote:
On May 4, 2014, at 10:42 AM, Roelof Wobben rwo...@hotmail.comjavascript:
wrote:
For 4clojure I
Roelof,
The whole point of something like 4clojure is for you to try to understand
how things work and learn how to fix the errors that happen along the way.
Open a repl and see what the error tells you. Also, you should have the
clojure cheat sheet open to help you find what each function
oke,
Then I think I have to work with a if then :
The second test is already a vector but the thirth not
(= (__ [a b c]) b)
(= (__ [[1 2] [3 4]]) [1 2])
I tried already the nth but I was also failing on the first. I think
because of count because you cannot know how many values you have.
Remember that indexes work from zero. So if you have a collection of 3
elements:
(nth [a b c] 2) = c
(nth [a b c] 1) = b
(nth [a b c] 0) = a
I'd encourage you to open a REPL and try the solution you have to see what
you get if you get stuck. Often some experimentation will show
How do you call a method which accepts Object arguments?
String/format |
http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html#format(java.lang.String,
java.lang.Object...)
user= (String/format %s foo)
ClassCastException java.lang.String cannot be cast to
Wow! Thank you very much, squeegee!
Great success!
user= (String/format %s %s (to-array (list foo bar)))
foo bar
2014년 5월 5일 월요일 오전 12시 9분 3초 UTC+9, squeegee 님의 말:
How do you call a method which accepts Object arguments?
String/format |
Arrow keys (left/right movement and up for history) on my lein repl in
Windows XP works fine. Sounds like something on your system.
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note
I'm no expert, but the arguments I have seen against Swing are
almost always about the API, so they do not really apply to seesaw.
The other arguments were about the non-native look, but I seem to remember
that seesaw took care of that too.
On Sunday, 4 May 2014, Timothy Baldridge
I'm in Windows 7.
Not only me: REPL-y bug | https://github.com/trptcolin/reply/issues/121
Google search | https://www.google.com/#q=windows+7+lein+repl+arrowsafe=off
2014년 5월 5일 월요일 오전 12시 26분 49초 UTC+9, George Oliver 님의 말:
Arrow keys (left/right movement and up for history) on my lein repl
Most functional languages have design features that enhance their security.
I'm referring to Clojure, Haskell, and Erlang, but this won't be limited to
those three. As someone who was hired to handle cyber security needs of a
contracting IT company, my personal and professional opinion is this: I
Have you looked at core.memoize, which uses core.cache under the hood? It
allows for pluggable caching strategies that might suit your use-case.
https://github.com/clojure/core.memoize
On Sat, May 3, 2014 at 10:27 PM, Mike Fikes mikefi...@me.com wrote:
Are there common techniques or idioms
Hi Deyan,
Modern web development tends to emphasise isolating system components into
separate processes. Rather than use a monolith container like Tomcat, it's
common practice to use an embedded web server combined with a reverse proxy
like nginx.
In the architecture I use, I have nginx running
It's due to jline not handling virtual key codes on Windows (which fails in
some [all?] non-US locales). This has been fixed on jline master
by https://github.com/jline/jline2/pull/134, but there's no jline release
available yet.
It'll be in the next REPLy release, even if I need to depend on
Keep in mind too that since test.check/quick-check takes a property as an
argument, you can construct a property by simply closing over some
implementation. For example:
(defn make-prop
[impl]
(prop/for-all [...]
(= (impl ...) (other ...)))
And then test with different properties
Hi,
every once in a while I am toying with an idea of doing string manipulation
in core.logic.
Naively trying to use appendo doesn't really work.
As far as I understand, most of the magic, that enables core logic to work
with lists is in the type LCons, that holds a sequence with tail that is
Well, what does it mean to write secure programs? Citation needed :)
I remember a lengthy discussion with coleague of mine about writing
cryptography primitives in haskell.
I suggested, that haskells strong typing and syntax well suited for
expressing mathematics, combined with good speed
On 4 May 2014 20:59, Adam Saleh adamthecam...@gmail.com wrote:
He thought, that using the language would make it harder to avoid cache
based and timing attacks due to nature of strict/lazy sequences.
That's a good point, and one I hadn't considered.
However, I can't think of any timing or
On Sun, May 04, 2014 at 09:24:08AM +0200, Cecil Westerhof wrote:
I heard the stand that functional programming made it difficult to
write secure programs. I do not know enough of functional
programming yet to determine the value of a statement like this.
What is the take here about it?
It
The most serious security vulnerabilities I've heard about for 2014 are
Apple's SSL/TLS/HTTPS vulnerability, the OpenSSL Heartbleed vulnerability,
FreeBSD's TCP bug, and of course the Mt. Gox bug that resulted in the
company's bankruptcy.
The Mt. Gox bug was caused by a flaw in the way they
Hi Deyan,
I also think that it's usually better to have a standalone Clojure app
with a built-in HTTP server, and possibly with a reverse proxy as a
frontend. You will have much more control this way, and Tomcat will not
surprise you with wiping your hotfixes.
About thread handling: it's
There's no easy way to do this beyond making your own relational string
type as you've suggested.
On Sunday, May 4, 2014, Adam Saleh adamthecam...@gmail.com wrote:
Hi,
every once in a while I am toying with an idea of doing string
manipulation in core.logic.
Naively trying to use appendo
... inspired this workaround, is there a better way?
Essentially, :expects and :requires are breaking the sort order when they
shouldn't, causing certain middlewares to just be in totally the wrong
place. I couldn't find the pattern after staring at for a bit. Since
leiningen calls
The conflict is introduced by trying constrain all the cider-middlewares to
live between pr-values and session, with wrap-exceptions needing to be the
first along the chain.
This mostly looks good, except for wrap-exceptions/session:
(wrap-describe
interruptible-eval
pr-values
wrap-load-file
The general technique in lisp is called hash consing (a.k.a. flyweight
pattern, a.k.a. interning). Java strings, clojure symbols, and keywords
are interned. And small integers, apparently.
The basic idea is to create memoized versions of all the data constructors
and only use them. This is
Perhaps Cecil is referring to this article, Clojure web security is worse
than you
thinkhttps://hackworth.be/2014/03/26/clojure-web-security-is-worse-than-you-think/,
describing
the immature state of Clojure's web security libraries. I don't think the
language itself has much to do with this,
Hello Timothy,
On Sat, May 3, 2014 at 8:49 PM, Timothy Washington twash...@gmail.comwrote:
Also, have you tried confirming that only one :a is instantiated?
That one *:a* is not the same instance throughout all the dependant
components. Seems that it's the [*:core :a*] bit that's passed
I've been trying to make a tokenizer/lexer for a project of mine and came
up with the following code,
I've modelled the stream of characters as seq/lazy of chars which is then
converted to a lazy-seq of token objects.
I'm relatively happy with how idiomatic and functional the code seems,
I created a gist of your code for better readability, I hope you don't mind.
https://gist.github.com/muhuk/7c4a2b8db63886e2a9cd
On Mon, May 5, 2014 at 12:36 PM, Andrew Chambers
andrewchambe...@gmail.comwrote:
I've been trying to make a tokenizer/lexer for a project of mine and came
up with
Thanks, I should have done that tbh. my code is on github
https://github.com/andrewchambers/ccc/blob/master/src/ccc/lex.clj . Don't
think it compiles or runs on master currently though.
If anyone is interested im trying to test the
feasibility/size/maintainability of a clojure (or
Hello,
I'm looking to formulate the inputs and analyze the outputs of a C program
using Clojure. I can both create and manipulate the native data structures
in Clojure using Vertigo[1], and for the JNA interop clj-native[2] seems to
be the way to go. In all the examples of clj-native I have
47 matches
Mail list logo