02:32:34 | * | q66 quit (Quit: Quit) |
03:14:58 | * | ryderblue joined #nimrod |
03:23:12 | * | Trix[a]r_za is now known as Trixar_za |
04:52:45 | * | Trixar_za is now known as Trix[a]r_za |
05:00:29 | * | XAMPP quit (Ping timeout: 260 seconds) |
05:20:29 | * | XAMPP joined #nimrod |
05:24:05 | * | ryderblue quit (Quit: ryderblue) |
06:33:23 | * | ryderblue joined #nimrod |
08:22:23 | * | ryderblue quit (Quit: ryderblue) |
08:27:55 | * | XAMPP quit (Ping timeout: 256 seconds) |
08:38:39 | * | Araq__ quit (Read error: Connection timed out) |
08:39:32 | * | Araq_ joined #nimrod |
09:51:43 | * | Araq_ quit (Read error: Connection timed out) |
09:52:28 | * | Araq_ joined #nimrod |
10:19:35 | * | XAMPP joined #nimrod |
11:08:08 | * | q66 joined #nimrod |
12:03:54 | Araq | fyi: http://richardkulisz.blogspot.de/2010/12/why-linux-is-decrepit-donkey-crap.html |
12:37:35 | * | exhu joined #nimrod |
12:38:09 | exhu | looks like a troll wrote this post -) |
12:39:01 | Araq | hi exhu ;-) |
12:39:14 | Araq | yeah ... it posted it before reading it completely |
12:39:18 | exhu | linux is one of the best software, at least because it provides an alternative choice. |
12:39:22 | Araq | on the other hand, I like good rants |
12:39:56 | Araq | an alternative choice if you don't like computer games, maybe :P |
12:40:22 | exhu | it seemed the author advocated Mac, then I have bad news for him =) I develop apps for iOS etc and I can say there's no ideal OS. |
12:41:04 | Araq | looks more like the "lisp machine" guy to me ... |
12:41:27 | Araq | macosx is based on unix too and I'm sure the guy knows that |
12:42:14 | Araq | dunno ... haiku is the ideal OS :P |
12:42:26 | Araq | it doesn't support 64bit though and has no applications ... |
12:43:39 | Araq | actually the microsoft people got it right ... an OS is meaningless |
12:43:39 | Araq | it's all about the applications |
12:43:39 | Araq | and they used to ensure applications wouldn't break |
12:43:40 | Araq | well ... they tried ;-) |
12:44:09 | Araq | for instance, they had special code that ensures "Sim City" would continue to run |
12:44:18 | exhu | I like linux after using mac because linux works better on my 2006-year home PC with core 2 duo 1,8 ghz and nvidia gtx 260 |
12:44:32 | exhu | than modern macbook pro with 8 gigs ram etc. |
12:44:34 | Araq | even though the game frees memory immediately and then uses that memory |
12:44:58 | Araq | which happened to "work" on DOS or something |
12:45:37 | exhu | the sim city story is a legend now -) |
12:47:13 | exhu | that guy also advocates high level programming languages, ok, linux software now mainly written in python and we all know how terribly bloated linux is today. |
12:48:28 | Araq | python always confused "high level" with "dynamic" IMHO ... |
12:53:16 | exhu | python is good for many things but not for game development and not for tray-icon applets -) |
12:55:32 | exhu | the more complex system becomes (e.g. writing a modern pc game), the more intrusive is script-native code bridge overhead. We had to rewrite game logic completely to c++ one day. |
12:57:24 | exhu | BTW I tried Go language and found its Go->C bridge had the same bloat and then tried studying nimrod -) |
13:02:08 | Araq | yeah; it's much worse for a compiler though |
13:02:32 | Araq | the very idea of writing a compiler in python and "optimizing the hotspots" in C is ridiculous |
13:03:50 | Araq | so ... I should answer your post ... a lockfree list is possible in nimrod ... |
13:04:07 | Araq | but you can't dealloc without a lock |
13:04:37 | Araq | you can add it so some other free list though |
13:06:39 | Araq | exhu: what was that java test btw? real world or microbench? |
13:07:46 | exhu | microbench -) |
13:08:12 | Araq | with serious contention? |
13:09:06 | exhu | yes, you know Ubisoft guys advertised their lock-free structures on GDC very well, so I had to try some developments in this area too... |
13:09:37 | exhu | but it's too dangerous and i'm not 100% sure the algorithm is correct -) |
13:10:50 | Araq | so are you a professional game dev? |
13:12:22 | exhu | i have never written any game engine, but have always been involved in supportive logic etc, ported games from pc to handsets and so on. |
13:13:14 | exhu | mainly fixing, debugging, reverse engineering -) |
13:14:19 | Araq | but my point was: not as a hobby, right? |
13:15:00 | exhu | right, i earn my living working as a software engineer in a game-developing company. |
13:15:52 | Araq | cool cool |
13:17:35 | exhu | sometimes I regret i had abandoned java ee ocupation as a junior five yrs ago, because enterprise engineers are paid way higher |
13:20:41 | Araq | yeah but then you'd have the pain of working in java ... |
13:22:02 | exhu | some 32 gigs of ram would weaken the pain =) |
13:22:44 | Araq | but then it would need to GC 32gigs of RAM ... |
13:24:59 | exhu | it's a pain to build 3d game projects in c++ today, it takes ages even on desktop i7 with tonns of ram and SSD drive |
13:26:35 | Araq | well I can't guarantee it won't happen in nimrod once we excessive generics everywhere |
13:26:41 | Araq | *we have |
13:27:03 | Araq | I argued nimrod's math libraries shouldn't do that but couldn't convince zahary |
13:27:34 | Araq | I would do something like: |
13:27:36 | Araq | when not defined(TMatrixElem): type TMatrixElem = float |
13:27:47 | Araq | and use nominal typing in the libraries |
13:27:58 | Araq | but that's not sexy ;-) |
13:29:07 | exhu | precompiled modules (i.e. intermediate data, like ppu in freepascal) could help |
13:29:55 | Araq | oh he's also working heavily to break all my invariants and thus my symbol file implementation ... ;-) |
13:30:00 | exhu | i don't like all those fancy features like overloading, "var a_b_c: int" is the same as "var abc: int" etc. |
13:30:49 | Araq | I consider all the alternatives worse ... |
13:30:59 | exhu | and i won't heavily use macros, since I have painful experience with anything that uses C++ boost library. |
13:34:40 | Araq | well overloading is a cornerstone of the whole language ... |
13:35:02 | Araq | it's a compiletime dispatch mechanism that is "open" |
13:35:28 | exhu | As for the generics in math modules, i reckon "float" would be enough for most game dev =) |
13:35:56 | Araq | no other language feature else delivers that and no haskell's typeclasses don't count |
13:39:26 | exhu | what is hard about nimrod and overloading as its main feature is the difficulty to read program sources and understand which function actually is called. |
13:39:58 | exhu | compiler's feature to show where the implementation of the concrete function lies is very important. |
13:40:12 | exhu | important for debugging and reverse engineering. |
13:41:45 | Araq | I'm aware, yeah |
13:41:57 | Araq | that's why we try to develop IDE support at the same time |
13:42:32 | Araq | you can't do anything else these days or you end up with something like Oberon |
13:42:39 | Araq | which even assumes no syntax highlighting is available and thus all keywords should be in UPPERCASE ... |
13:42:47 | exhu | it is what the scripts have -- it's a feature and a hurdle for a new person who reads the sources. |
13:44:51 | exhu | I should look at oberon -) |
13:45:10 | Araq | or modula-2 or 3 for that matter |
13:45:35 | exhu | I tried Ada and was sick and tired of verboseness. |
13:46:00 | Araq | he he I actually programmed a game engine in Ada ;-) ok, nothing fancy |
13:46:25 | Araq | just a 2d realtime strategy game but it was never finished |
13:46:28 | exhu | writing a program in Ada is like designing a spacecraft to me -) |
13:46:50 | Araq | problem was: the language was better in some respects than freepascal/delphi |
13:47:15 | Araq | but worse in others |
13:47:15 | Araq | and the tools were much worse |
13:47:31 | Araq | so I ended up rewriting it in delphi again |
13:48:22 | exhu | what i don't like in pascal is the necessity to declare variables in a single block in the beginning of a function. That's pain for simple loop counters. |
13:48:37 | Araq | it's a pita for everything else too |
13:48:37 | exhu | and throw-away vars |
13:50:44 | exhu | but i like freepascal compiler and lazarus, although have never written anything serious in it. |
13:51:47 | exhu | compiling speed is awesome, produced code is good as well. |
13:52:20 | Araq | it's however not on par with C compilers |
13:53:13 | Araq | but yeah I can't believe Go is famous for its compile times when delphi's are much better |
13:53:23 | Araq | ignorants |
13:54:53 | exhu | I remember in 90-s Watcom C was popular and it compiled quite fast. |
13:56:17 | exhu | I have written some image processing algorithm and fpc and c++ produced the same performant code. FPC optimization is ok for the majority of applications. |
13:56:50 | exhu | if not then it's easy to implement zero-cost binding to C implementation. |
13:57:54 | Araq | yeah but I think the gap widened |
13:58:10 | Araq | C can do auto vectorization now |
13:58:15 | Araq | and it's pretty decent |
13:58:42 | Araq | we had some benchmarks in nimrod running faster than the optimized C version that used SSE explicitly |
13:58:48 | exhu | I prefer instant compile times over super optimization and smart enough to vectorize myself where needed :-) |
13:59:44 | exhu | I have benchmark that in java performs faster than in optimized C =) I don't know how to optimize it further to match the performance of jvm. |
14:00:00 | exhu | probably, jvm inlines it all |
14:00:48 | exhu | in java it's readable and it runs faster even including the time to start the jvm |
14:01:38 | Araq | interesting |
14:02:27 | Araq | maybe you should try profile guarded optimization with intel's compiler ;-) |
14:02:40 | Araq | should match the JVM then |
14:02:58 | Araq | but maybe it wouldn't |
14:03:11 | Araq | in fact, I'd look at the produces assembler of both |
14:03:15 | Araq | *produced |
14:03:33 | exhu | i have not found (googled) a way to see what jvm produces |
14:04:41 | Araq | I wouldn't bother and blame the CPU caches ;-) |
14:05:23 | Araq | maybe the JVM got lucky and produced different offsets resulting in fewer cache misses |
14:05:40 | exhu | java works well on simple programs but slows down on complex ones. I use jEdit as my prefered text editor (it's in java) and if I click on every menu item, work intensively, the jvm starts to optimize it and finally it eats 600+ megs of ram. |
14:07:25 | exhu | it's so insane that a text editor eats so much ram -) in early 2000-s I would have been laughed at blamed telling lies -) |
14:23:49 | Araq | you should use aporia instead of jedit :P |
14:27:52 | q66 | jedit is cool |
14:28:01 | q66 | i use it |
14:28:03 | q66 | but i hate java :P |
14:28:22 | Araq | I used it, didn't like it for some reasons and never used it again |
14:28:29 | Araq | can't remember the reasons though |
14:28:37 | q66 | exhu, jedit with about 40-60 files open right now eats 160MB |
14:28:39 | Araq | "written in java" was among them, of course :P |
14:29:10 | q66 | it keeps this memory usage actually whatever the number of open files is :P |
14:29:20 | q66 | i've never seen it go above 180MB |
14:29:32 | exhu | I just got used to it, nothing special. it's easy to install and the same under four computers I work on. |
14:29:58 | exhu | on mac, win, two linuxes |
14:30:21 | q66 | i use it on mac |
14:30:25 | q66 | and freebsd |
14:30:27 | Araq | I use aporia or gedit |
14:30:35 | q66 | gedit is ew |
14:30:43 | Araq | on mac finding a decent editor was a problem |
14:31:00 | q66 | well, i found jedit when searching for an editor on mac and it worked ok so i kept using it |
14:31:01 | exhu | jedit on mac is the only decent one :P |
14:31:02 | Araq | but then everything was a pita for me too so I stopped using macs |
14:31:02 | q66 | was using geany before |
14:31:31 | q66 | there is also sublime text which is nice |
14:31:41 | q66 | but IMO jedit is as good |
14:31:43 | q66 | and it's free |
14:31:46 | q66 | so fuck sublime text :P |
14:31:54 | exhu | i was looking for a one thing working the same on all platforms. |
14:31:57 | Araq | not using macs actually solved *many* problems :P |
14:32:47 | exhu | gtk+ pulls a lot of dependencies with it, pain to intall all that gtk runtime. |
14:33:09 | Araq | true |
14:34:10 | * | gradha joined #nimrod |
14:34:22 | exhu | when a needed a GUI lib for a level-editor, I used FLTK |
14:34:50 | exhu | trully lightweight |
14:35:16 | Araq | they use C++ as "C with objects" iirc |
14:35:41 | exhu | C with objects is ok, rather that Qt's C++ with two preprocessors =) |
14:35:53 | q66 | [15:35:16] <Araq> they use C++ as "C with objects" iirc |
14:35:53 | exhu | *rather than |
14:35:56 | q66 | aka the only valid way to use C++ |
14:37:30 | gradha | I believe C with objects was objc... |
14:37:40 | q66 | objc sucks :P |
14:37:53 | Araq | no that's "C with smalltalk envy" ;-) |
14:38:00 | gradha | ok |
14:38:58 | exhu | I'd better prefer java to objC, had a lot of objc at some time. It's slow. |
14:39:13 | q66 | i'd prefer anything to java |
14:40:12 | exhu | why, netbeans IDE + java is the ideal development environment. jvm program runs pretty fast after some JITing =) |
14:40:31 | q66 | java is a crappy language |
14:40:41 | Araq | never found netbeans to be better than eclipse |
14:40:41 | q66 | and an IDE does not make up for it |
14:42:00 | exhu | java is clean although verbose language, too bad it lacks C structs and typedefs ... =) |
14:42:18 | q66 | <Zor> java is a brain-damaged product of people thinking OOP is the answer to all problems |
14:42:50 | exhu | don't use OOP, think of classes as modules |
14:43:02 | q66 | no |
14:44:39 | exhu | its standard library is just overly engineered, where to read some symbols from a file you have to create tons instances of stream reading classes. |
14:45:00 | q66 | "nice" class names http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.html |
14:45:01 | exhu | too many abstractions and so on. |
14:45:02 | q66 | hurr |
14:45:30 | q66 | "org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter" |
14:45:31 | q66 | wow. |
14:45:41 | Araq | Java isn't even a decent OO language ... |
14:46:18 | q66 | java sucks in every way possible |
14:46:19 | exhu | overly abstracted and secured via long namespaces |
14:46:35 | q66 | if you HAVE TO use jvm, use Scala |
14:46:37 | q66 | that's it |
14:46:48 | exhu | scala is too algebraic |
14:47:40 | Araq | "Convenient proxy factory bean superclass for proxy factory beans that create only singletons. " |
14:47:54 | Araq | hard to tell whether that's a joke or not ... |
14:48:09 | exhu | LOL, yea |
14:48:10 | q66 | Araq, apparently it's not a joke http://www.springsource.org/ |
14:48:15 | q66 | "Spring is the most popular application development framework for enterprise Java™. Millions of developers use Spring to create high performing, easily testable, reusable code without any lock-in." |
14:48:16 | q66 | ENTERPRISE |
14:48:17 | q66 | HURR |
14:48:26 | q66 | wait |
14:48:29 | q66 | so actually it IS a joke |
14:48:32 | q66 | because enterprise == joke :P |
14:48:35 | exhu | enterprise is about tons of frameworks =) |
14:48:46 | Araq | a parody of it would end up being exactly the same |
14:48:53 | exhu | i used spring, hibernate and some other things in youth -) |
14:49:05 | exhu | i was tons documents to read |
14:49:33 | Araq | I had to use hibernate for one project at university |
14:49:41 | Araq | I quickly wrote the SQL by hand |
14:49:58 | Araq | was faster and more maintainable |
14:50:36 | q66 | Araq, btw, i implemented pattern matching in my lang today |
14:50:52 | Araq | nice |
14:50:52 | q66 | including expression, variable, as, and, or, table, wildcard patterns, missing a cons pattern (which will get implemented with lists) |
14:51:09 | q66 | there are subpatterns (parenthetised grouping of patterns), pattern guards (pattern when cond) |
14:51:28 | Araq | which algorithms do you use? |
14:51:40 | Araq | do you support full unification? |
14:52:12 | q66 | http://codepad.org/TetO9e4P |
14:53:00 | q66 | nope, no full unification |
14:53:10 | Araq | | [a, a] -> ... # supported? |
14:53:17 | Araq | ah ok |
14:53:26 | q66 | it's simple ocaml-ish thingy |
14:53:32 | q66 | used for decomposition and stuff |
14:54:04 | q66 | it doesn't detect non-exhaustive patterns, but that makes no sense in an untyped lang anyway |
14:54:17 | q66 | it just evals to nil in such case |
14:54:37 | Araq | meh ... |
14:54:51 | Araq | non-exhaustive pattern detection is really nice ... |
14:56:16 | q66 | actually i might add it |
14:58:02 | q66 | Araq, yep, i'll add static exhaustivity check |
14:58:52 | q66 | it just needs another label and a bit different jumps |
14:59:00 | Araq | looks non-trivial to me |
14:59:08 | Araq | how would you implement it? |
14:59:30 | q66 | actually nothing :P just a weird idea in my head |
14:59:38 | q66 | yeah it's non-trivial to statically check that |
15:02:15 | Araq | ocaml does it, right? |
15:03:10 | q66 | Araq, yes |
15:03:21 | q66 | ocaml is a typed language with way more static control though :) |
15:03:34 | * | Araq wonders if F# does it too ... |
15:03:39 | q66 | probably does |
15:04:16 | q66 | yes, it does |
15:05:28 | Araq | yeah, it's only a warning though :-/ |
15:18:39 | gradha | Araq: that rant by Richard is a goldmine, I'm adding the guy to my rss list |
15:19:33 | exhu | gradha, that RIchard must be troll 20 level -) |
15:20:01 | gradha | just read his post about the iliad being 3000 year ancient rap |
15:20:25 | gradha | oh man, do I love looking at crazyness |
15:21:01 | Araq | gradha: link please |
15:21:15 | gradha | http://richardkulisz.blogspot.de/2012/06/gangster-rap-is-3000-years-old.html |
15:21:28 | Araq | yeah never mind, found it |
15:22:41 | exhu | priceless |
15:23:42 | Araq | fast!R == isInputRange!R && !isForwardRange!R && hasMutableIndirections!(ElementType!R) |
15:28:55 | Araq | ha, and I considered D's ranges worthwhile to copy :P |
15:43:03 | exhu | how to write a proc that operates on both ref and var object instances? e.g. proc(o: ref MyObj) for both var and ref variants? |
15:43:24 | Araq | use 'var MyObj' |
15:43:29 | Araq | and yes, I know I know |
15:43:38 | Araq | auto deref is needed for that to work |
15:43:47 | Araq | on my todo ... |
15:44:00 | gradha | I was just going to suggest overloading of ref to var... |
15:44:03 | gradha | is that possible? |
15:44:31 | Araq | I think so but then you have code duplication |
15:45:50 | Araq | and wasn't you against overloading ...? :P |
15:46:14 | gradha | was I? Can't remember that |
15:46:25 | Araq | ugh ... sorry |
15:46:33 | Araq | confused you with exhu |
15:46:55 | gradha | well, exhu seems to like java |
15:47:04 | exhu | java has overloading -) |
15:47:16 | gradha | yeah, but I don't like java |
15:47:35 | gradha | Araq just "overloaded" our nicks |
15:48:09 | Araq | you're the new guys ;-) |
15:48:16 | exhu | "Convenient proxy factory..." still makes me laugh. |
15:49:05 | gradha | talking about crazy: object variants |
15:49:20 | gradha | does the compiler allow reading/setting a variable before the type? |
15:49:40 | gradha | how does it check equality against differnt type nodes? |
15:50:28 | Araq | == is not defined of 'object' |
15:50:29 | gradha | in a way looks like an union struct with steroids |
15:50:53 | Araq | it's actually a somewhat broken sum type ;-) |
15:51:21 | Araq | but more flexible |
15:51:37 | gradha | what language do sum types come from? |
15:51:47 | gradha | I was talking in my C dialect |
15:51:51 | Araq | I know them from ML |
15:52:44 | gradha | according to google's http://yinwang0.wordpress.com/2011/08/28/sum/ they also appear in haskell |
15:53:03 | Araq | yeah but ML is much older than haskell ... |
15:53:20 | gradha | oh, that surprises me, I heard about haskell before ML |
15:54:06 | gradha | as you can see never looked too deeply into any of them |
15:54:23 | Araq | so to answer your question: I see no problem with == for object variants |
15:54:54 | gradha | I was thinking more of defining two vars, then set a type for one, another for the second, and try to assign them |
15:55:02 | gradha | I guess you can't assign either? |
15:55:35 | gradha | I'll try to write some code to understand (myself) |
15:56:06 | gradha | BTW, I was underwhelmed at the small amount of nitpicks for the todo example |
15:56:12 | gradha | I was expecting more! |
15:56:40 | Araq | what? oh ... |
15:57:03 | Araq | well your example looked nice to me |
16:00:11 | exhu | nimrod doesn't have C-like unions, does it? I've only seen object variants with discriminator field and union-like structure followed. |
16:01:10 | Araq | yes exactly |
16:01:45 | dom96 | gradha: Random question: are you Polish by any chance? Your name sounds very Polish heh. |
16:02:04 | gradha | I was born there, grew up in Bilbao, north of Spain |
16:02:13 | dom96 | cool |
16:02:27 | dom96 | I was born in Poland too. Live in Ireland now. |
16:02:58 | gradha | I did learn to read Polish only because my grandfather insisted on a holiday |
16:03:08 | gradha | never went to school, though, so I can hardly write it |
16:03:36 | gradha | for practical reasons you can consider me from Spain |
16:03:43 | dom96 | ahh, I've been in Poland for 9 years of my childhood so I can speak it fluently and write it fairly well. |
16:03:51 | exhu | emigrants -) my fellow countrymen migrate to poland, russia, lithuania and the polish, lithuanians and russians migrate further... |
16:04:05 | gradha | I left Poland before being one year old, or so I'm being told |
16:17:24 | q66 | Araq, http://codepad.org/sGHFZATQ |
16:17:27 | q66 | \o/ |
16:17:37 | Araq | so gradha, ... do you feel like documenting exception tracking? ;-) |
16:17:51 | Araq | I'm about to push a version that I believe to work ... |
16:19:16 | gradha | how would I go about documenting them? where? |
16:20:21 | Araq | manual.txt |
16:21:35 | gradha | sure, why not |
16:22:37 | Araq | great |
16:22:59 | gradha | if you trust people who still don't know anything about the features... |
16:23:44 | Araq | *shrug* somehow writing documentation is more painful than it used to be |
16:24:11 | Araq | but I guess yeah I have to do it ... |
16:25:34 | gradha | there goes my chance to troll in the docs about how objc is the ultimate language |
16:26:19 | gradha | now that I think of it, after five years of objc I've never writen exception handling code |
16:26:33 | gradha | there simply aren't exceptions you are meant to catch, they are truly exceptional |
16:26:58 | gradha | in a way feels bad having to surround parseInt with a try/catch |
16:27:22 | Araq | there is also a parseutils.parseInt |
16:27:41 | Araq | but I think that can raise an exception too ... |
16:27:53 | Araq | we should add a 'tryParse' |
16:28:15 | gradha | well, good thing you are implementing this exception tracking stuff, we will finally know |
16:28:38 | gradha | maybe it would be a nice convention to force all procs starting with try... to not throw any exception |
16:28:56 | gradha | as a compilation check |
16:29:33 | Araq | add {.raises: [].} and let the compiler verify it for you :P |
16:30:47 | gradha | is that new? I'm not finding it in the index |
16:31:04 | Araq | lol ... I said it's not documented nor pushed |
16:31:23 | Araq | http://axisofeval.blogspot.de/2012/09/when-i-hear-your-new-pl-doesnt-have.html |
16:31:38 | gradha | I thought that was somehow a parallel feature already implemented |
16:31:39 | gradha | sorry |
16:32:28 | gradha | haha, nice gifs |
16:32:35 | Araq | http://axisofeval.blogspot.de/2012/07/when-somebody-says-he-doesnt-like.html |
16:36:51 | gradha | nice http://axisofeval.blogspot.de/2012/07/when-i-see-that-rubys-parser-is-10000.html when I looked at ruby and found it didn't deal with unicode at all, created by a japanese guy, I thought I was being trolled |
16:38:31 | fowl | lol parse.y is frightening |
16:40:20 | gradha | dom96: if you add '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">' to the html for the irc logs utf8 sequences will render much better, at least on mac/safari |
16:40:49 | Araq | don't change it then :P |
16:40:54 | Araq | let the safari users suffer |
16:41:03 | Araq | they want it that way |
16:41:04 | dom96 | gradha: mm, thanks. I've been meaning to fix that. |
16:41:32 | dom96 | It will be fixed as soon as I deploy the new nimbuild ;) |
16:41:41 | exhu | BTW, Araq why haven't you used any lexer/parser generation tools but hand written them for nimrod? |
16:42:01 | Araq | ever used a lexer/parser generator? |
16:42:22 | exhu | yes, I tried ANTLR one day |
16:42:59 | exhu | it has nice ide for developing grammar -) |
16:43:32 | exhu | written in java =))) |
16:43:39 | Araq | antlr doesn't count :P |
16:44:27 | Araq | well there are no good parser tools around for pascal and they all have problems with the way I wanted to implement indentation handling anyway |
16:44:55 | exhu | I see |
16:45:04 | Araq | and if you struggle with a parser and a lexer, you shouldn't attempt to write a compiler |
16:50:13 | gradha | I don't remember having problems with lexing/parsing at university, doing stuff by hand. Then I looked at antlr and felt I needed several years to start understanding it, so I dropped the ball there in creating my own programming language. |
16:50:30 | gradha | good thing I found nimrod |
16:51:28 | gradha | so far it's meeting all my expectations, so I'm turning back on what I said before and I'm planning on writing "real programs" with it |
16:51:43 | gradha | where "real programs" means, something I and my father know of |
16:51:45 | exhu | I found antlr very nice especially reading the book about it in parallel -) |
16:52:15 | exhu | written by the author of ANTLR |
16:52:17 | gradha | maybe that was my mistake, I tried learning from the docs and some tutorials |
16:53:00 | Araq | I lost interest when I read antlr's author actually *likes* java ... ;-) |
16:53:36 | Araq | q66: consider making patterns first class in your language |
16:53:50 | Araq | looks like a killer feature :-) |
16:54:31 | gradha | are you planning on killing perl? |
16:54:46 | exhu | lol -) I find java good for studying. the books are written in plain language and you see all sorts of do's and dont's which are applicable to programming in general not bound to java. |
16:54:59 | Araq | wtf? |
16:55:13 | gradha | patterns != regular expresions? |
16:55:26 | Araq | most do's and dont's for java are backwards and wrong |
16:55:41 | Araq | the language actually encourages bad design like no other ... |
16:56:13 | exhu | ogm |
16:57:23 | q66 | [17:53:36] <Araq> q66: consider making patterns first class in your language |
16:57:29 | q66 | I'll definitely look into it eventually :P |
16:57:53 | Araq | gradha: indeed, patterns have not much to do with regular expressions |
16:58:16 | gradha | Araq: I guess you are talking then about these fancy dispatch-thingies in higher level languages |
16:58:23 | Araq | indeed |
17:00:01 | Araq | q66: looks hard to do that for a static language, but since yours is dynamic, it should be very easy to implement |
17:00:25 | q66 | Araq, yeah, untyped is all about tradeoffs, but it gives you some benefits as well |
17:01:14 | Araq | I never denied that; for a start you get generics for free |
17:04:08 | q66 | Araq, i'd say, for a natively-compiled language for large apps, definitely typed; for scripting, prototyping, hacking around, embedding, untyped |
17:05:22 | Araq | I need static typing even more for scripting ... |
17:05:37 | * | q66 shrugs |
17:05:39 | Araq | or do you have test suites for your scripts? |
17:06:02 | q66 | not many tests actually |
17:06:10 | q66 | i rarely make errors a type system would detect these days |
17:06:15 | q66 | in scripted code that is |
17:06:29 | q66 | and i modularize a lot |
17:06:36 | q66 | so that i can test each module separately and quickly |
17:06:45 | gradha | when I think of scripts I think of bash, not much static typing there |
17:07:19 | q66 | "a type system would detect" .. though some type systems seem to be able of detecting everything :) |
17:07:21 | q66 | think ATS |
17:08:15 | q66 | in a typed language i really appreciate a presence of proper typing and inference, then it makes programming in C++ or whatever look like a pain in the ass which it is |
17:09:49 | Araq | there you go, gradha |
17:10:00 | gradha | there I go |
17:10:22 | Araq | 'doc2' annotates the possible exceptions for you |
17:10:23 | q66 | Araq, in fact i'm thinking of attempting a typed variant of my language sometime, something like Racket vs Typed Racket |
17:10:51 | q66 | definitely inferred one, with hindley-milner or something |
17:11:00 | Araq | q66: no offense, but you have too much time ;-) |
17:11:12 | * | Vladar joined #nimrod |
17:11:18 | q66 | i actually feel like i have too little time :< |
17:11:22 | q66 | for all the stuff i'm doing |
17:15:36 | Araq | welcome Vladar |
17:15:52 | Vladar | Hi |
17:20:07 | gradha | Araq: funny getting EAssertionFailed in the generated docs, forces me to use -d:release |
17:21:24 | gradha | it is annoying that running nimrod doc2 also builds the html for the imported modules, then git complaints about untracked files |
17:22:15 | gradha | maybe all generated html files should be put in the current working directory rather than where they were found? |
17:22:42 | Araq | hm maybe |
17:23:38 | gradha | at least the html links don't work for those modules |
17:23:48 | gradha | since they are somewhere there on the fs |
17:24:20 | gradha | is there any other way to invoke the exception tracking or only doc2 does use it? |
17:24:26 | * | exhu quit (Quit: Ex-Chat) |
17:24:47 | gradha | to me it seems that it would be useful that you define a proc to raise something, then the compiler can verify if that is valid |
17:24:52 | gradha | similar to an assertion |
17:25:05 | Araq | well of course |
17:25:19 | Araq | {.raises: [list-of-exceptions-here] .} |
17:25:34 | Araq | use that and the compiler will verify or complain |
17:25:43 | Araq | you can also do: |
17:25:50 | Araq | proc p() = |
17:25:54 | gradha | so the flow would be 1) write proc without .raises, 2) run nimrod doc2 3) annotate and review proc implementation |
17:25:54 | Araq | ... # code here |
17:26:14 | Araq | {.effects.} # tell the compiler to tell you about all inferred effects |
17:27:01 | Araq | but your flow sounds good too |
17:27:21 | Araq | {.effects.} should be less annoying than doc2 though |
17:27:33 | gradha | missing is step 4) come back after a year, let nimrod bark at you because something changed |
17:28:58 | Araq | but the compiler always does step 4) ... |
17:29:20 | Araq | as soon as you have a 'raises' annotation it is checked for you |
17:29:29 | Araq | and 'raises: []' means that it raises no exception at all |
17:29:29 | gradha | beat me to that |
17:30:45 | gradha | are you meant to keep .effects. all the time in code? it doesn't shut up after add ing .raises. to the proc |
17:31:23 | gradha | I guess it's temporary, since you say nimrod will check the raises list always |
17:32:43 | Araq | yeah it's for the work flow |
17:33:40 | Araq | the effects system will be enhanced with user defined tagging but that's not implemented |
17:33:51 | Araq | only exception tracking has been implemented for now |
17:34:15 | gradha | are you stopping here or will the .effects. hint say which child proc raises the exception? |
17:34:42 | Araq | not in the near future |
17:34:57 | Araq | but it points you at the particular 'raise' statement, right? |
17:35:11 | gradha | yep, file and line |
17:35:18 | Araq | good |
17:35:31 | Araq | call graph is do-able but expensive |
17:35:57 | gradha | how does exception tracking relate to that .tag. feature I remember reading in irc logs? |
17:36:07 | gradha | what/how is this tag meant to work? |
17:36:15 | Araq | both are part of nimrod's effect system |
17:36:25 | Araq | and {.effects.} will list all effects |
17:37:49 | Araq | dunno what else to answer, .IO. is supposed to mark routines as performing some IO, for instance |
17:38:08 | Araq | IO will be a user-defined tag in system.nim, however |
17:38:23 | gradha | ok, so there is a mechanism to create user-defined tags |
17:38:27 | Araq | yes |
17:40:07 | gradha | I have the feeling these tags are just macros, and {. .} evaluates them at compile time |
17:40:41 | Araq | they have nothing to do with macros |
17:41:21 | gradha | ok, still haven't reached that part of the tutorial, got distracted by that guy ranting |
17:41:47 | Araq | alright, well I have to go, see you later |
17:41:51 | gradha | bye |
19:08:53 | * | exhu joined #nimrod |
19:10:06 | exhu | gradha, Araq I have created an issue long time ago about doc2 to put generated docs into specified location -) |
19:11:03 | exhu | " Everyone knows that the best programmers use Vim and Emacs. Then come the TextMate users. If you need to use an IDE then you suck, period." http://www.jroller.com/obie/entry/top_10_reasons_why_java |
19:11:36 | exhu | continuing rant exchange -) |
19:18:39 | gradha | added comment to https://github.com/Araq/Nimrod/issues/190 then |
19:19:46 | Araq | exhu: already know it ;-) and disagree |
19:20:19 | Araq | I mean I disagree with Obie Fernandez, not with your feature request ... |
19:21:22 | gradha | nice, I don't know what DHH stands for in the tenth point |
19:22:28 | reactormonk | Araq, wtf, the scala type system really kicks your ass |
19:23:09 | Araq | not really but I lost the link |
19:23:28 | reactormonk | I suppose you know how they handle null pointers :-) |
19:23:43 | exhu | I tried to learn Ruby several times, but its dynamic nature together with strange syntax and extra overriding features prevented me from going on. |
19:25:18 | reactormonk | exhu, hey :-( |
19:25:35 | reactormonk | exhu, overrinding features? welcome to OO ;-) |
19:25:43 | Araq | ruby is too close to python, so I never learned it |
19:26:02 | Araq | I guess I'd prefer it over python now because it has a 'case' statement |
19:26:26 | dom96 | hey Vladar. How's nimgame going? |
19:26:37 | Araq | but there is no need ... nimrod fits my scripting needs much better ... |
19:28:21 | exhu | nimrod is productive like python, i enjoy having that "when isMainModule: ... some test calls ..." thing. |
19:28:22 | Vladar | dom96, I'll hope to release v0.3 pretty soon |
19:28:47 | dom96 | Vladar: cool |
19:37:10 | gradha | oh man, googling for dhh I reached http://www.zedshaw.com/, can't believe how user unfriendly that is |
19:38:50 | reactormonk | gradha, zedshaw is the ranter of the ruby community |
19:39:14 | dom96 | zedshaw is awesome |
19:40:37 | reactormonk | and a dick |
19:40:42 | gradha | seems to have a really narrow view of web users, basically his web is an insult to all disabled users |
19:40:43 | dom96 | true |
19:41:33 | reactormonk | gradha, ... no. the HTML is kinda readable. I just don't think a screenreader will be that intelligent, as most webpages have fucked up HTML |
19:42:07 | gradha | oh, the site is usable, in fact, the lynx version is MORE usable that the HTML5 version |
19:42:19 | gradha | what I mean is the disabled user goes to his site, and first thing he get's called troglodyte |
19:44:28 | fowl | Araq: i could do some l33t stuff if varargs[expr] worked with {.immediate.} |
19:45:42 | Araq | reactormonk: I'm not talking about scala's null checking but about its implicit type conversions which means wrong code compiles |
19:45:56 | Araq | but I lost the link with examples for that unfortunately |
19:45:56 | reactormonk | Araq, wrong code compiles? |
19:46:02 | Araq | yeah |
19:46:29 | reactormonk | huh? |
19:47:08 | Araq | well technically it's not wrong |
19:47:10 | Araq | but it leads to very suprising behaviour |
19:48:43 | Araq | brb |
19:52:32 | fowl | Araq: i can still use callsite() to get what i need, but its not ideal |
19:57:48 | Araq | fowl: I think what you want will be supported as a sideeffect once I got to rewrite overloading handling |
20:02:36 | Araq | but hrm varargs[expr] with immediate seems easy to support |
20:02:53 | Araq | what's your use case? |
20:11:10 | Araq | Vladar: ported nimgame to 0.9.0 already? |
20:13:44 | Vladar | yes, around 2 month ago, actually |
20:17:27 | fowl | Araq: i wrote a macro so i can call parseArgs(channel, ...msg) from inside the dsl and it will build the regex "(\S+)\s*(.*)" and assign those vars to the matches |
20:21:29 | fowl | https://gist.github.com/4013528 |
20:35:20 | gradha | Araq: the exception tracking will need to filter some exceptions, right now if I define a proc to raise EDb, then add an assert in the body, it stops compiling, even though EAssertionFailed won't appear with -d:release. So this particular exception would likely be filtered (always?) to allow easier development. The -d:release makes me uneasy with code that may branch into raising exceptions or not, so a user filter option would be n |
20:39:36 | Araq | yeah, EAssertionFailed needs to be special-cased :-/ |
20:40:10 | Araq | on the other hand maybe we should get rid of it and terminate the program instead |
20:40:20 | Araq | it's nice for unit-testing though ... |
20:41:05 | gradha | I can still imagine procs using code or not depending on compiler switches which may require different {.raises.} definitions. |
20:41:27 | gradha | for instance, a debug version might log to a file or network server, release not |
20:41:45 | gradha | the debug version then might raise io/network exceptions the release version won't |
20:41:46 | Araq | so what, just add it to the raises in any case |
20:42:19 | gradha | don't you get errors too if you specify too many exceptions? |
20:42:52 | gradha | ok, not Hint: 'EAssertionFailed' is declared but not used [XDeclaredButNotUsed] |
20:44:09 | gradha | guess time will tell if this is annoying enough or not |
20:50:20 | * | shevy3 joined #nimrod |
20:50:25 | shevy3 | hey |
20:50:50 | fowl | hey shevy |
20:53:21 | shevy3 | always when I read a python tutorial and want to learn it, I decide that I'd rather want to learn nimrod |
20:53:23 | shevy3 | :\ |
20:54:51 | shevy3 | python seems somewhat similar to ruby in some ways, so perhaps that's why, whereas nimrod looks rather exotic |
20:56:21 | reactormonk | shevy3, they are similar, but solve some problems in a different way |
20:57:05 | reactormonk | I have to admit the static typing of scala is fucking annoying, but helps. Sometimes I'm like "just run, let's see what happens". Then I see why it complains and I realize it's right |
21:01:22 | shevy3 | hmm I never tried scala... I think one needs to have java, and I somehow dont like java much |
21:01:40 | shevy3 | well, different mindsets, different ideas, one can learn, and use what is good |
21:02:07 | shevy3 | the only thing so far I can wholly submit and sign to, when it comes to programming, is to try and "keep things simple", whenever that is possible (and does not conflict with something else) |
21:02:35 | gradha | Araq: can you make {.effects.} dump first its own file/lineno if it gets to show any hint or raised exceptions? I think that would be nice |
21:02:58 | gradha | Also, it seems that {.effects.} works at the line you put it, so if you raise an exception later, that's not displayed |
21:03:11 | gradha | seems like a nightmare for procs with multiple return points |
21:04:00 | gradha | or at least it is not clear where should I put the {.effects.} |
21:04:40 | Araq | well that's supposed to be a *feature* |
21:05:08 | Araq | so you know where the exception comes from if you have complex control flow ... |
21:07:38 | Araq | you should put it as a last statement |
21:08:04 | Araq | and it's not a nightmare for multiple return points at all as it's statically evaluated ... |
21:09:30 | gradha | I was more thinking of the human part, like adding/removing the {.effects.} to multiple points to verify what is being raised or not. I'll likely end up writing always {.raises [].} then wait for compiler errors |
21:09:54 | Araq | *shrug* that's fine too |
21:10:22 | gradha | ah, crap, that doesn't list what exceptions are missing |
21:10:42 | Araq | not? |
21:10:47 | Araq | it doesn't? |
21:10:56 | gradha | no, just an error |
21:11:22 | gradha | http://pastebin.com/FURyPJAK |
21:11:29 | Araq | it should output: can raise an unlisted exception: xyz |
21:12:00 | Araq | oh lol |
21:12:13 | Araq | use the 'check' command to see the error |
21:12:18 | Araq | *the full error |
21:12:23 | Araq | funny bug :-) |
21:12:28 | gradha | check? |
21:12:34 | gradha | what's that? |
21:12:37 | Araq | 'nimrod check myfile.nim' |
21:13:17 | gradha | wow, didn't even know that existed |
21:13:30 | gradha | yes, that works |
21:14:09 | gradha | why is check a separate command? is compilation faster that way? |
21:14:14 | Araq | yes |
21:14:25 | Araq | skip the code generator |
21:14:43 | gradha | i'm all for breaking the speed of light, so I won't complain about it |
21:15:56 | gradha | oooh, so idetools is what you were talking the other day about "same compiler support for vim" |
21:16:13 | Araq | yes |
21:16:56 | Araq | it still barely works, but it's getting better all the time |
21:17:13 | Araq | and I write the compiler now with this feature in mind |
21:20:22 | Araq | wb shevy3, I'm still waiting for your improved nimrod tutorial ;-) |
21:20:23 | * | Vladar quit (Quit: Leaving) |
21:28:20 | gradha | why does system.nim make some exceptions inherit from ESystem but other directly from ESynch? eg: EIO vs EArithmetic. According to the name EDivByZero might happen at runtime |
21:29:21 | Araq | well stuff like EOverflow and EDivByZero is not tracked (yet?) |
21:29:38 | Araq | and to answer your question: I don't know |
21:30:25 | Araq | I think I had some reasons for it |
21:40:25 | * | exhu quit (Quit: Ex-Chat) |
21:52:48 | Araq | gradha: 'effects' now lists its context |
21:55:45 | gradha | compiling |
21:57:53 | fowl | https://gist.github.com/4013528 love using templates for dsls :> |
22:00:06 | Araq | fowl: you should write blog posts about it ... |
22:00:46 | Araq | and reddit them |
22:03:01 | fowl | mehhhh i dont either like either of those things |
22:03:27 | shevy3 | blog entries are quite a lot of work |
22:03:35 | shevy3 | but linking together such snippets would be great |
22:03:52 | Araq | ok then add something cool to examples/ |
22:04:24 | shevy3 | ohhh... I could gain immortality there, if I manage to write a useful nimrod program one day :) |
22:05:01 | Araq | yeah but we already have useful programs here ;-) |
22:05:24 | Araq | write a useful tutorial instead |
22:06:18 | gradha | Araq: i'm not seeing effects telling about the context |
22:06:34 | gradha | from the commits I have I also can't see how/where it was changed to do so |
22:07:05 | Araq | my bad |
22:07:23 | Araq | but I added push/pop-InfoContext around it |
22:07:33 | Araq | has no effect because it's only a hint message I guess |
22:09:05 | gradha | weird, the raised exceptions are hint themselves and they show up |
22:10:07 | Araq | it's not weird for me ;-) |
22:10:30 | Araq | well I can make .effect. generate warnings instead to fix it |
22:10:30 | Araq | what do you think? |
22:11:00 | gradha | still have no precise opinion on hints vs warnings |
22:12:48 | gradha | at the moment I don't think its a very important feature, given that you have to go in and enable/disable {.effects.}, so a developer will likely know where this is happening |
22:13:07 | Araq | true |
22:13:12 | Araq | good point |
22:13:20 | Araq | why did you want this feature then? :P |
22:13:39 | gradha | maybe it would be useful if you had a compiler switch which suddenly turned {.effects.} for all exit points in all procs, as in migrating code from nothing to {.raises.} |
22:13:58 | gradha | also, for documentation/inspection of foreign code |
22:14:15 | gradha | but then, running doc2 might be the answer to that |
22:17:48 | Araq | I spent too much time on this feature already tbh ;-) |
22:18:09 | gradha | no problem, let it sink, I think its sweet |
22:18:27 | Araq | it's already better than anything I've seen and kicks java's checked exceptions |
22:18:53 | gradha | yep, I was going to ask if other language had this, then remembered the horror of java |
22:19:39 | Araq | java got the default wrong |
22:19:43 | gradha | the fact that I explicitly forgot about the feature in java speaks about its usability, I guess |
22:20:11 | Araq | java assumes no exception if you don't write 'throws Exception' everywhere |
22:20:26 | Araq | but that's way to verbose so nobody does that |
22:20:40 | Araq | and then it's incredibly bad if you need to adhere to some interface ... |
22:20:56 | Araq | you can only catch all + log it somewhere then |
22:21:12 | Araq | so that's what java code is full of ... |
22:21:48 | Araq | it's a braindead design and anybody thinking about it for 10 minutes would have predicted it |
22:22:47 | gradha | oh the horror, unpacking json from a file makes eclipse dump three different catches, at least on android with jackson, makes a messy long method |
22:23:14 | gradha | it really makes you want to put everything inside a catch for the most generic exception |
22:35:39 | Araq | "This function may give unexpected or completely wrong results on Windows" |
22:36:29 | dom96 | Sounds professional, I know :P |
22:36:49 | dom96 | IMO we should simply deprecate it |
22:37:01 | Araq | nah |
22:37:02 | dom96 | Unless it's worth keeping it for Linux-only people. |
22:37:08 | Araq | somebody will come and fix it |
22:37:10 | dom96 | or for the risk-takers |
22:37:15 | dom96 | perhaps yeah |
22:37:30 | dom96 | As far as I know Windows simply does not allow you to do that. |
22:37:36 | dom96 | Anyway, good night |
22:37:40 | Araq | bye |
22:50:29 | * | gradha quit (Quit: gradha) |
23:02:15 | * | Araq__ joined #nimrod |
23:03:33 | * | Araq_ quit (Ping timeout: 252 seconds) |
23:29:42 | * | q66 quit (Quit: Quit) |