I have recently gotten into a lot of Scheme programming but I am wondering which implementation I should use. Which implementations are considered the "major" ones and what are the various pros and cons of each? I'm running on an Ubuntu Linux box and right now I have PLT Scheme and Guile installed. Are there other implementations I should consider? Ultimately I would like to be able to create GUI applications, and any cross-platform support would be very nice. PLT Scheme seems to have a compiler, and if an implementation lets me create native binaries (for my Windows-using friends) then that's also a bonus.
>>23
Hmmm, it seems that you are without a doubt a raging homosexual. One in ten people they say. Certainly the odds are not against it.
Please don't feed trolls.
>>26
I agree that getting involved in discussions with trolls is most boring and repetitive, I believe that this individual is not a troll, but rather someone who was "insulted" by my correction. Before you scold me for my beliefs, wouldn't you agree that you believe as well as I do on the matter; because you believe he's a troll, and I believe he's not one.
You'll also note that all my replies insofar to this thread have been 'sage' posts, namely >>20,23,25 and the one you read now.
>>25,27
Contrary to what most homosexuals believe, the phrase "it seems" does not have in it implicit connotations of doubt. And it does seem that for the particular demographic of you, yourself, and probably your boyfriend, the odds are 1 in 1. And certainly I appreciate your opinion of me as not being a troll.
>>22-25,27-28
same person.
>>29
Person who is usually slowest in the uptake in conversations.
>>1-30
Conversation which has been derailed; not that there were tracks in the first place.
Place full of retards.
gcj (gnu compile java) is a good option. It supports Swing and compiles natively on windows and Linux. While easy to program the binaries are (still) large. Most have Java these days - if that is the case, a JAR distribution is small. You can run them with gij (gnu intrepreit Java).
Ruby is great too .. you can same some coding there. not sure about the gui for this though. I prefer coding html and just using the browser. You'll have to be a Javascript guru in the long run to make this work right.
Oh, God damn it, nevermind...
reported
http://www.pastebin.com is a wonderful site.
10 BAN
20 GOTO 10
bump for wasn't this permasaged a while ago?
What do you all think about C++? I'm just starting off on programming and was going to use C++ as my first. When it comes to programming, I know little to nothing about the technical, in-depth details. In some places (mainly /prog/), I've heard C++ isn't all that great and isn't worth learning. But again, what do you all think?
>XNA
Xna is intended more for independent games, often from one man development teams.
Most large studios will either write their own engines, or license middleware, like Unreal 3, or something similar.
C++ was my third language after C64 Basic and Pascal, respectively. While it is a very powerful language, it does come with a lot of responsibility on the programmer's part. In part, that is why people are slowly moving away from it. It is still a de-facto standard in games and operating systems, but that will slowly change as well (google Microsoft Singularity and Microsoft Midori). Also, its syntax can be a bit verbose and the standard libs are a bit archaic.
I have also learned C, Java, JSP (basically Java for webapps), C#, Perl, and Ruby. Out of all these languages I like Ruby the most. It feels very natural to program in it once you get used to its syntax and the fact that it is dynamic. I'll give you a (contrived) comparison/example between C++ and Ruby
C++
for(int i = 1; i <= 10; i++)
{
cout << i << " ";};
>>39
c♯ (which you apparently don't know as well as you think you do):
foreach(var i in Enumerable.Range(1, 10)) Console.Write("{0} ", i);prolog:
numlist(1, 10, L), forall(member(N, L), format("~d ", N)).haskell:
mapM_ (putStr . flip shows " ") [1..10]factor:
10 [ 1 + pprint " " write ] eachDude, no need to brag. We all know you da pro. I wasn't giving an example of each/foreach and I was doing a C++ vs Ruby comparison, but I guess you are too lazy to read the post. Plus, I said the example is contrived.
Anyways, you brought up a good point with these examples. Only factor comes somewhat close in simplicity/succinctness to the Ruby example.
Oh yeah, I forgot to add 'each' version of Ruby:
(1..10).to_a.each { |n| print "#{n} " }
or
(1..10).to_a.each do |n|
print "#{n} "
end
(dotimes (n 10)
(print n))If you have implemented the map0-n utility, then you can write it as:
(map0-n #'print 10)>>41
the c♯ one was just to point out that you were wrong when you wrote
> (with exception of Perl) they are all more or less similar to C++.
all four examples of those examples are simpler than your ruby example, and two of them are more succinct. you don't seem to realize that neither "simple" nor "succinct" are directly related to the number of characters. for example, for i in 1 2 3; do echo $i; done is a lot simpler than :(){:|:&};:, which is much shorter.
and the prolog one isn't as simple and succinct as it could be:
forall(between(1, 10, N), format("~d ", N)).We can spend a whole day debating the meanings of simplicity and succinctness. I realize that your views are not open for interpretation. Thus, there's no room for debate.
>>(with exception of Perl) they are all more or less similar to C++.
What I meant by this is that other languages I numbered (Java and C#) are syntactically quite similar to C++, which is no surprise considering that they share same (read: C) ancestry. It is my view that C#'s version of foreach follows quite different and, arguably, more verbose syntactical patterns when compared to Ruby. I am sorry it sounded like an attack to your favorite language that C# obviously is. It wasn't my intention at all. On the contrary, I prefer it to Java.
I do not agree that all four examples are simpler (at least, in my view of simplicity). I do agree that factor example is shorter (i.e., less verbose) but not necessarily any more obvious than the Ruby version is. That said, it might very well be a matter of being used to one favorite language. It is, therefore, hard for any programmer (not only me) to be entirely unbiased when it comes to rating programming languages.
The Ruby example does not need a to_a().
Here's a slightly different implementation, similar to Factor's:
10.times { |n| print n+1, " " }> Ruby code is actually quite clean and you can always omit line noise by simply doing a do...end construct instead and you can also omit ().
for >>44's prolog code, you only need to know forall, between, and format.
for your ruby code, you need to know .., .to_a, .each, do ... end, |...|, and print.
"line noise" has nothing to do with it.
I need some help with a simple problem involving the basic logical operators: AND, OR, and NOT, along with the relational operator EQUAL TO, and truth values TRUE and FALSE.
Let's assume that we have a function tD() that tests whether 3 integers are all different. So, tD( 1, 2, 2 ) will return FALSE, and tD( 6, 6, 6 ) will return TRUE.
Now, my problem is to define a function the uses the above to determine whether or not 4 integers are equal. Let's call it
bool fE( a, b, c, d )defined completely in terms of
bool tD( a, b, c) and the aforementioned operators.
you can write in any code you prefer.
> Therefore, your function fE(1, 2, 1, 1) will return TRUE. But is it true that they are all equal? NO.
It would not, with my definition (or at least what I understood from your definition).
But fine, with your definition of tD(), yes, it wouldn't be correct.
I have another question, do you consider TRUE and FALSE as integers? (1 and 0). It would make things easier in solving this
>>17
Your definition doesn't really make sense to me:
(((a & b & c) | b | c) == a)Since a, b, and c are integers, and | is a logical operator,
(((a & b & c) | b | c) will always evaluate to TRUE unless a, b, and c are all 0.
here is what tD() would look like in C:
bool tD( int a, int b, int c )
{
return !( (a == b) || (b == c) || (a == c) )
}>>14
Oh, I though tD returned true when all three are not the same. After reading >>16, I don't think there is an actual solution to this unless you know beforehand that a,b,c,d are all not a specific value. If you know that, then you can do
frE(a,b,c,d) = not( thrD(a,b,k) or thrD(a,c,k) or ...[rest of the pairs])
Otherwise, I don't see any solution.
So why are you making up utterly pointless homework problems? Just get a job in academia already if that's what you want to do.
Also, your problem is unsolvable as stated.
tD(a,a,a)==tD(a,a,b)==tD(a,b,a)==tD(b,a,a)==FALSE
However, fE(a,a,a,a) != fE(a,a,a,b), but as fE can only be defined in terms of the above expressions, which all have the same value, fE(a,a,a,a) will be equal to fE(a,a,a,b) no matter how it is defined.
bool fE(a, b, c, d){
return tD(0, 1, 2) && a == b && b == c && c == d;
}>>23
YOU JUST WON THE GAME!
>>22
take a chill pill dude.
GREAT GOING KID!
lol the hilarious memories
Anyone programmed in ADA? If so what's your experiences.
there was nothing particularly good or bad about it, its useable but i would never use it for anything since i can never see a reason.
The only experience I have with Ada is from the examples at rosettacode.org. The feelings I have are that Ada is an over-the-toply complex, verbose and boring language.
Oh well. Someone prove me wrong. Maybe Ada can serve some purpose?
>>6
So why would anyone use it instead of Java, which is a more popular over-the-toply complex, verbose and boring language?
There are some interesting uses, like SPARKAda.
If you're writing software that lives will depend on, it should be criminal to not use something like it. Apparently a lot of medical equipment doesn't, which creeps me out.
>>8
what really creeps me out is seeing a windows BSOD on medical equipment.
>>7
Maybe because of the standardized compilers
Code a missile's CPU.
That's about it.
>>11
I don't think there's any ada compilers for playstation 2.
I'm looking for some good 2d game engines to create games using C++ i know there are plenty(ish) about but i want to know which ones are good, and if you know of any books that can guide me through creating 2d games for beginners let me know.
I was reading a book that uses llamaworks2d game engine but it actually doesn't work -_- and it got recalled, so now im stuck for where to go next.
Thanks
>>32
what a fucking idiot.
"Listen" here is not literal, it asks for attention.
"Read, OP just wants someplace to start" is plain wrong.
>>33 That's the Joke </McBain>
Laughing time is ovah.
I found OpenGL easier to use than SDL or Allegro. So what if its a 3D api, it can just as easily be used for 2D. If you use GLUT and youve got a little C++ experience under your belt, the tutorials around the net should see you through.
Even though it can be used for 2D, 2d-cards can't accelerate GL, which means running your 2d-only game on lower-end graphics cards really sucks a lot more than it would otherwise have to.
I really like my matrox dualhead board- it has the fastest 2d and xv support out of any of the graphics cards (including when compared to 3d boards) I've tried. It doesn't have any gl/3d support however at all.
jobby
You can look for SFML, it's new but pretty good... and very fast :P
and who use a 2d cards these day ?
Just try fml, simple & fast ;)
>>24
I think he was reffering to how often it checks for keyboard input
that's it i'm going to gb2/prog/
>>15
Do you sometimes wish you were you?
CLS
GOTO START
>>17
Hello. I am ELIZA. How can I help you?
sage
>>19
Please go on.
1 PRINT HELLO HOW ARE YOU?
2 SAGE
3 GOTO 1
You yust dont know how to write fast code
sage
Requesting a permasage for this thread, please.
I found out a day or two ago I have to read all these papers and case studies at my job about Agile software development (mostly with SCRUM) and I was wondering what the programming board thinks of the Agile method.I think its not any different then when I was programming on my own just more focus on working programs, less documentation and customer satisfaction. Sounds like a cluster fuck to me.
Here's some info for people who don't know:
http://agilemanifesto.org/
http://en.wikipedia.org/wiki/Agile_software_development
http://en.wikipedia.org/wiki/SCRUM
>Agile software development
It's like all those shitty Web 2.0 sites that display BETA in their logos like it's some kind of badge of pride.
Perpetual Beta = You're doing it wrong!
>>5 the business of programming
>>6
you can make a business out of anything, that doesn't mean it's relevant to it.
>>7 yes it does
So, back on topic...
I have studied Aagile methodologies and tried to apply them in the workplace where the development typically followed the waterfall model [http://en.wikipedia.org/wiki/Waterfall_model]). I have found that many of the Agile concepts only work if you have highly skilled developers that can write self-documenting code.
Following the DRY (Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don't_repeat_yourself]) principle, means programmers should avoid 'double duty' whenever possible. Often documentation is analogous to the code that expresses it ... which often seems like wasted effort. I believe Agile is an extreme form of the DRY principle.
IMO, the waterfall model is better suited to development teams that are not as skilled at software development. Unfortunately in the real world at most development shops, not every programmer has the skills and discipline needed to work effectively in a strict Agile development environment.
JavaMan out!
JavaMan can's spelll...
Fuck Fowler and the rest, man. The good parts of Agile are obvious, and easy to apply. Learning these should take you about 15-30 minutes. The rest of it is pure cockvomiting bullshit, a lame attempt to spin a few decent ideas into another [b][u][i]ENTERPRISE BEST PRACTICES METHODOLOGY[/i][/u][/b] and sell a lot of books.
[b][u][i]ENTERPRISE BEST PRACTICES METHODOLOGY[/i][/u][/b]
Only have experience with RAD here. It was a horrible experience. No one had the full picture what was going on. A clusterfuck trying to integrate the different layers since no one knew how the different parts should communicate with each others. Since there were minimal planning everyone had their own picture how the system would look like resulting in nothing being delivered.
I dabble occasionally in HTML/CSS for my own amusement, though I'm certainly not an expert. and there's two particular and slightly related things i'm trying to work out.
first off i'm trying to do one of those corner banner things (like the "make poverty history" ones everyone had a while back) so i have the thing absolutely positioned in the top right, the image itself is a gif with transparency and i'm using an image map (which seems a little..oldschool to me, but still) to link only the actual banner area of the image.
but is there any way to make the stuff visible beneath the transparent areas of the image behave as it otherwise would if the image wasn't present? text selectable, links clickable and so forth. currently it just acts as if the whole rectangle is an image. ideally i'd like to only define the "image" as the actual polygonal shape that makes up the visible area. if that makes any sense.
secondly, and relatedly, is there any way to define a non-rectangular block to contain text? like |______\ shaped for the particular thing i'm trying to do.
so yeah. Basically i'm wondering if it's possible to have shit that isn't rectangular.
http://alastairc.ac/2007/02/dissecting-css-polygons/
Take a look at this...it's complicated, but possible...
use svg. it's a lot easier.
Here's an image viewer I recently wrote, in common lisp.
You'll need lispbuilder-sdl and lispbuilder-sdl-image for this, also com.gigamonkeys.pathnames. All the source of PCL here, http://gigamonkeys.com/book/practicals-1.0.3.tar.gz
esc escapes the viewer
space views the next image, backspace the previous. If there's no other image to show, the program exits.
You can invoke VIEW with both a single image to view or a directory to be searched recursively and show the images.
Example, (view "/path/to/pictures"), (view "/path/to/pictures/foo.jpg")
(defparameter *supported-formats* '(".bmp" ".jpg" ".png"))(defun list-to-array (list)
(and (listp list)
(make-array (list (list-length list))
:initial-contents list)))(defun valid-image-p (p)
You'll have a hard time convincing people to install SBCL. :o
>>2
Which people? I've got it installed already, as do several people I know.
> Which people?
people who don't fantasize about oatmeal with toenail clippings in it.
I feel a bit bad about >>2. I'm actually happy to see some variety in code.
Common Lisp spooks me due to its sheer size though. If only Scheme had a useful set of mature libraries.
Unrelated aside: it seems Factor has first-class macros. How does that work?
(coerce list 'vector) is a shorter way to do list-to-array.
The one-letter variable names are hard to follow.
>>6
Thanks, I'm still at the first learning steps. COERCE seems to be the abstraction I was in need but unaware of.
As for the one-letter names, I agree. It's how I write code because I don't want to waste time thinking for a name when the code to-be-written is at hand. When the code portion is done, I take time to rename the symbols, but in this particular instance I was so excited from my first lisp program that I shared the source omitting this step.
OP again
This is a simple drawing program.
You can either draw in a white canvas or on top of an image of your choice. Use (draw) or (draw "/path/to/foo.png") for example.
It has 7 colors, red, orange, yellow, green, blue, indigo, violet. You can change color with spacebar, save your drawing with s (which will either save to file lisp.bmp if you were drawing on a white canvas else /path/to/foo.png.bmp) and exit with escape.
(defparameter *supported-formats* '(BMP JPG PNG))
(defparameter *color-pallete*
(circular-list
(mapcar (lambda (x) (apply #'sdl:color x))
'((:r #16rff :g #16r00 :b #16r00) ; red
(:r #16rff :g #16ra5 :b #16r00) ; orange
(:r #16rff :g #16rff :b #16r00) ; yellow
*))(sdl:update-display))))))
These were missing from the source I posted. Append them to what's been posted already.
CL has special syntax for bits, octal, and hex, and #r is the escape hatch for other bases. So instead of #16rFF, I'd write #xFF. You could also write it as #b11111111 or #o377 but that would be silly...
>>10
Ah, that's better.
There's something else I realized, the implementation of circular-list can be simplified:
(defun circular-list (lst)
(let ((lst (copy-list lst)))
(if lst (nconc lst lst))))and if the WHEN-BIND macro is available, (on lisp), it could be written even sorter.
Your website has a lot of lisp code, cool. :-) Once I feel more comfortable with my lisp knowledge and I've read some more chapters from the book I mentioned before, I think I'm going to start reading others' code, so your website will come handy.