freenode/lisp - IRC Chatlog
Search
1:35:47
fragamus
Hi I’m writing a lisp and I wanted to ask if there is a consensus on the use of brackets and braces as in Clojure
1:42:08
no-defun-allowed
I do like [] in Scheme though in some places, like (let ([x 2]) x) where they are there to make sure you know you're working with special forms, so you know X isn't getting funcalled or something.
1:42:29
no-defun-allowed
And yeah, I'd guess they would, but in Scheme, {}, [] and () are equivalent.
1:43:36
fragamus
Yeah I was thinking that making them equivalent would reduce the nastiness of having to step over them in meta programming
1:43:55
no-defun-allowed
wrt "Clojure is not a lisp", see http://www.loper-os.org/?p=42, and from there we should stick to discussing design issues that are in Common Lisp.
1:45:24
no-defun-allowed
Well, we can't stop you from inventing another pseudo-Clojure, but it's not something I would reccomend.
1:52:15
White_Flame
similarly, I like prolog's distinction between "compounds" and "lists", where there's a special place for a head. With sexprs, you never quite know if a list is intended as code or not, or more generally if the 1st term is special or not
2:05:18
White_Flame
but in general, type inference brings a ton of the performance without demanding every single type be specified
2:05:59
White_Flame
it's way better that it remains optional, because that allows you to change your program first, without having to deal with all the optimization at that stage
2:06:20
White_Flame
and then lock in optimizations as performance indicates, after the design has settled
2:07:11
White_Flame
(I define "change" generally as making it more flexible to handle things it didn't before, which would interfere with static overly specific types)
2:07:48
White_Flame
right, but when it can't infer something, does it refuse to compile, or does it just handle type decisions at runtime?
9:40:58
beach
no-defun-allowed: You can use floats for the report I guess, since no calculations are performed that will change the result.
9:41:35
jprajzne
maybe check the locale first and then obtain the correct format for the operating system?
9:41:50
no-defun-allowed
Well, I haven't declared any number types more specific than REAL, so I'm just adjusting to represent everything in cents.
9:43:08
beach
jprajzne: I am not so sure I would trust the operating system. Mine say "jeudi juillet 18" for today's date for instance.
9:43:52
beach
... which is no doubt a translation of Thursday July 18, except that in France, the date comes before the name of the month.
9:43:58
ck_
no-defun-allowed: mm that's pretty daring of you. For our consultancy, please authorize payment of 3+4i AUS
9:48:21
ck_
nine plus half five sounds like someone is reading a clock and taking timezone differences into account
9:51:14
ck_
Welcome to the wonderful world of locales. What would Sir like? LC_COLLATE? _CTYPE? _MESSAGES? _MONETARY? _NUMERIC?
9:51:20
beach
By the way, if you type "99 in Danish" to the Google search engine, you can see how it is spelled too.
9:53:17
beach
I believe you. I tried to set everything to US English using the GUI tools. But it doesn't take it into account.
9:58:04
no-defun-allowed
Oh, speaking of clomptroller, I have to present a prototype tomorrow, so I'm currently finishing off implementing my UI design.
9:58:40
jprajzne
thus if you have set something else than US format and this happens, it's a bug again
10:12:39
jprajzne
technically, there's been so much crap written that we should not be writing code anymore
10:13:18
ck_
There's the quote about the star developer who said he should be measured by the lines of code he could remove, not the ones he added
10:13:20
no-defun-allowed
Has anyone had any experience with cl-typesetting? I want to change the font to Computer Modern (I have the CMU family) but I'm not sure how PDF font names work.
10:14:04
no-defun-allowed
jprajzne: "In the old days, you would chastise people for reinventing the wheel. Now we beg, 'Oh, please, please reinvent the wheel.'" Though, this might be #lispcafe material.
10:18:03
no-defun-allowed
Oh, the names correspond to AFM files bundled with cl-pdf for some Adobe fonts.
10:25:20
moldybits
can (declare (ignore x)) help a compiler optimize code? or more specifically, does it ever happen in practice?
10:29:39
jackdaniel
it will help you to notice, that you've started using something you've declared as ignored
11:48:04
ebzzry
Using ASDF, is there a way to determine the name of the system that is currently being loaded?
12:34:17
beach
jprajzne: Not necessarily. If the existing software is written in an unsafe language, or in a language that makes the software difficult to maintain, or in a language that is not supported by some operating system we are thinking of, then writing a better version is justified.
12:35:31
jackdaniel
English term "reinventing the wheel" is terrible at what it tries to illustrate, because wheel was reinvented many times for many reasons (i.e we do not drive on wooden wheels)
12:37:51
jprajzne
beach: yes, in reality. but aside from that, if it was good to run in production, we should be able to reuse it
12:38:36
jprajzne
but i rarely see people taking implementation x and reusing it with much of writing new code somewhere else?
12:42:24
jackdaniel
oh, thank you, I didn't know that. next time I'll bring that up against the "wheels" instead of Polish idiom