Search found 394 matches

by m i c h a e l
Mon Mar 20, 2017 3:41 am
Forum: Anything else we might add?
Topic: FOOP destructors?
Replies: 4
Views: 6327

Re: FOOP destructors?

FOOP. The F should be a P. :-)  FOOP was never meant to be a complete object-oriented system. In fact, without references in FOOP, it’s not possible to write complex OO simulations. Still, it made working in newLISP (a functional programming language) more natural for someone who thinks in OO term...
by m i c h a e l
Mon Feb 15, 2016 7:38 am
Forum: Anything else we might add?
Topic: Question for neglook
Replies: 2
Views: 3293

Re: Question for neglook

Hi hotcore! Thank you for the kind words about the videos. They were definitely a labor of love. I started out using Keynote and then moved on to After Effects. Keynote can do quite a bit if you use it creatively. After Effects is more difficult to start using in the beginning but is far more capabl...
by m i c h a e l
Sun Apr 27, 2014 6:34 am
Forum: newLISP in the real world
Topic: How to deal with lists of objects?
Replies: 4
Views: 1222

Re: How to deal with lists of objects?

When a method does not return a specific value, I usually return self. This was (is?) considered good practice when programming in Smalltalk. It allows you to chain method calls together. As to how inefficient it is, well, Lutz will have to be the one to address that.

m i c h a e l
by m i c h a e l
Fri Dec 20, 2013 3:32 pm
Forum: newLISP in the real world
Topic: What benefits did you get from FOOP?
Replies: 9
Views: 1582

Re: What benefits did you get from FOOP?

Hello fellow newLISPers! Long time no speakie. At the time “FOOP” was born, it was functional because of its immutable objects. Soon, however, FOOP lost its functional nature and became what it is today (the right choice, in my opinion). That left FOOP’s poor "F" without its original meaning. I joki...
by m i c h a e l
Thu Jan 24, 2013 1:21 pm
Forum: newLISP in the real world
Topic: How to set in object parameter list...
Replies: 2
Views: 743

Re: How to set in object parameter list...

I cannot think of a way of doing this, other than defining an accessor: > (context (new Class 'Node)) Node Node> (define (location lst) (if lst (setf (self 2) lst) (self 2))) (lambda (lst) (if lst (setf (self 2) lst) (self 2))) Node> (context MAIN) MAIN > (setq n (Node "test" '(5 3))) (Node "test" (...
by m i c h a e l
Mon Jan 21, 2013 10:58 am
Forum: Whither newLISP?
Topic: Object Philosophy...
Replies: 1
Views: 2881

Re: Object Philosophy...

The way I do this is to define class constants: > (context (new Class 'Point)) Point Point> (constant 'x 1 'y 2) 2 Point> (define (move new-x new-y) (setf (self x) new-x (self y) new-y) (self)) (lambda (new-x new-y) (setf (self x) new-x (self y) new-y) (self)) Point> (context MAIN) MAIN > _ Within t...
by m i c h a e l
Tue Jan 01, 2013 12:19 pm
Forum: newLISP in the real world
Topic: -=((( HAPPY NEW YEAR 2013 )))=-
Replies: 8
Views: 1256

Re: -=((( HAPPY NEW YEAR 2013 )))=-

I'd like to second Jo's thanks to Lutz and cormullion. Lutz for developing this beautyful language that finally ended my search for the perfect one. And cormullion for always being ready to lend a helpful and friendly hand here at the club. Here's to another year of Lutz, cormullion, and newLISP! m ...
by m i c h a e l
Mon Dec 03, 2012 5:53 pm
Forum: newLISP in the real world
Topic: formatting 'nil'
Replies: 9
Views: 1151

Re: formatting 'nil'

cormullion,

Yes, I'm still here, lurking in the shadows. I don't do much programming lately, but I'm still an enthusiastic newlisper!
by m i c h a e l
Mon Dec 03, 2012 5:38 pm
Forum: newLISP in the real world
Topic: formatting 'nil'
Replies: 9
Views: 1151

Re: formatting 'nil'

cormullion's solution is considerably faster:

Code: Select all

> (time (replace nil fruits "") 1000000)
173.114
> (time (map (fn (x) (or x "")) fruits) 1000000)
3435.875
> _
> 
m i c h a e l
by m i c h a e l
Fri Apr 20, 2012 7:03 am
Forum: newLISP in the real world
Topic: regex help
Replies: 5
Views: 946

Re: regex help

Hi joejoe!

Will this work for you?

Code: Select all

find-all {<item>(.+?)<\/item>}
Hope this helps.

m i c h a e l
by m i c h a e l
Fri Dec 16, 2011 5:48 pm
Forum: newLISP in the real world
Topic: [itn book] colon prefixed mode not working
Replies: 7
Views: 1665

Re: [itn book] colon prefixed mode not working

... shouldn't class declaration go inside each class defining file? You should put it into its own file if the class definition is large enough or if you will be using the class in multiple projects. Short class definitions or project specific classes don’t need to go into separate files. michael -...
by m i c h a e l
Thu Dec 15, 2011 5:33 pm
Forum: newLISP in the real world
Topic: [itn book] colon prefixed mode not working
Replies: 7
Views: 1665

Re: [itn book] colon prefixed mode not working

I completely forgot about not needing to define a parameter for the object! I said I was rusty ;-) conan, this means wherever we had a parameter for the object we would remove that and use self instead: ; definitions (define (Time:Time (t (date-value)) (zone 0))    (list Time t zone)) (define (Time:...
by m i c h a e l
Thu Dec 15, 2011 3:34 pm
Forum: newLISP in the real world
Topic: [itn book] colon prefixed mode not working
Replies: 7
Views: 1665

Re: [itn book] colon prefixed mode not working

Hi conan!

I’m a little rusty at this, but I ran the code through the debug function and found that t is nil within Time:show (hence the error message). Why? I have no idea! Lutz?

m i c h a e l
by m i c h a e l
Tue Jul 05, 2011 12:54 am
Forum: Whither newLISP?
Topic: Why do you use sym?
Replies: 1
Views: 2897

Re: Why do you use sym?

Kazimir wrote:Do you have some other example of use of sym?
I mostly use it for expression-building in my language and FOOP experiments, but even then, not very often. So, no, not really :-)

m i c h a e l
by m i c h a e l
Sun May 29, 2011 4:50 pm
Forum: newLISP and the O.S.
Topic: Colors in Terminal
Replies: 3
Views: 1871

Re: Colors in Terminal

This works using Terminal on OS X:

Code: Select all

(println "\027[0;31mHello world!\027[0m")
Hope this helps.

m i c h a e l
by m i c h a e l
Sun May 15, 2011 9:42 pm
Forum: Whither newLISP?
Topic: Common Lisp newLisp module?
Replies: 8
Views: 5160

Re: Common Lisp newLisp module?

Hi Rick! The cartoons always support and never detract from the topic at hand and I have literally howled and laughed out loud at a lot of them. One of my favorite books on programming is "Object-Oriented Analysis and Design with Applications" by Grady Booch. Tony Hall did some fantastic cartoons in...
by m i c h a e l
Sun May 15, 2011 3:27 pm
Forum: newLISP in the real world
Topic: Is FOOP slow or is it just me?
Replies: 7
Views: 940

Re: Is FOOP slow or is it just me?

Hi cormullion! Your constructor: (define (C:C) (list (self 0))) ... is referencing an object through self , but a constructor doesn't have an object to reference since it's in the process of creating one. Your code doesn't actually create any objects because your constructor wasn't being called. Thi...
by m i c h a e l
Sun Apr 24, 2011 8:33 pm
Forum: newLISP newS
Topic: What the FOOP?
Replies: 11
Views: 3589

Re: What the FOOP?

Hi Nick! I'm so glad you liked the video. I've been doing some more work with FOOP over the past month, and I'm pleased with the progress so far. I'm using it to write simulations (ballpoint pen, toaster, blender), which really put an object language to the test. Mostly I'm looking for a way to eleg...
by m i c h a e l
Sun Mar 06, 2011 1:32 am
Forum: newLISP in the real world
Topic: [solved] OOP
Replies: 8
Views: 880

Re: Objects

Hi incogn1to! Even though they may look the same from the outside, newLISP and Scheme are very different languages. In the function make-square , for example, newLISP uses = instead of eq? . You would also need to change the else to true in the cond as well as error to throw-error . What this Scheme...
by m i c h a e l
Mon Feb 21, 2011 10:38 pm
Forum: newLISP in the real world
Topic: passing format a list of strings
Replies: 3
Views: 598

Re: passing format a list of strings

cormullion?! I've missed you! It's not the same place around here without you, but I certainly understand if you have other priorities now. I myself am not here as much as I'd like to be anymore :-( Are you trying out other languages, or have you given up on programming altogether? Either way, it's ...
by m i c h a e l
Fri Feb 11, 2011 7:15 pm
Forum: newLISP newS
Topic: Promoting my blog.
Replies: 61
Views: 17718

Re: Promoting my blog.

What are your favourite fonts? Our favorite sans serif is Maiandra GD by Dennis Pasternak. Our favorite serif is Livory by Hannes von Döhren and Livius Dietzel, and our favorite monospaced typeface is Quadraat Sans Mono by Fred Smeijers. I abandoned vehement photo because I've read somewhere that r...
by m i c h a e l
Wed Feb 09, 2011 7:07 pm
Forum: newLISP newS
Topic: Promoting my blog.
Replies: 61
Views: 17718

Re: Promoting my blog.

Hi Kazimir! I was surprised and delighted to discover "The Fonts of Power" among the staggering number of posts you've done. Melissa is a certified font lunatic, and I caught the bug from her. I noticed all the fonts you list are serifs. What are your favorite sans serifs? Also, I see you changed yo...
by m i c h a e l
Fri Dec 17, 2010 8:57 pm
Forum: newLISP in the real world
Topic: Freelance, discreet code clean-up and review?
Replies: 3
Views: 473

Re: Freelance, discreet code clean-up and review?

Hi Kanen! I'm not able to take you up on your offer, but I did have a look at the code for Interfaces . It seems pretty tight, with the sole exception being the pair of when s testing for active status. They can be combined into one, with the two tests and ed together. Little if any speed boost, unf...
by m i c h a e l
Thu Dec 16, 2010 9:42 pm
Forum: Whither newLISP?
Topic: newLisp without collateral effects
Replies: 23
Views: 7573

Re: newLisp without collateral effects

Hi Alessandro! About your solution using a context, you say: . . . does not eliminate the collateral-effect. Why not? Perhaps I'm not sure what you mean by collateral-effect . You started by saying: I found this solution using CONTEXT, but I wanted to try something without using them and using "pure...
by m i c h a e l
Sun Dec 12, 2010 1:42 am
Forum: newLISP and the O.S.
Topic: iPad users wanted...
Replies: 5
Views: 1866

Re: iPad users wanted...

:-)

m i c h a e l