<<04-11-2012>>

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:54Araqfyi: http://richardkulisz.blogspot.de/2010/12/why-linux-is-decrepit-donkey-crap.html
12:37:35*exhu joined #nimrod
12:38:09exhulooks like a troll wrote this post -)
12:39:01Araqhi exhu ;-)
12:39:14Araqyeah ... it posted it before reading it completely
12:39:18exhulinux is one of the best software, at least because it provides an alternative choice.
12:39:22Araqon the other hand, I like good rants
12:39:56Araqan alternative choice if you don't like computer games, maybe :P
12:40:22exhuit 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:04Araqlooks more like the "lisp machine" guy to me ...
12:41:27Araqmacosx is based on unix too and I'm sure the guy knows that
12:42:14Araqdunno ... haiku is the ideal OS :P
12:42:26Araqit doesn't support 64bit though and has no applications ...
12:43:39Araqactually the microsoft people got it right ... an OS is meaningless
12:43:39Araqit's all about the applications
12:43:39Araqand they used to ensure applications wouldn't break
12:43:40Araqwell ... they tried ;-)
12:44:09Araqfor instance, they had special code that ensures "Sim City" would continue to run
12:44:18exhuI 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:32exhuthan modern macbook pro with 8 gigs ram etc.
12:44:34Araqeven though the game frees memory immediately and then uses that memory
12:44:58Araqwhich happened to "work" on DOS or something
12:45:37exhuthe sim city story is a legend now -)
12:47:13exhuthat 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:28Araqpython always confused "high level" with "dynamic" IMHO ...
12:53:16exhupython is good for many things but not for game development and not for tray-icon applets -)
12:55:32exhuthe 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:24exhuBTW I tried Go language and found its Go->C bridge had the same bloat and then tried studying nimrod -)
13:02:08Araqyeah; it's much worse for a compiler though
13:02:32Araqthe very idea of writing a compiler in python and "optimizing the hotspots" in C is ridiculous
13:03:50Araqso ... I should answer your post ... a lockfree list is possible in nimrod ...
13:04:07Araqbut you can't dealloc without a lock
13:04:37Araqyou can add it so some other free list though
13:06:39Araqexhu: what was that java test btw? real world or microbench?
13:07:46exhumicrobench -)
13:08:12Araqwith serious contention?
13:09:06exhuyes, 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:37exhubut it's too dangerous and i'm not 100% sure the algorithm is correct -)
13:10:50Araqso are you a professional game dev?
13:12:22exhui 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:14exhumainly fixing, debugging, reverse engineering -)
13:14:19Araqbut my point was: not as a hobby, right?
13:15:00exhuright, i earn my living working as a software engineer in a game-developing company.
13:15:52Araqcool cool
13:17:35exhusometimes I regret i had abandoned java ee ocupation as a junior five yrs ago, because enterprise engineers are paid way higher
13:20:41Araqyeah but then you'd have the pain of working in java ...
13:22:02exhusome 32 gigs of ram would weaken the pain =)
13:22:44Araqbut then it would need to GC 32gigs of RAM ...
13:24:59exhuit'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:35Araqwell I can't guarantee it won't happen in nimrod once we excessive generics everywhere
13:26:41Araq*we have
13:27:03AraqI argued nimrod's math libraries shouldn't do that but couldn't convince zahary
13:27:34AraqI would do something like:
13:27:36Araqwhen not defined(TMatrixElem): type TMatrixElem = float
13:27:47Araqand use nominal typing in the libraries
13:27:58Araqbut that's not sexy ;-)
13:29:07exhuprecompiled modules (i.e. intermediate data, like ppu in freepascal) could help
13:29:55Araqoh he's also working heavily to break all my invariants and thus my symbol file implementation ... ;-)
13:30:00exhui don't like all those fancy features like overloading, "var a_b_c: int" is the same as "var abc: int" etc.
13:30:49AraqI consider all the alternatives worse ...
13:30:59exhuand i won't heavily use macros, since I have painful experience with anything that uses C++ boost library.
13:34:40Araqwell overloading is a cornerstone of the whole language ...
13:35:02Araqit's a compiletime dispatch mechanism that is "open"
13:35:28exhuAs for the generics in math modules, i reckon "float" would be enough for most game dev =)
13:35:56Araqno other language feature else delivers that and no haskell's typeclasses don't count
13:39:26exhuwhat 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:58exhucompiler's feature to show where the implementation of the concrete function lies is very important.
13:40:12exhuimportant for debugging and reverse engineering.
13:41:45AraqI'm aware, yeah
13:41:57Araqthat's why we try to develop IDE support at the same time
13:42:32Araqyou can't do anything else these days or you end up with something like Oberon
13:42:39Araqwhich even assumes no syntax highlighting is available and thus all keywords should be in UPPERCASE ...
13:42:47exhuit is what the scripts have -- it's a feature and a hurdle for a new person who reads the sources.
13:44:51exhuI should look at oberon -)
13:45:10Araqor modula-2 or 3 for that matter
13:45:35exhuI tried Ada and was sick and tired of verboseness.
13:46:00Araqhe he I actually programmed a game engine in Ada ;-) ok, nothing fancy
13:46:25Araqjust a 2d realtime strategy game but it was never finished
13:46:28exhuwriting a program in Ada is like designing a spacecraft to me -)
13:46:50Araqproblem was: the language was better in some respects than freepascal/delphi
13:47:15Araqbut worse in others
13:47:15Araqand the tools were much worse
13:47:31Araqso I ended up rewriting it in delphi again
13:48:22exhuwhat 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:37Araqit's a pita for everything else too
13:48:37exhuand throw-away vars
13:50:44exhubut i like freepascal compiler and lazarus, although have never written anything serious in it.
13:51:47exhucompiling speed is awesome, produced code is good as well.
13:52:20Araqit's however not on par with C compilers
13:53:13Araqbut yeah I can't believe Go is famous for its compile times when delphi's are much better
13:53:23Araqignorants
13:54:53exhuI remember in 90-s Watcom C was popular and it compiled quite fast.
13:56:17exhuI 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:50exhuif not then it's easy to implement zero-cost binding to C implementation.
13:57:54Araqyeah but I think the gap widened
13:58:10AraqC can do auto vectorization now
13:58:15Araqand it's pretty decent
13:58:42Araqwe had some benchmarks in nimrod running faster than the optimized C version that used SSE explicitly
13:58:48exhuI prefer instant compile times over super optimization and smart enough to vectorize myself where needed :-)
13:59:44exhuI 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:00exhuprobably, jvm inlines it all
14:00:48exhuin java it's readable and it runs faster even including the time to start the jvm
14:01:38Araqinteresting
14:02:27Araqmaybe you should try profile guarded optimization with intel's compiler ;-)
14:02:40Araqshould match the JVM then
14:02:58Araqbut maybe it wouldn't
14:03:11Araqin fact, I'd look at the produces assembler of both
14:03:15Araq*produced
14:03:33exhui have not found (googled) a way to see what jvm produces
14:04:41AraqI wouldn't bother and blame the CPU caches ;-)
14:05:23Araqmaybe the JVM got lucky and produced different offsets resulting in fewer cache misses
14:05:40exhujava 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:25exhuit'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:49Araqyou should use aporia instead of jedit :P
14:27:52q66jedit is cool
14:28:01q66i use it
14:28:03q66but i hate java :P
14:28:22AraqI used it, didn't like it for some reasons and never used it again
14:28:29Araqcan't remember the reasons though
14:28:37q66exhu, jedit with about 40-60 files open right now eats 160MB
14:28:39Araq"written in java" was among them, of course :P
14:29:10q66it keeps this memory usage actually whatever the number of open files is :P
14:29:20q66i've never seen it go above 180MB
14:29:32exhuI just got used to it, nothing special. it's easy to install and the same under four computers I work on.
14:29:58exhuon mac, win, two linuxes
14:30:21q66i use it on mac
14:30:25q66and freebsd
14:30:27AraqI use aporia or gedit
14:30:35q66gedit is ew
14:30:43Araqon mac finding a decent editor was a problem
14:31:00q66well, i found jedit when searching for an editor on mac and it worked ok so i kept using it
14:31:01exhujedit on mac is the only decent one :P
14:31:02Araqbut then everything was a pita for me too so I stopped using macs
14:31:02q66was using geany before
14:31:31q66there is also sublime text which is nice
14:31:41q66but IMO jedit is as good
14:31:43q66and it's free
14:31:46q66so fuck sublime text :P
14:31:54exhui was looking for a one thing working the same on all platforms.
14:31:57Araqnot using macs actually solved *many* problems :P
14:32:47exhugtk+ pulls a lot of dependencies with it, pain to intall all that gtk runtime.
14:33:09Araqtrue
14:34:10*gradha joined #nimrod
14:34:22exhuwhen a needed a GUI lib for a level-editor, I used FLTK
14:34:50exhutrully lightweight
14:35:16Araqthey use C++ as "C with objects" iirc
14:35:41exhuC with objects is ok, rather that Qt's C++ with two preprocessors =)
14:35:53q66[15:35:16] <Araq> they use C++ as "C with objects" iirc
14:35:53exhu*rather than
14:35:56q66aka the only valid way to use C++
14:37:30gradhaI believe C with objects was objc...
14:37:40q66objc sucks :P
14:37:53Araqno that's "C with smalltalk envy" ;-)
14:38:00gradhaok
14:38:58exhuI'd better prefer java to objC, had a lot of objc at some time. It's slow.
14:39:13q66i'd prefer anything to java
14:40:12exhuwhy, netbeans IDE + java is the ideal development environment. jvm program runs pretty fast after some JITing =)
14:40:31q66java is a crappy language
14:40:41Araqnever found netbeans to be better than eclipse
14:40:41q66and an IDE does not make up for it
14:42:00exhujava is clean although verbose language, too bad it lacks C structs and typedefs ... =)
14:42:18q66<Zor> java is a brain-damaged product of people thinking OOP is the answer to all problems
14:42:50exhudon't use OOP, think of classes as modules
14:43:02q66no
14:44:39exhuits 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:00q66"nice" class names http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.html
14:45:01exhutoo many abstractions and so on.
14:45:02q66hurr
14:45:30q66"org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter"
14:45:31q66wow.
14:45:41AraqJava isn't even a decent OO language ...
14:46:18q66java sucks in every way possible
14:46:19exhuoverly abstracted and secured via long namespaces
14:46:35q66if you HAVE TO use jvm, use Scala
14:46:37q66that's it
14:46:48exhuscala is too algebraic
14:47:40Araq"Convenient proxy factory bean superclass for proxy factory beans that create only singletons. "
14:47:54Araqhard to tell whether that's a joke or not ...
14:48:09exhuLOL, yea
14:48:10q66Araq, apparently it's not a joke http://www.springsource.org/
14:48:15q66"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:16q66ENTERPRISE
14:48:17q66HURR
14:48:26q66wait
14:48:29q66so actually it IS a joke
14:48:32q66because enterprise == joke :P
14:48:35exhuenterprise is about tons of frameworks =)
14:48:46Araqa parody of it would end up being exactly the same
14:48:53exhui used spring, hibernate and some other things in youth -)
14:49:05exhui was tons documents to read
14:49:33AraqI had to use hibernate for one project at university
14:49:41AraqI quickly wrote the SQL by hand
14:49:58Araqwas faster and more maintainable
14:50:36q66Araq, btw, i implemented pattern matching in my lang today
14:50:52Araqnice
14:50:52q66including expression, variable, as, and, or, table, wildcard patterns, missing a cons pattern (which will get implemented with lists)
14:51:09q66there are subpatterns (parenthetised grouping of patterns), pattern guards (pattern when cond)
14:51:28Araqwhich algorithms do you use?
14:51:40Araqdo you support full unification?
14:52:12q66http://codepad.org/TetO9e4P
14:53:00q66nope, no full unification
14:53:10Araq | [a, a] -> ... # supported?
14:53:17Araqah ok
14:53:26q66it's simple ocaml-ish thingy
14:53:32q66used for decomposition and stuff
14:54:04q66it doesn't detect non-exhaustive patterns, but that makes no sense in an untyped lang anyway
14:54:17q66it just evals to nil in such case
14:54:37Araqmeh ...
14:54:51Araqnon-exhaustive pattern detection is really nice ...
14:56:16q66actually i might add it
14:58:02q66Araq, yep, i'll add static exhaustivity check
14:58:52q66it just needs another label and a bit different jumps
14:59:00Araqlooks non-trivial to me
14:59:08Araqhow would you implement it?
14:59:30q66actually nothing :P just a weird idea in my head
14:59:38q66yeah it's non-trivial to statically check that
15:02:15Araqocaml does it, right?
15:03:10q66Araq, yes
15:03:21q66ocaml is a typed language with way more static control though :)
15:03:34*Araq wonders if F# does it too ...
15:03:39q66probably does
15:04:16q66yes, it does
15:05:28Araqyeah, it's only a warning though :-/
15:18:39gradhaAraq: that rant by Richard is a goldmine, I'm adding the guy to my rss list
15:19:33exhugradha, that RIchard must be troll 20 level -)
15:20:01gradhajust read his post about the iliad being 3000 year ancient rap
15:20:25gradhaoh man, do I love looking at crazyness
15:21:01Araqgradha: link please
15:21:15gradhahttp://richardkulisz.blogspot.de/2012/06/gangster-rap-is-3000-years-old.html
15:21:28Araqyeah never mind, found it
15:22:41exhupriceless
15:23:42Araqfast!R == isInputRange!R && !isForwardRange!R && hasMutableIndirections!(ElementType!R)
15:28:55Araqha, and I considered D's ranges worthwhile to copy :P
15:43:03exhuhow 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:24Araquse 'var MyObj'
15:43:29Araqand yes, I know I know
15:43:38Araqauto deref is needed for that to work
15:43:47Araqon my todo ...
15:44:00gradhaI was just going to suggest overloading of ref to var...
15:44:03gradhais that possible?
15:44:31AraqI think so but then you have code duplication
15:45:50Araqand wasn't you against overloading ...? :P
15:46:14gradhawas I? Can't remember that
15:46:25Araqugh ... sorry
15:46:33Araqconfused you with exhu
15:46:55gradhawell, exhu seems to like java
15:47:04exhujava has overloading -)
15:47:16gradhayeah, but I don't like java
15:47:35gradhaAraq just "overloaded" our nicks
15:48:09Araqyou're the new guys ;-)
15:48:16exhu"Convenient proxy factory..." still makes me laugh.
15:49:05gradhatalking about crazy: object variants
15:49:20gradhadoes the compiler allow reading/setting a variable before the type?
15:49:40gradhahow does it check equality against differnt type nodes?
15:50:28Araq== is not defined of 'object'
15:50:29gradhain a way looks like an union struct with steroids
15:50:53Araqit's actually a somewhat broken sum type ;-)
15:51:21Araqbut more flexible
15:51:37gradhawhat language do sum types come from?
15:51:47gradhaI was talking in my C dialect
15:51:51AraqI know them from ML
15:52:44gradhaaccording to google's http://yinwang0.wordpress.com/2011/08/28/sum/ they also appear in haskell
15:53:03Araqyeah but ML is much older than haskell ...
15:53:20gradhaoh, that surprises me, I heard about haskell before ML
15:54:06gradhaas you can see never looked too deeply into any of them
15:54:23Araqso to answer your question: I see no problem with == for object variants
15:54:54gradhaI was thinking more of defining two vars, then set a type for one, another for the second, and try to assign them
15:55:02gradhaI guess you can't assign either?
15:55:35gradhaI'll try to write some code to understand (myself)
15:56:06gradhaBTW, I was underwhelmed at the small amount of nitpicks for the todo example
15:56:12gradhaI was expecting more!
15:56:40Araqwhat? oh ...
15:57:03Araqwell your example looked nice to me
16:00:11exhunimrod doesn't have C-like unions, does it? I've only seen object variants with discriminator field and union-like structure followed.
16:01:10Araqyes exactly
16:01:45dom96gradha: Random question: are you Polish by any chance? Your name sounds very Polish heh.
16:02:04gradhaI was born there, grew up in Bilbao, north of Spain
16:02:13dom96cool
16:02:27dom96I was born in Poland too. Live in Ireland now.
16:02:58gradhaI did learn to read Polish only because my grandfather insisted on a holiday
16:03:08gradhanever went to school, though, so I can hardly write it
16:03:36gradhafor practical reasons you can consider me from Spain
16:03:43dom96ahh, I've been in Poland for 9 years of my childhood so I can speak it fluently and write it fairly well.
16:03:51exhuemigrants -) my fellow countrymen migrate to poland, russia, lithuania and the polish, lithuanians and russians migrate further...
16:04:05gradhaI left Poland before being one year old, or so I'm being told
16:17:24q66Araq, http://codepad.org/sGHFZATQ
16:17:27q66\o/
16:17:37Araqso gradha, ... do you feel like documenting exception tracking? ;-)
16:17:51AraqI'm about to push a version that I believe to work ...
16:19:16gradhahow would I go about documenting them? where?
16:20:21Araqmanual.txt
16:21:35gradhasure, why not
16:22:37Araqgreat
16:22:59gradhaif you trust people who still don't know anything about the features...
16:23:44Araq*shrug* somehow writing documentation is more painful than it used to be
16:24:11Araqbut I guess yeah I have to do it ...
16:25:34gradhathere goes my chance to troll in the docs about how objc is the ultimate language
16:26:19gradhanow that I think of it, after five years of objc I've never writen exception handling code
16:26:33gradhathere simply aren't exceptions you are meant to catch, they are truly exceptional
16:26:58gradhain a way feels bad having to surround parseInt with a try/catch
16:27:22Araqthere is also a parseutils.parseInt
16:27:41Araqbut I think that can raise an exception too ...
16:27:53Araqwe should add a 'tryParse'
16:28:15gradhawell, good thing you are implementing this exception tracking stuff, we will finally know
16:28:38gradhamaybe it would be a nice convention to force all procs starting with try... to not throw any exception
16:28:56gradhaas a compilation check
16:29:33Araqadd {.raises: [].} and let the compiler verify it for you :P
16:30:47gradhais that new? I'm not finding it in the index
16:31:04Araqlol ... I said it's not documented nor pushed
16:31:23Araqhttp://axisofeval.blogspot.de/2012/09/when-i-hear-your-new-pl-doesnt-have.html
16:31:38gradhaI thought that was somehow a parallel feature already implemented
16:31:39gradhasorry
16:32:28gradhahaha, nice gifs
16:32:35Araqhttp://axisofeval.blogspot.de/2012/07/when-somebody-says-he-doesnt-like.html
16:36:51gradhanice 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:31fowllol parse.y is frightening
16:40:20gradhadom96: 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:49Araqdon't change it then :P
16:40:54Araqlet the safari users suffer
16:41:03Araqthey want it that way
16:41:04dom96gradha: mm, thanks. I've been meaning to fix that.
16:41:32dom96It will be fixed as soon as I deploy the new nimbuild ;)
16:41:41exhuBTW, Araq why haven't you used any lexer/parser generation tools but hand written them for nimrod?
16:42:01Araqever used a lexer/parser generator?
16:42:22exhuyes, I tried ANTLR one day
16:42:59exhuit has nice ide for developing grammar -)
16:43:32exhuwritten in java =)))
16:43:39Araqantlr doesn't count :P
16:44:27Araqwell 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:55exhuI see
16:45:04Araqand if you struggle with a parser and a lexer, you shouldn't attempt to write a compiler
16:50:13gradhaI 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:30gradhagood thing I found nimrod
16:51:28gradhaso 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:43gradhawhere "real programs" means, something I and my father know of
16:51:45exhuI found antlr very nice especially reading the book about it in parallel -)
16:52:15exhuwritten by the author of ANTLR
16:52:17gradhamaybe that was my mistake, I tried learning from the docs and some tutorials
16:53:00AraqI lost interest when I read antlr's author actually *likes* java ... ;-)
16:53:36Araqq66: consider making patterns first class in your language
16:53:50Araqlooks like a killer feature :-)
16:54:31gradhaare you planning on killing perl?
16:54:46exhulol -) 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:59Araqwtf?
16:55:13gradhapatterns != regular expresions?
16:55:26Araqmost do's and dont's for java are backwards and wrong
16:55:41Araqthe language actually encourages bad design like no other ...
16:56:13exhuogm
16:57:23q66[17:53:36] <Araq> q66: consider making patterns first class in your language
16:57:29q66I'll definitely look into it eventually :P
16:57:53Araqgradha: indeed, patterns have not much to do with regular expressions
16:58:16gradhaAraq: I guess you are talking then about these fancy dispatch-thingies in higher level languages
16:58:23Araqindeed
17:00:01Araqq66: looks hard to do that for a static language, but since yours is dynamic, it should be very easy to implement
17:00:25q66Araq, yeah, untyped is all about tradeoffs, but it gives you some benefits as well
17:01:14AraqI never denied that; for a start you get generics for free
17:04:08q66Araq, i'd say, for a natively-compiled language for large apps, definitely typed; for scripting, prototyping, hacking around, embedding, untyped
17:05:22AraqI need static typing even more for scripting ...
17:05:37*q66 shrugs
17:05:39Araqor do you have test suites for your scripts?
17:06:02q66not many tests actually
17:06:10q66i rarely make errors a type system would detect these days
17:06:15q66in scripted code that is
17:06:29q66and i modularize a lot
17:06:36q66so that i can test each module separately and quickly
17:06:45gradhawhen I think of scripts I think of bash, not much static typing there
17:07:19q66"a type system would detect" .. though some type systems seem to be able of detecting everything :)
17:07:21q66think ATS
17:08:15q66in 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:49Araqthere you go, gradha
17:10:00gradhathere I go
17:10:22Araq'doc2' annotates the possible exceptions for you
17:10:23q66Araq, in fact i'm thinking of attempting a typed variant of my language sometime, something like Racket vs Typed Racket
17:10:51q66definitely inferred one, with hindley-milner or something
17:11:00Araqq66: no offense, but you have too much time ;-)
17:11:12*Vladar joined #nimrod
17:11:18q66i actually feel like i have too little time :<
17:11:22q66for all the stuff i'm doing
17:15:36Araqwelcome Vladar
17:15:52VladarHi
17:20:07gradhaAraq: funny getting EAssertionFailed in the generated docs, forces me to use -d:release
17:21:24gradhait is annoying that running nimrod doc2 also builds the html for the imported modules, then git complaints about untracked files
17:22:15gradhamaybe all generated html files should be put in the current working directory rather than where they were found?
17:22:42Araqhm maybe
17:23:38gradhaat least the html links don't work for those modules
17:23:48gradhasince they are somewhere there on the fs
17:24:20gradhais 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:47gradhato 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:52gradhasimilar to an assertion
17:25:05Araqwell of course
17:25:19Araq{.raises: [list-of-exceptions-here] .}
17:25:34Araquse that and the compiler will verify or complain
17:25:43Araqyou can also do:
17:25:50Araqproc p() =
17:25:54gradhaso the flow would be 1) write proc without .raises, 2) run nimrod doc2 3) annotate and review proc implementation
17:25:54Araq ... # code here
17:26:14Araq {.effects.} # tell the compiler to tell you about all inferred effects
17:27:01Araqbut your flow sounds good too
17:27:21Araq{.effects.} should be less annoying than doc2 though
17:27:33gradhamissing is step 4) come back after a year, let nimrod bark at you because something changed
17:28:58Araqbut the compiler always does step 4) ...
17:29:20Araqas soon as you have a 'raises' annotation it is checked for you
17:29:29Araqand 'raises: []' means that it raises no exception at all
17:29:29gradhabeat me to that
17:30:45gradhaare you meant to keep .effects. all the time in code? it doesn't shut up after add ing .raises. to the proc
17:31:23gradhaI guess it's temporary, since you say nimrod will check the raises list always
17:32:43Araqyeah it's for the work flow
17:33:40Araqthe effects system will be enhanced with user defined tagging but that's not implemented
17:33:51Araqonly exception tracking has been implemented for now
17:34:15gradhaare you stopping here or will the .effects. hint say which child proc raises the exception?
17:34:42Araqnot in the near future
17:34:57Araqbut it points you at the particular 'raise' statement, right?
17:35:11gradhayep, file and line
17:35:18Araqgood
17:35:31Araqcall graph is do-able but expensive
17:35:57gradhahow does exception tracking relate to that .tag. feature I remember reading in irc logs?
17:36:07gradhawhat/how is this tag meant to work?
17:36:15Araqboth are part of nimrod's effect system
17:36:25Araqand {.effects.} will list all effects
17:37:49Araqdunno what else to answer, .IO. is supposed to mark routines as performing some IO, for instance
17:38:08AraqIO will be a user-defined tag in system.nim, however
17:38:23gradhaok, so there is a mechanism to create user-defined tags
17:38:27Araqyes
17:40:07gradhaI have the feeling these tags are just macros, and {. .} evaluates them at compile time
17:40:41Araqthey have nothing to do with macros
17:41:21gradhaok, still haven't reached that part of the tutorial, got distracted by that guy ranting
17:41:47Araqalright, well I have to go, see you later
17:41:51gradhabye
19:08:53*exhu joined #nimrod
19:10:06exhugradha, Araq I have created an issue long time ago about doc2 to put generated docs into specified location -)
19:11:03exhu" 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:36exhucontinuing rant exchange -)
19:18:39gradhaadded comment to https://github.com/Araq/Nimrod/issues/190 then
19:19:46Araqexhu: already know it ;-) and disagree
19:20:19AraqI mean I disagree with Obie Fernandez, not with your feature request ...
19:21:22gradhanice, I don't know what DHH stands for in the tenth point
19:22:28reactormonkAraq, wtf, the scala type system really kicks your ass
19:23:09Araqnot really but I lost the link
19:23:28reactormonkI suppose you know how they handle null pointers :-)
19:23:43exhuI 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:18reactormonkexhu, hey :-(
19:25:35reactormonkexhu, overrinding features? welcome to OO ;-)
19:25:43Araqruby is too close to python, so I never learned it
19:26:02AraqI guess I'd prefer it over python now because it has a 'case' statement
19:26:26dom96hey Vladar. How's nimgame going?
19:26:37Araqbut there is no need ... nimrod fits my scripting needs much better ...
19:28:21exhunimrod is productive like python, i enjoy having that "when isMainModule: ... some test calls ..." thing.
19:28:22Vladardom96, I'll hope to release v0.3 pretty soon
19:28:47dom96Vladar: cool
19:37:10gradhaoh man, googling for dhh I reached http://www.zedshaw.com/, can't believe how user unfriendly that is
19:38:50reactormonkgradha, zedshaw is the ranter of the ruby community
19:39:14dom96zedshaw is awesome
19:40:37reactormonkand a dick
19:40:42gradhaseems to have a really narrow view of web users, basically his web is an insult to all disabled users
19:40:43dom96true
19:41:33reactormonkgradha, ... 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:07gradhaoh, the site is usable, in fact, the lynx version is MORE usable that the HTML5 version
19:42:19gradhawhat I mean is the disabled user goes to his site, and first thing he get's called troglodyte
19:44:28fowlAraq: i could do some l33t stuff if varargs[expr] worked with {.immediate.}
19:45:42Araqreactormonk: I'm not talking about scala's null checking but about its implicit type conversions which means wrong code compiles
19:45:56Araqbut I lost the link with examples for that unfortunately
19:45:56reactormonkAraq, wrong code compiles?
19:46:02Araqyeah
19:46:29reactormonkhuh?
19:47:08Araqwell technically it's not wrong
19:47:10Araqbut it leads to very suprising behaviour
19:48:43Araqbrb
19:52:32fowlAraq: i can still use callsite() to get what i need, but its not ideal
19:57:48Araqfowl: I think what you want will be supported as a sideeffect once I got to rewrite overloading handling
20:02:36Araqbut hrm varargs[expr] with immediate seems easy to support
20:02:53Araqwhat's your use case?
20:11:10AraqVladar: ported nimgame to 0.9.0 already?
20:13:44Vladaryes, around 2 month ago, actually
20:17:27fowlAraq: 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:29fowlhttps://gist.github.com/4013528
20:35:20gradhaAraq: 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:36Araqyeah, EAssertionFailed needs to be special-cased :-/
20:40:10Araqon the other hand maybe we should get rid of it and terminate the program instead
20:40:20Araqit's nice for unit-testing though ...
20:41:05gradhaI can still imagine procs using code or not depending on compiler switches which may require different {.raises.} definitions.
20:41:27gradhafor instance, a debug version might log to a file or network server, release not
20:41:45gradhathe debug version then might raise io/network exceptions the release version won't
20:41:46Araqso what, just add it to the raises in any case
20:42:19gradhadon't you get errors too if you specify too many exceptions?
20:42:52gradhaok, not Hint: 'EAssertionFailed' is declared but not used [XDeclaredButNotUsed]
20:44:09gradhaguess time will tell if this is annoying enough or not
20:50:20*shevy3 joined #nimrod
20:50:25shevy3hey
20:50:50fowlhey shevy
20:53:21shevy3always when I read a python tutorial and want to learn it, I decide that I'd rather want to learn nimrod
20:53:23shevy3:\
20:54:51shevy3python seems somewhat similar to ruby in some ways, so perhaps that's why, whereas nimrod looks rather exotic
20:56:21reactormonkshevy3, they are similar, but solve some problems in a different way
20:57:05reactormonkI 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:22shevy3hmm I never tried scala... I think one needs to have java, and I somehow dont like java much
21:01:40shevy3well, different mindsets, different ideas, one can learn, and use what is good
21:02:07shevy3the 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:35gradhaAraq: 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:58gradhaAlso, it seems that {.effects.} works at the line you put it, so if you raise an exception later, that's not displayed
21:03:11gradhaseems like a nightmare for procs with multiple return points
21:04:00gradhaor at least it is not clear where should I put the {.effects.}
21:04:40Araqwell that's supposed to be a *feature*
21:05:08Araqso you know where the exception comes from if you have complex control flow ...
21:07:38Araqyou should put it as a last statement
21:08:04Araqand it's not a nightmare for multiple return points at all as it's statically evaluated ...
21:09:30gradhaI 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:54Araq*shrug* that's fine too
21:10:22gradhaah, crap, that doesn't list what exceptions are missing
21:10:42Araqnot?
21:10:47Araqit doesn't?
21:10:56gradhano, just an error
21:11:22gradhahttp://pastebin.com/FURyPJAK
21:11:29Araqit should output: can raise an unlisted exception: xyz
21:12:00Araqoh lol
21:12:13Araquse the 'check' command to see the error
21:12:18Araq*the full error
21:12:23Araqfunny bug :-)
21:12:28gradhacheck?
21:12:34gradhawhat's that?
21:12:37Araq'nimrod check myfile.nim'
21:13:17gradhawow, didn't even know that existed
21:13:30gradhayes, that works
21:14:09gradhawhy is check a separate command? is compilation faster that way?
21:14:14Araqyes
21:14:25Araqskip the code generator
21:14:43gradhai'm all for breaking the speed of light, so I won't complain about it
21:15:56gradhaoooh, so idetools is what you were talking the other day about "same compiler support for vim"
21:16:13Araqyes
21:16:56Araqit still barely works, but it's getting better all the time
21:17:13Araqand I write the compiler now with this feature in mind
21:20:22Araqwb shevy3, I'm still waiting for your improved nimrod tutorial ;-)
21:20:23*Vladar quit (Quit: Leaving)
21:28:20gradhawhy 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:21Araqwell stuff like EOverflow and EDivByZero is not tracked (yet?)
21:29:38Araqand to answer your question: I don't know
21:30:25AraqI think I had some reasons for it
21:40:25*exhu quit (Quit: Ex-Chat)
21:52:48Araqgradha: 'effects' now lists its context
21:55:45gradhacompiling
21:57:53fowlhttps://gist.github.com/4013528 love using templates for dsls :>
22:00:06Araqfowl: you should write blog posts about it ...
22:00:46Araqand reddit them
22:03:01fowlmehhhh i dont either like either of those things
22:03:27shevy3blog entries are quite a lot of work
22:03:35shevy3but linking together such snippets would be great
22:03:52Araqok then add something cool to examples/
22:04:24shevy3ohhh... I could gain immortality there, if I manage to write a useful nimrod program one day :)
22:05:01Araqyeah but we already have useful programs here ;-)
22:05:24Araqwrite a useful tutorial instead
22:06:18gradhaAraq: i'm not seeing effects telling about the context
22:06:34gradhafrom the commits I have I also can't see how/where it was changed to do so
22:07:05Araqmy bad
22:07:23Araqbut I added push/pop-InfoContext around it
22:07:33Araqhas no effect because it's only a hint message I guess
22:09:05gradhaweird, the raised exceptions are hint themselves and they show up
22:10:07Araqit's not weird for me ;-)
22:10:30Araqwell I can make .effect. generate warnings instead to fix it
22:10:30Araqwhat do you think?
22:11:00gradhastill have no precise opinion on hints vs warnings
22:12:48gradhaat 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:07Araqtrue
22:13:12Araqgood point
22:13:20Araqwhy did you want this feature then? :P
22:13:39gradhamaybe 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:58gradhaalso, for documentation/inspection of foreign code
22:14:15gradhabut then, running doc2 might be the answer to that
22:17:48AraqI spent too much time on this feature already tbh ;-)
22:18:09gradhano problem, let it sink, I think its sweet
22:18:27Araqit's already better than anything I've seen and kicks java's checked exceptions
22:18:53gradhayep, I was going to ask if other language had this, then remembered the horror of java
22:19:39Araqjava got the default wrong
22:19:43gradhathe fact that I explicitly forgot about the feature in java speaks about its usability, I guess
22:20:11Araqjava assumes no exception if you don't write 'throws Exception' everywhere
22:20:26Araqbut that's way to verbose so nobody does that
22:20:40Araqand then it's incredibly bad if you need to adhere to some interface ...
22:20:56Araqyou can only catch all + log it somewhere then
22:21:12Araqso that's what java code is full of ...
22:21:48Araqit's a braindead design and anybody thinking about it for 10 minutes would have predicted it
22:22:47gradhaoh 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:14gradhait really makes you want to put everything inside a catch for the most generic exception
22:35:39Araq"This function may give unexpected or completely wrong results on Windows"
22:36:29dom96Sounds professional, I know :P
22:36:49dom96IMO we should simply deprecate it
22:37:01Araqnah
22:37:02dom96Unless it's worth keeping it for Linux-only people.
22:37:08Araqsomebody will come and fix it
22:37:10dom96or for the risk-takers
22:37:15dom96perhaps yeah
22:37:30dom96As far as I know Windows simply does not allow you to do that.
22:37:36dom96Anyway, good night
22:37:40Araqbye
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)