124 points · by swannodette · 15y ago · 52 comments
The executable was small, and it was easy for the users to pass around a little 1MB .exe file on windows (also had a separate compiled version for OS X) and they used it for years after I left until the web pages it targeted changed (and I don't work there anymore).
If somebody is open to learning Scheme, you can't go wrong building something in Racket, I was pretty surprised what I accomplished in a month.
<pedantry> If each part is replaced in series, and the identity of the object remains the same after each step, then clearly the object remains the same. For humans identity is thus based on recognizing what you have seen before; it acknowledges mutable state. In this case, if you consider the brand as a mutable property of the object, then yes, the identity of PLT-Scheme and Racket are the same. </pedantry>
It looks to me like a lot of the core PLT guys were involved in the R6RS debacle, and didn't like what came out of the process so decided maybe they aren't quite an official "Scheme" anymore per R6RS. Oh the drama...
That said, I believe the have implemented scheme in Racket. I think PG implemented Arc in it too. It also comes with Algol-68 I think.
I can not wait until this is fixed. I can't hardly use toolkits anymore because I keep insisting on programming in languages with sane concurrency stories and that drives the toolkits insane.
(I fully acknowledge the scope of my request and further fully acknowledge that this will almost certainly require something written from scratch. And that writing a toolkit from scratch is a tall order. And that now's a bad time to start trying because the alternate concurrency stories are in flux and it's not really a great plan to write something that works in Haskell but can't work in Erlang or Racket. And also now's not the best time because the very graphical underpinnings in Unix are now being called into question and, given that this is a multiyear project, it could build on X only for X to be on its way out.
But still, I can't wait.)
"Each QThread can have its own event loop. You can start the event loop by calling exec(); you can stop it by calling exit() or quit()." http://doc.qt.nokia.com/stable/qthread.html
I've used this successfully.
That being said, that certainly is still an obstacle if you're preferred lang isn't scheme/racket. Perhaps their wrapper code could be factored out as a new abstraction layer for these gui tool kits?
That's not the same thing as saying 200K of C++ equals 30K of Scheme.
Seems like this way they suffer through the platform specific pain themselves, but the bugs are all in a language they want to program in.
ffi-obj: couldn't get "GetWindowLongPtrW" from "user32.dll" (The specified proce dure could not be found.; errno=127)
=== context === D:\p\racket\collects\ffi\unsafe.rkt:176:2: get-ffi-obj* D:\p\racket\collects\mred\private\wx\win32\utils.rkt: [running body] D:\p\racket\collects\mred\private\wx\win32\sound.rkt: [traversing imports] D:\p\racket\collects\mred\private\wx\win32\procs.rkt: [traversing imports] D:\p\racket\collects\mred\private\wx\common\cursor.rkt: [traversing imports] D:\p\racket\collects\mred\private\kernel.rkt: [traversing imports] D:\p\racket\collects\mred\private\check.rkt: [traversing imports] D:\p\racket\collects\mred\mred.rkt: [traversing imports] D:\p\racket\collects\mred\main.rkt: [traversing imports] D:\p\racket\collects\racket\gui\base.rkt: [traversing imports] D:\p\racket\collects\drracket\drracket.rkt: [traversing imports]
[Exited. Close box or Ctrl-C closes the console.]
I've got it almost working by replacing GetWindowLongPtrW to GetWindowLongW and SetWindowLongPtrW to SetWindowLongW - you have to search in all .rkt files. I also deleted the precompiled .zo/*.dep files (wasn't really sure whether I needed it).
You could probably replace it with 10k lines or Python or Ruby too, but it would run like shit compared to the C/C++ version, but because this is HN and they are using lisp, this is news.
Not everyone trades efficiency for reliability and comfort. Some people really get to have their cake and eat it too.
http://shootout.alioth.debian.org/u64/benchmark.php?test=all...
I would characterize the differences vs. C++:
1.) substantially slower in all but one case 2.) almost always uses more memory, sometimes drastically more 3.) marginally more compact
No...? Is there another acceptable answer for this? In which cases is such an "upgrade" slowdown acceptable to the customer?
[EDIT: Changed most to many. But I think arguments about whether or not speed matters are silly in the general case. Arguments about tradeoffs are always going to be so specific to your app that a general argument is fairly meaningless.]
In exactly those cases where the customer cares more about the added benefits (e.g. security, maybe more features) than speed.
For example, I use firefox even though I've noticed that Chrome is snappier because Firefox comes with addons that provide features that I cannot do without. In this case, I have made a tradeoff between speed and features.
CPU is vastly cheaper than programmer time. There is a point where the tradeoff becomes unprofitable, but to prioritize code speed over all else is a recipe for terrible software.
If you're doing number crunching or heavy 3d, then it requires further thought, but if the code in question isn't one of your CPU usage hot points the conciser code is totally worth it.
It depends on how the slowdowns translate to absolute slowdowns in human perceptible time. Which depends very much on the kind of problem, and whether a piece of code is on the "critical path" for anything.
kb