CodingThing which I wish to do with php...

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  Peter (BOUGHTONP)  
 To:  AND HIS PROPHET IS (MOHAMED42)     
34900.18 In reply to 34900.14 
I'm reading it in the afternoon and evening, so nur. :P
(started reading/replying at lunchtime, continuing now)

quote:
Everything that follows is contingent upon using decent development tools, etc.

This statement worries me - a good language shouldn't be dependent on a specific environment.
However, you neglected to state your preference for which tools are considered decent, which intrigues me.

Are you going to share tools which one who might be potentially about to agree with the rest of your post (but probably wont) would want to investigate?


quote:
First of all, the parentheses. You get used to them really quickly, and before long you actually stop noticing them. They also provide Lisp with some of its most powerful features.


No, see, it's not a case of noticing; I'm fine with that bit, it's a case of typing them and being able to read them.

I do CFML - half of it involves typing <cf at the start of every line - but that's not an issue because I can do <cfstuff> and <cfstuff></cfstuff> really quickly. If I had to do (cfstuff/) and (cfstuff)(/cfstuff) that would be a huge pain in the arse because of the placement of the parentheses on the keyboard. They're slow keys to type, and require a slight stretch, both of which are Bad.

Then there's the whole having to have a closing paren for every opening one - I use them in several of the languages I write, and it can be frustrating ensuring a couple of them line up. And yes, two of the three editors I use do bracket highlighting - it helps but it's not a solution.
With those simple examples, there are more closing parens than I can accurately count in an instant glance, which means there are too many, and would only get worse with more complex examples. (Peter Seibel remarked about leaving it upto the editor; I want punch him.)

The powerful features thing... you're going to have to expand on that, because I don't want to guess at what you're saying.
For something that makes readability so shit, it better be something so damned awesome that the thought of it fills me with euphoric glee.



quote:
Second, what you learned at uni was probably actually Scheme, which is technically Lisp but is really unlike Common Lisp. Scheme is designed to teach concepts; Common Lisp is designed to program with.

That doesn't contradict any of the memories I have, so you're likely to be right. Although my memories are limited both by being tired and through it being too boring to remember.
Eitherway, I'll give you the benefit of the doubt - but I assume the whole dumb parentheses stuff is still valid whichever dialect/version.



quote:
It's so ridiculously powerful that programming things in it almost feels like falling down the stairs, only you land in a soft pile of fresh laundry that smells like spring days and lemon instead of breaking something and going to the hospital.

That's an odd and worrying analogy, but one that doesn't work for me. I don't /do/ falling. :@


quote:
Third, Lisp is good for any common programming task. If I was more familiar with it, I don't think I'd use anything else.

I'm not convinced of that - as a concept of having One True Programming Language/Syntax that can be used for everything... I'm trying to think if I could combine everything I do (CFML+CSS+HTML+Java+JS+RegEx+SQL+XML) into a single syntax I was happy with.... akk, I dunno.
Maybe I could, maybe I couldn't, but certainly the example I posted is nothing like what I'd want to use (even excluding the excess parentheses) - it simply doesn't 'work' as a webpage syntax.



The majority of me thinks you're a nut, Peter Seibel a complete wally, and I should go do something constructive instead of wasting time with this whole thing.
I'm wondering whether I should even bother posting any/all of this reply... but there is a very small bit of curiousity in me, despite this horrendously ugly syntax, sparked by the claim of being super powerful.
So, go ahead and give me an actual example of that power - and if it's got the magnificent potential you claim, I may well be converted. :)
0/0
 Reply   Quote More 

 From:  AND HIS PROPHET IS (MOHAMED42)  
 To:  Peter (BOUGHTONP)     
34900.19 In reply to 34900.18 

I don't have time to do a proper reply right now as I'm preparing to fly across the continent tomorrow, where I will enfore at PAX, get outrageously drunk at every opportunity, and kiss as many girls as possible.

 

But I promise I will compose a reasonable response when I get home, provided you respond to this message so I have an email reminding me about this thread.


--
XML is like violence. If it hasn't solved your problems yet, you're just not using enough.
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  AND HIS PROPHET IS (MOHAMED42)     
34900.20 In reply to 34900.19 
:O

Are you going to come and bomb me?
0/0
 Reply   Quote More 

 From:  AND HIS PROPHET IS (MOHAMED42)  
 To:  Peter (BOUGHTONP)     
34900.21 In reply to 34900.20 

I dunno, do you live in Seattle?

 

I mean no! I'm not going to bomb anyone. But if you live in Seattle then we could go to the Taphouse together and we could both get tanked.

 

I was going for a military type reference there where I used a word that was kind of like "bomb" only instead of "bomb" it was "tank" and it meant getting drunk not dying, but I'm not sure that the joke I was trying to make with bombs and tanks and booze and stuff really worked but if you could do me a favor just to be nice and say that you laughed, just to be a pal and stuff, that would be really great thanks.


--
XML is like violence. If it hasn't solved your problems yet, you're just not using enough.
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  AND HIS PROPHET IS (MOHAMED42)     
34900.22 In reply to 34900.21 
I laughed at your explanation, if that helps? :)

I don't live in Seattle, or drink alcohol, but I did understand the reference/joke, so you can relax. :)
0/0
 Reply   Quote More 

 From:  koswix  
 To:  Peter (BOUGHTONP)     
34900.23 In reply to 34900.22 
quote:
or drink alcohol


That's ok, I drink enough for both of us.


Lucky Pierre, a sexual position in which during a three-person sexual encounter with at least two men participating, one male penetrates the anus of the other male, who is simultaneously penetrating either the anus or the vagina of the third person. The man in the middle, who both gives and receives, is the "Lucky Pierre".
0/0
 Reply   Quote More 

 From:  99% of gargoyles look like (MR_BASTARD)  
 To:  DarkBadger      
34900.24 In reply to 34900.1 
I bet you're wishing you hadn't asked now.

some things never change
0/0
 Reply   Quote More 

 From:  Ally  
 To:  DarkBadger      
34900.25 In reply to 34900.1 

If it's an internal thing hosted on IIS you can grab the current username, I did exactly that a few months ago. I remember it involved a lot of fucking about, though.

 

That said, if you're running PHP it seems unlikely you're on IIS.

0/0
 Reply   Quote More 

 From:  DarkBadger   
 To:  Ally     
34900.26 In reply to 34900.25 
Nah, it's Apache but another project with an outsourced developer is working on calling a .NET script from php or sommat. I'm going to call them and ask WTF 'cause I can't see that being secure\seamless but if they manage it, I'll just nick their code.
0/0
 Reply   Quote More 

 From:  Ally  
 To:  DarkBadger      
34900.27 In reply to 34900.26 
.NET from PHP sounds about right, actually. Mental though it is. IIS offers some option (my memory is hazy) whereby every user is automatically authenticated as their Windows login, so there's a $USER variable in there somewhere. or something along those lines.
0/0
 Reply   Quote More 

 From:  99% of gargoyles look like (MR_BASTARD)  
 To:  Ally     
34900.28 In reply to 34900.27 
What if they don't have a Windows login?

some things never change
0/0
 Reply   Quote More 

 From:  Ally  
 To:  99% of gargoyles look like (MR_BASTARD)     
34900.29 In reply to 34900.28 
Then they shouldn't have access to your network.
0/0
 Reply   Quote More 

 From:  99% of gargoyles look like (MR_BASTARD)  
 To:  Ally     
34900.30 In reply to 34900.29 
Ahh, right, I thought that this was some kinda interweb thingy, not intranet.

some things never change
0/0
 Reply   Quote More 

 From:  Ally  
 To:  99% of gargoyles look like (MR_BASTARD)     
34900.31 In reply to 34900.30 
Well I don't think he actually said, but there's definitely no way of getting someone's Windows login over the internet.
0/0
 Reply   Quote More 

 From:  99% of gargoyles look like (MR_BASTARD)  
 To:  Ally     
34900.32 In reply to 34900.31 
Yeah, I suppose even Microsoft wouldn't be dumb enough to have a security hole like that.

some things never change
0/0
 Reply   Quote More 

 From:  AND HIS PROPHET IS (MOHAMED42)  
 To:  Peter (BOUGHTONP)     
34900.33 In reply to 34900.18 
Let me just apologize up front that this (probably) doesn't make much sense. I'm not very good at explaining things like this without actually showing examples.

I only said that thing about tools because I only have serious experience with my tools of choice. I'm sure that not everyone uses the same tools as me, and they all seem happy with Lisp. (I'm skipping talking about tools because I want to say a lot about other stuff :p)

As for powerful features... to some extent you're going to have to either take my word for it or be willing to get your hands a bit dirty with Lisp. If you're willing to learn a bit of Lisp, it won't take long - a few hours maybe - to "get" it. It's not really the kind of thing that can be communicated without showing some examples, but since they'd have to be in Lisp and you don't know Lisp we're left with a bit of a catch-22. Eric Raymond (I know, I know) has this to say about it:

quote: ESR
LISP is worth learning for a different reason — the profound enlightenment experience you will have when you finally get it. That experience will make you a better programmer for the rest of your days, even if you never actually use LISP itself a lot.


If learning a new programming language changes the way you think about programming (or gives you another way to think about it), then certainly learning several languages - especially diverse ones - will give you more ways to approach programming. And having more "tools" to apply to programming is a good thing, right? This is why you should learn Lisp, even if you never intend to use it.

Okay, moving on.

The main benefit to the parentheses is that they mean that all Lisp programs are lists. And since Lisp is at its core a list processing language, there is essentially no distinction between code and data. This is what gives Lisp most of its power - especially (don't cringe) Lisp's macros. Other languages have things called macros but they are not the same thing. Lisp's macros mean, in short, that Lisp is a programmable programming language. Which doesn't really make sense (at least it didn't to me) unless (I keep coming back to this) you actually give it a shot and see for yourself what can be done.

When I said that Lisp is good for any common programming task I didn't mean that it can, or should, be used as a replacement for HTML, XML, CSS, JS or regexes. Oh, God, that would be awful. I just meant that it is a good "core" programming language, like C or Java or Python. It gets pushed aside as "that old AI language" quite often, and while it does have roots in AI research it has moved far beyond that. It also has libraries to handle regular expressions, XML, and so on. (And yes the example you showed with the fake HTML was hideous.)

Anyway if you're willing to take an hour or so to learn the syntax and then look at some examples, I'll be happy to gather some things up and put them together into something cohesive and (I hope!) easy to digest. I'm confident that if you see some Lisp macros in action you'll quickly come to grasp the power that they provide.

If you need further prodding, consider that Lisp was invented before OO programming, but now fully supports OO (quite a bit better than most C-based languages...) and was able to incorporate it without any modification to the base language and without any kind of preprocessor being written. Some implementations of Lisp also include Aspect Oriented programming, if that's your thing.

--
XML is like violence. If it hasn't solved your problems yet, you're just not using enough.
0/0
 Reply   Quote More 

 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  AND HIS PROPHET IS (MOHAMED42)     
34900.34 In reply to 34900.33 

I do kind of agree with some of that. Certainly, learning lots of different languages that work in different ways is good for your general programming skills. I've been learning Ruby and I'm hoping to get more into F#, but what I've done of those so far has really helped my C# 3.0 coding and changed the way I approach certain tasks. Particularly with the shift toward multi-core-aware programming, using some of the functional principles is a massive help.

 

Personally though, I know Lisp (well, Scheme) and I don't get on with it.


Twinkle, twinkle, little star, I don't wonder what you are:
You're the cooling down of gases, forming into solid masses.
0/0
 Reply   Quote More 

 From:  AND HIS PROPHET IS (MOHAMED42)  
 To:  THERE IS NO GOD BUT (RENDLE)     
34900.35 In reply to 34900.34 

Scheme is a Lisp but it's not an implementation of ANSI Common Lisp, which is what most people really mean when they say "Lisp".

 

Just, you know. FYI.


--
XML is like violence. If it hasn't solved your problems yet, you're just not using enough.
0/0
 Reply   Quote More 

Reply to All    
 

1–20  21–35

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats