Re: [dev] Suckless OS (part 2 - answer)

2010-08-25 Thread Alex Puterbaugh
>From the comments: ..."I remember we had a few Mac machines at the lab in my university, and no one used them because they were absolutely useless to us without the expensive Adobe suite of software, which the university hadn't bought because we were studying Computer Sciences, not Design. So, in

Re: [dev] [9base] /bin/rc

2010-08-25 Thread Kris Maglione
On Wed, Aug 25, 2010 at 02:51:07AM +0100, Ethan Grammatikidis wrote: I never thought of keeping a copy of rc in /bin. What I came up with was an rc+ed script to modify that first line.[1] It itself launches with /usr/bin/env, but it modifies every rc and awk script it finds except itself so tha

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread pancake
Wow! pretty fun :) I encourage you to make the nstest program smarter by removing help messages, prompts and others and just keep the read-eval-print loop. About the language I find it quite nice as in syntax. I wrote a similar virtual machine in 'sal' but it end up being a little messy and

Re: [dev] Suckless OS (part 2 - answer)

2010-08-25 Thread Jacob Todd
"He proudly wore a Windows 95 team T-shirt as he trolled amongst the booths." pgpkCCdfYu0QH.pgp Description: PGP signature

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread Nikhilesh S
On Wed, 25 Aug 2010, pancake wrote: Wow! pretty fun :) I encourage you to make the nstest program smarter by removing help messages, prompts and others and just keep the read-eval-print loop. I think I will make it build two programs - nsrepl and nstest separately. About the language I find

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread pancake
On 08/25/10 17:29, Nikhilesh S wrote: On Wed, 25 Aug 2010, pancake wrote: Wow! pretty fun :) I encourage you to make the nstest program smarter by removing help messages, prompts and others and just keep the read-eval-print loop. I think I will make it build two programs - nsrepl and nstes

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread Robert Ransom
On Wed, 25 Aug 2010 16:35:12 +0200 pancake wrote: > why not 'ns'? is there any other program with this name? Robert Ransom signature.asc Description: PGP signature

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread Ryan Mullen
On Wed, Aug 25, 2010 at 1:23 PM, Robert Ransom wrote: > On Wed, 25 Aug 2010 16:35:12 +0200 > pancake wrote: > >> why not 'ns'? is there any other program with this name? > > The Network Simulator also goes by 'ns' though I don't think it has an executable named

Re: [dev] [wmii] colrules percentages?

2010-08-25 Thread Kris Maglione
On Wed, Aug 18, 2010 at 06:48:58PM +0300, Nikhilesh S wrote: How do the colrules percentages work? Does each number represent the percentage of column n as a fraction of the width of the whole screen, or of the last selected column before it was created, or ... ? I ask because I was messing w

Re: [dev] sfc - a flashcards program to learn languages

2010-08-25 Thread Szabolcs Nagy
* Valentin [2010-08-24 22:43:59 +0200]: > [2] http://0au.de/hgweb.cgi/sfc #include ... #include #include that's the painful way to work with strings.. this part of the c99 standard is not very nice i guess there are not much choice if you don't want to depend on external code like plan9 utf a

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread Kris Maglione
On Wed, Aug 25, 2010 at 01:54:37PM +0200, pancake wrote: I encourage you to make the nstest program smarter by removing help messages, prompts and others and just keep the read-eval-print loop. I'd rather the script go in nstest.ns and either be sourced at runtime or processed by the makefile

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread Kris Maglione
On Wed, Aug 25, 2010 at 03:24:03AM +0300, Nikhilesh S wrote: Preceding a name with '$' will create a variable with that name and pop and assign the last thing on the stack to it. Simply a name will push the value of the variable with that name onto the stack (if it's not executable, we're getting

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread yy
2010/8/25 Kris Maglione : > On Wed, Aug 25, 2010 at 01:54:37PM +0200, pancake wrote: >> * I would probably prefer '"' quote char for strings. > > I think this is irrelevant. It's down to the preference of the language > designer. Most scripting languages support single quoted strings, some > (pytho

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread Moritz Wilhelmy
Hi, The whole thing actually reminds me of postscript, which I consider a language with a nice syntax. The only thing that sucks about it, is that adobe buried it in favour of this PDF crap, which is really sad. I thought about implementing an alternative windowing system (possibly replacing X11)

Re: [dev] sfc - a flashcards program to learn languages

2010-08-25 Thread Valentin
On Wed, Aug 25, 2010 at 07:57:51PM +0200, Szabolcs Nagy wrote: > i'm not sure why you needed signal.h I'm still planning to write the database on ^C, just... not now. =P --Valentin pgpyzPLst5e66.pgp Description: PGP signature

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread Kris Maglione
On Wed, Aug 25, 2010 at 10:02:56PM +0200, Moritz Wilhelmy wrote: The whole thing actually reminds me of postscript, which I consider a language with a nice syntax. The only thing that sucks about it, is that adobe buried it in favour of this PDF crap, which is really sad. PDF is, for all inte

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread Nikhilesh S
On Wed, 25 Aug 2010, pancake wrote: * Remove 'code' in nstest.c and put it as a testcase t/test nstest.c is gone, there's now ns.c, a standard-input-interpreter. The tests are now in the directory test/. You can now just run './ns < test/fact.ns' for example. * floating point support (append

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread Nikhilesh S
On Wed, 25 Aug 2010, Moritz Wilhelmy wrote: Anyway, this is completely unrelated, I just wanted to suggest you to take a look at postscript. It is also well-documented, see [1], [2]. Yup, I've seen postscript before. I will go check it out again, maybe it has some good ideas. C bindings woul

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread pancake
Yo On Aug 26, 2010, at 12:08 AM, Nikhilesh S wrote: On Wed, 25 Aug 2010, pancake wrote: * Remove 'code' in nstest.c and put it as a testcase t/test nstest.c is gone, there's now ns.c, a standard-input-interpreter. The tests are now in the directory test/. You can now just run './ns < test/

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread yy
2010/8/25 pancake : >>> * I will probably swap the order of the conditional clauses: (what do you >>> think about it) >>>   3 3 == { 'Is equal duppy\n' print } if >>>  --> >>>  { 'Is equal duppy\n' print } 3 3 == if >> >> Hmm, personally I prefer the 'condition first' order... Why do you like >> th

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread Nikhilesh S
On Wed, 25 Aug 2010, pancake wrote: I vote for 1char string, no new type. And u can reuse the rest of operators Why not return an int with the enum value? Ok, I've added 'getline', 'getchar', 'type'. Also, ns now accepts more options to execute code from standard input, file or from a string

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread Nikhilesh S
On Wed, 25 Aug 2010, Kris Maglione wrote: Personally, I don't think that a special syntax for variable definition fits well in a stack-based language. I prefer the PostScript syntax of quoting the word and using the def keyword, so: 2 $var def or { 'hi' print } $foo def or the revers

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread Nikhilesh S
On Wed, 25 Aug 2010, Kris Maglione wrote: My personal preference is for single-quoted strings to ignore escape sequences, and to escape single quotes by doubling them, and for double-quoted strings to process escapes and possibly do simple interpolation. I think this is a good idea - I've impl

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread Nikhilesh S
On Wed, 25 Aug 2010, anonymous wrote: You include files include include files. IMO one external include file (that is placed into /usr/include) should be enough. And internal include files can be placed into src/, one .h file for each c file. Then you can remove #ifdef guards. Read "Notes on

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread pancake
More on nscript.. *) mv ReadMe README *) add install/uninstall/deinstall targets in makefile honoring PREFIX and DESTDIR vars *) CC, CFLAGS and others should be ?= and not =, this way make(1) honors the environment variables *) I will prefer to have comments at the begiging of line or at least h

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread pancake
On Thu, 26 Aug 2010 03:02:08 +0300 (AST) Nikhilesh S wrote: > The current way of doing it makes the implementation very simple - if it that's the point, but it makes no possible to override native functions. > encounters a '$' it just reads the variable name and makes a new one. If > it encoun

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread Nikhilesh S
On Thu, 26 Aug 2010, pancake wrote: with def you will be able to override any operator or function. nevertheless you can also doit with '$' and the parsing will go faster A quick way to allow that with '$' is move the 'findVariable' part before the 'findFunc' part in MD_READNAME in ns_interpre

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread Kris Maglione
On Thu, Aug 26, 2010 at 03:02:08AM +0300, Nikhilesh S wrote: The current way of doing it makes the implementation very simple - if it encounters a '$' it just reads the variable name and makes a new one. If it encounters an '&', it just sets 'callFunc' to 0 and continues like a normal name-read

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-25 Thread Kris Maglione
On Thu, Aug 26, 2010 at 12:19:33AM +0200, yy wrote: 2010/8/25 pancake : * I will probably swap the order of the conditional clauses: (what do you think about it)   3 3 == { 'Is equal duppy\n' print } if  -->  { 'Is equal duppy\n' print } 3 3 == if Hmm, personally I prefer the 'condition first'

[dev] wmii9menu items alignment

2010-08-25 Thread Vladimir Levin
Hello, I'm very new to this mailing list, but have been using wmii for a year or so now. It's an awesome WM. Thank you very much for maintaining it. Here's my humble contribution. I found that some menu scripts that I've thrown together look much better with the items aligned to the left. As a r

[dev] nscript - nscc

2010-08-25 Thread pancake
I have written an initial version of 'nscc' with support for creating native interfaces by parsing an 'nsi' file. [panc...@dazo nscript]$ cat libc.ns # test program for libc.nsi dup print "\n" print "food" ns_pop "one" "one" strcmp $x "one" "two" strcmp $y "strcmp one-one: " print x print "\n" pr

Re: [dev] nscript - nscc

2010-08-25 Thread pancake
Oops. sorry, I forgot to attach the sources On Thu, 26 Aug 2010 04:11:42 +0200 pancake wrote: > I have written an initial version of 'nscc' with support for creating > native interfaces by parsing an 'nsi' file. > > [panc...@dazo nscript]$ cat libc.ns > # test program for libc.nsi > dup print

Re: [dev] Stripping html from email

2010-08-25 Thread Josh Rickmar
On Tue, Aug 24, 2010 at 04:58:20PM +0200, pancake wrote: > On 08/24/10 16:45, Kurt H Maier wrote: > >MIME sucks; there's no nice way to deal with it. I use perl and the > there's dmc-pack to unpack and unpack mime attachments. The > implementation is 162 LOC and works quite nice. I think is the >

Re: [dev] Stripping html from email

2010-08-25 Thread Robert Ransom
On Wed, 25 Aug 2010 22:31:58 -0400 Josh Rickmar wrote: > Where can I get > the dmc source again? See . Robert Ransom signature.asc Description: PGP signature

[dev] [dwm] Mod+Space Cycle Through Layouts?

2010-08-25 Thread Calvin Young
I recently switched to DWM from XMonad and am loving its minimalism and simplicity. However, something I do miss from Xmonad and Awesome is the ability to cycle between layouts using Mod+Space. I have all of my layouts bound to hotkeys, but it'd be nice to be able to cycle between them with one k