You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
(31) |
May
(422) |
Jun
(241) |
Jul
(268) |
Aug
(281) |
Sep
(109) |
Oct
(1) |
Nov
|
Dec
|
---|
From: Eddie R. <er...@bm...> - 2008-07-06 11:44:19
|
On Sun 06/07/08 5:58 AM , Albert Graef Dr....@t-... sent: > Jiri Spitz wrote: > > I need it because the current definition of dict > equality test > semantically compare their member lists. However, I > made this stuff > local to the function so that nobody should be > harmed. > Ok, I see. I moved => over to the prelude now, and defined equality on > it, too, so you can remove those special equality rules in dict.pure. > > Albert That should help me too ;) e.r. |
From: Albert G. <Dr....@t-...> - 2008-07-06 11:42:20
|
Libor Spacek wrote: > Fair enough. Could the "import" perhaps for now be defined as a syntactic sugar for: > > using "lib:somelib"; > extern a; > extern b; > extern c; > extern xyz; That doesn't make any sense, as 'using "lib:somelib"' is only for linking against dynamic libraries, and Pure has no way of knowing the prototypes of the C functions that you want to import. 'import purescript' is different, right now it just textually includes the script at that point, there's no separate compilation of Pure scripts (yet). -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Albert G. <Dr....@t-...> - 2008-07-06 11:37:59
|
Eddie Rucker wrote: >> Yes, I have that too. Eddie, can I kindly ask you to restrict your >> telepathy experiments to your students? ;-) > > Sorry, what should I do? Maybe reply to stuff in one batch at one time of the day? Eddie, please relax, that was a joke. ;-) Nothing wrong on your part, it just seems that your replies are getting through quicker than even our posts that you reply to. :) Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Albert G. <Dr....@t-...> - 2008-07-06 11:34:48
|
Libor Spacek wrote: > With these new facilities, I would like to implement in pure a finer-grained timing than the global stats currently provides. You can already do that: > using system; > foo n = #(1..n); // for testing purposes > (clock-t0)/CLOCKS_PER_SEC,res when t0 = clock; res = foo 1000000 end; 1.85,1000000 It's a bit inconvenient, but it works. The clock function uses the same C routine measuring CPU (rather than wallclock) time which is also used by the stats command. > The natural name for it would be "time", aka the unix command line "time", which would excecute and time its argument: > (time somethingtorun), and return (msecs, somethingreturned). That function would have to be a special form. Either it needs to be implemented in the compiler, or we need some facility to define macro functions to be executed at compile time (pretty much like 'def', but for defining macros which can take arguments), then it could be defined in terms of 'clock' above. I'm leaning towards the latter solution, because it's much more general, and would be useful in lots of other situations. > This will allow timing comparisons scripts to be defined, > instead of typing them manually to the interpreter. You can do that with stats, too, you'll just have to pipe it into the interpreter via stdin redirection (rather than passing the script name as a parameter), so that the interactive commands work. > 1) Do you think this could be useful (in addition to the existing global "stats") Yes. That's why the clock function is there, incidentally. :) > 2) if so, can you suggest suitable names for it, or rename "time" in system? I won't rename time in system, it should be named like the C function. But feel free to suggest other names for the timing function. Cheers, Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Eddie R. <er...@bm...> - 2008-07-06 11:33:55
|
On Sun 06/07/08 4:51 AM , Albert Graef Dr....@t-... sent: > Jiri Spitz wrote: > > The posts from the ML arrive now totally out of the > order. I receive > replies earlier then questions (perhaps traveling in > time :-) ?) and so > longer threads are very hard to read :-( . > > Yes, I have that too. Eddie, can I kindly ask you to restrict your > telepathy experiments to your students? ;-) Sorry, what should I do? Maybe reply to stuff in one batch at one time of the day? e.r. |
From: Libor S. <li...@gm...> - 2008-07-06 11:29:49
|
Fair enough. Could the "import" perhaps for now be defined as a syntactic sugar for: using "lib:somelib"; extern a; extern b; extern c; extern xyz; Would that work moreless as intended, within the one flat namespace? Libor On Sun, 06 Jul 2008 12:12:49 +0100, Albert Graef <Dr....@t-...> wrote: > Libor Spacek wrote: >> Would something like: >> >> import a,b,c,xyz from somelib; >> >> be possible in Pure, to be used instead of the blunt weapon "using somelib;"? > > Not right now, as Pure has only one flat global namespace at this point. > It can be done, but it's going to be some work, and I have to make sure > that this doesn't break the C interface with its flat namespace. > > Albert > |
From: Albert G. <Dr....@t-...> - 2008-07-06 11:12:48
|
Libor Spacek wrote: > Would something like: > > import a,b,c,xyz from somelib; > > be possible in Pure, to be used instead of the blunt weapon "using somelib;"? Not right now, as Pure has only one flat global namespace at this point. It can be done, but it's going to be some work, and I have to make sure that this doesn't break the C interface with its flat namespace. Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Albert G. <Dr....@t-...> - 2008-07-06 11:00:46
|
Jiri Spitz wrote: > > infix 0 => ; > > [1=>1, 2=>2, 3=>3]; > <stdin>:2.8-9: syntax error, unexpected infix 0 operator > > [(1=>1), (2=>2), (3=>3)]; > [1=>1,2=>2,3=>3] > > > > I'd say the interpreter is a bit inconsistent here. I'd say that this is a bug. :) Thanks for reporting, will look into it asap. -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Albert G. <Dr....@t-...> - 2008-07-06 10:58:40
|
Jiri Spitz wrote: > I need it because the current definition of dict equality test > semantically compare their member lists. However, I made this stuff > local to the function so that nobody should be harmed. Ok, I see. I moved => over to the prelude now, and defined equality on it, too, so you can remove those special equality rules in dict.pure. Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Albert G. <Dr....@t-...> - 2008-07-06 10:56:02
|
Albert Graef wrote: > Also, I'm wondering whether '$' has the right precedence. I made it > weaker than ',' so that you can write something like foo $ x,y,z. But > now I think that this is wrong, it should be: Nope, actually ',' needs to be on the same precedence level as '..', and '$' binds weaker than those to make stuff like foo $ 1,3..10 work. So I guess I'll leave it as it is for now. -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Libor S. <li...@gm...> - 2008-07-06 10:45:12
|
Java is too verbose and pedestrian for my liking but there is one thing it does well: the import statements. I believe that being able to list the individual functions used in the current file, out of a long list available in some library, improves the readability of the code and reduces the likelihood of accidental conflicts. Would something like: import a,b,c,xyz from somelib; be possible in Pure, to be used instead of the blunt weapon "using somelib;"? Apologies if this is already on your "todo" list for the modules. Libor |
From: Libor S. <li...@gm...> - 2008-07-06 10:30:14
|
With these new facilities, I would like to implement in pure a finer-grained timing than the global stats currently provides. The natural name for it would be "time", aka the unix command line "time", which would excecute and time its argument: (time somethingtorun), and return (msecs, somethingreturned). This will allow timing comparisons scripts to be defined, instead of typing them manually to the interpreter. The problem is that this name would conflict with the new "time" in system. Two questions: 1) Do you think this could be useful (in addition to the existing global "stats") 2) if so, can you suggest suitable names for it, or rename "time" in system? Cheers, Libor On Sun, 06 Jul 2008 02:24:23 +0100, Albert Graef <Dr....@t-...> wrote: > When calling C it's probably better to read those manpages every once in > a while. ;-) (You can even do so from the interpreter, with the help > command.) That is cool! > So I guess that all the doomsday prophets are up in arms already? It has been said that: "prediction is difficult, especially with regard to the future" :) |
From: Jiri S. <jir...@bl...> - 2008-07-06 10:28:52
|
Albert Graef wrote: > > Why? If '=>' binds stronger than ',' then parens aren't needed there. > The pretty-printer will only insert parens when they are required. > :-o > infix 0 => ; > [1=>1, 2=>2, 3=>3]; <stdin>:2.8-9: syntax error, unexpected infix 0 operator > [(1=>1), (2=>2), (3=>3)]; [1=>1,2=>2,3=>3] > I'd say the interpreter is a bit inconsistent here. Jiri |
From: Albert G. <Dr....@t-...> - 2008-07-06 09:51:43
|
Jiri Spitz wrote: > The posts from the ML arrive now totally out of the order. I receive > replies earlier then questions (perhaps traveling in time :-) ?) and so > longer threads are very hard to read :-( . Yes, I have that too. Eddie, can I kindly ask you to restrict your telepathy experiments to your students? ;-) Always on weekends. :) If it gets worse, I'll have to submit a support request again, but right now the lag still seems moderate. Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Albert G. <Dr....@t-...> - 2008-07-06 09:41:20
|
Jiri Spitz wrote: > However, isn't there something wrong with displaying the data: > > > infix 0 => ; > > zipwith (=>) (1..3) (1.0..3.0); > [1=>1.0,2=>2.0,3=>3.0] > > > > I would expect '[(1=>1.0),(2=>2.0),(3=>3.0)]' in such a case. Why? If '=>' binds stronger than ',' then parens aren't needed there. The pretty-printer will only insert parens when they are required. -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Albert G. <Dr....@t-...> - 2008-07-06 09:30:52
|
Eddie Rucker wrote: > With that precedence, how can I write something like [1=>"a",2=>"b"] without a syntax error? Oops, you're right, of course you want to bind it stronger than ',', but weaker than the logical operators. Also, I'm wondering whether '$' has the right precedence. I made it weaker than ',' so that you can write something like foo $ x,y,z. But now I think that this is wrong, it should be: infixr 0 , ; infix 1 => ; infixr 1 $ ; Then you'll have to write foo (x,y,z) (which looks nicer anyway), but you can also use $ inside list elements without parenthesizing it. Any objections? Also, on second thought I'm willing to add => to the prelude after all. If two completely unrelated modules use this, then others may follow suit, and it's going to be a mess if we need to change the precedence again. Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Albert G. <Dr....@t-...> - 2008-07-06 08:55:23
|
Eddie Rucker wrote: >> def DEFAULTS = [",", "\"", "\"", 1, "\n", 1]; >> DEFAULTS; > ["\0x5","X\0x13*÷ÿ\0x7f","@ã ",1,"",1] Fixed (r398). -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Jiri S. <jir...@bl...> - 2008-07-06 08:02:00
|
Hi, The posts from the ML arrive now totally out of the order. I receive replies earlier then questions (perhaps traveling in time :-) ?) and so longer threads are very hard to read :-( . Jiri |
From: Jiri S. <jir...@bl...> - 2008-07-06 07:56:56
|
Eddie Rucker napsal(a): > Jiri, can you show me how you defined the => operator? > > I had something like > infix 2 => ; > > I never gave it a real definition except inside of a zipwith like > zipwith (\(x=>y) z -> ...) ... > > I had to give at least a precedence of 2 because it is the only way I could get it *not* to give a syntax error on something like > [1=>"a",2=>"b"] > Originally I defined it according to Albert's suggestion as infix 0. After reading this discussion I changed it to infix 2. Since I used 'zipwith (=>) ...' to test my stuff I didn't notice the problems with writing the lists manually. However, isn't there something wrong with displaying the data: > infix 0 => ; > zipwith (=>) (1..3) (1.0..3.0); [1=>1.0,2=>2.0,3=>3.0] > I would expect '[(1=>1.0),(2=>2.0),(3=>3.0)]' in such a case. Jiri |
From: Jiri S. <jir...@bl...> - 2008-07-06 07:45:56
|
Albert Graef wrote: > I think it's better to declare => in dict.pure, because that's where > it's actually needed and the semantics are provided. Well, I defined the operator in dict.pure. > Also, I'm not sure > whether we should define equality on "mapsto" pairs at all. You can > always compare them using === if it's really needed. I need it because the current definition of dict equality test semantically compare their member lists. However, I made this stuff local to the function so that nobody should be harmed. Jiri |
From: Eddie R. <er...@bm...> - 2008-07-06 01:36:10
|
On Sat 05/07/08 8:16 PM , Eddie Rucker er...@bm... sent: > > > On Sat 05/07/08 8:31 PM , Albert Graef Dr.Graef > @t-online.de sent:> Eddie Rucker wrote: > > > I had something like > > > infix 2 => ; > > > > Well, you want it to bind weaker than even tuples, and > to be> non-associative, which pretty much fixes it at infix 0, > as I originally> suggested. > > With that precedence, how can I write something like [1=>"a",2=>"b"] > without a syntax error? > e.r. > To be more specific: > infix 0 => ; > [1 => "a", 2 => "b"]; <stdin>:2.10-12: syntax error, unexpected infix 0 operator. e.r. |
From: Eddie R. <er...@bm...> - 2008-07-06 01:33:35
|
On Sat 05/07/08 8:31 PM , Albert Graef Dr....@t-... sent: > Eddie Rucker wrote: > > I had something like > > infix 2 => ; > > Well, you want it to bind weaker than even tuples, and to be > non-associative, which pretty much fixes it at infix 0, as I originally > suggested. With that precedence, how can I write something like [1=>"a",2=>"b"] without a syntax error? e.r. |
From: Albert G. <Dr....@t-...> - 2008-07-06 01:30:58
|
Eddie Rucker wrote: > I had something like > infix 2 => ; Well, you want it to bind weaker than even tuples, and to be non-associative, which pretty much fixes it at infix 0, as I originally suggested. > I never gave it a real definition You *must* not define it, it's a constructor. :) Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Albert G. <Dr....@t-...> - 2008-07-06 01:26:18
|
Eddie Rucker wrote: > Thanks, I looked in the system, prelude, and primitives libraries and didn't see it anywhere. It's a builtin variable. Described in the manpage (briefly). -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Eddie R. <er...@bm...> - 2008-07-06 01:17:27
|
Jiri, can you show me how you defined the => operator? I had something like infix 2 => ; I never gave it a real definition except inside of a zipwith like zipwith (\(x=>y) z -> ...) ... I had to give at least a precedence of 2 because it is the only way I could get it *not* to give a syntax error on something like [1=>"a",2=>"b"] e.r. On Sat 05/07/08 8:07 PM , Albert Graef Dr....@t-... sent: > Eddie Rucker wrote: > > By the way I hope you don't mind but I liked the => > idea and borrowed it for creating a CSV dialect. > Then please make sure that you use the same operator declaration as > Jiri, so that we don't get any conflicts between dict.pure and > csv.pure. > Albert > > -- > Dr. Albert Gr"af > Dept. of Music-Informatics, University of Mainz, Germany > Email: Dr.Graef > @t-online.de, ag...@mu...WWW: http://www.musikinformatik.uni-mainz.de/ag > > |