<< 10-01-2015 >>

00:00:06BlaXpirit_Araq, let me fix that readme, anyway
00:00:06AraqBlaXpirit_: so what? you can always embed the html directly
00:00:14Trixar_zaI won't even ask why you'd want that. Also nobody is stopping somebody from extending or improving RST. Just fyi.
00:01:43flaviuTrixar_za: My point is that the cost of extending the RST implementation is higher than just wrapping a markdown.
00:02:11Araqflaviu: for whom? for gradha and me it's easier to extend what we have
00:02:51flaviuAraq: https://github.com/gradha/midnight_dynamite
00:03:09flaviuLooks like someone decided that it's easier to wrap a library :)
00:03:56Araqer no?
00:04:17*bjz joined #nim
00:04:21Araqgradha is not here arguing for throwing away what we have
00:04:37*z1y quit (Remote host closed the connection)
00:04:47flaviuI wasn't trying to put words into his mouth, sorry if it sounds that way
00:05:14flaviuBut it's clear that he wants to use markdown for some project
00:05:19*z1y joined #nim
00:05:49Araqmaybe he thinks fewer people will complain then.
00:05:56Araqand he would be right
00:09:42*Matthias247 quit (Read error: Connection reset by peer)
00:11:33BlaXpirit_Araq, so please tell me what here is ugly https://gist.github.com/BlaXpirit/b58add2f410dfb92dd48
00:12:03BlaXpirit_or could be "read as normal text" better if written in rst
00:12:15BlaXpirit_(see "raw" of course)
00:12:48*Sergio965 quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
00:13:02Araq[Freenode][]
00:13:19BlaXpirit_give the same thing in rst then
00:13:35BlaXpirit_`Freenode <irc://irc.freenode.net/nim>`__ ?
00:13:52Araq... should work:
00:13:54Araq $ git clone git://github.com/Araq/Nim.git
00:13:55Araq $ cd Nim
00:14:04BlaXpirit_what?
00:14:13Araq--> it's not obvious why colon followed by $ produces this kind of block
00:14:26BlaXpirit_it's just indentation
00:14:39BlaXpirit_neither colon not $ cause it
00:14:41BlaXpirit_nor
00:15:00Araqok ...
00:15:10flaviumget requires that the key be stringifyable: https://github.com/Araq/Nim/blob/master/lib/pure/collections/tables.nim#L681
00:15:22flaviuThat seems like a needless restriction.
00:15:56Araqflaviu: patch it with 'compiles'
00:16:14BlaXpirit_Araq, now give me your prettiest rst document
00:16:33flaviuI'd prefer to add a `key` field for KeyError.
00:17:21Araqflaviu: no idea how that can work
00:17:44AraqBlaXpirit_: manual.txt
00:18:05Araqand the files it includes of course
00:18:17Trixar_zaBlaXpirit_: Use Markdown if it works for you, but please stop trying to convert others over to it by being truculent.
00:18:30BlaXpirit_Why would I convert anyone
00:18:42BlaXpirit_RST is enforced by documentation tools
00:18:46flaviuBlaXpirit_: My version is better: https://gist.github.com/flaviut/6b7abb6bce467cc79fa5 :P
00:19:17BlaXpirit_flaviu, why dont i see any difference
00:19:22AraqBlaXpirit_: also I think the number of concepts/special syntaxes in RST is way less than what markdown uses
00:19:30BlaXpirit_who cares
00:19:34BlaXpirit_justt allow both already
00:19:49flaviuBlaXpirit_: I like the link targets to be at the bottom of the section, not the bottom of the document.
00:19:59BlaXpirit_oh ok, flaviu
00:20:41BlaXpirit_that is indeed better
00:20:45Trixar_zaBlaXpirit_: pandoc.
00:20:51BlaXpirit_Trixar_za, haha.
00:21:02BlaXpirit_i tried to convert a document once
00:21:11BlaXpirit_not a single line converted correctly after i tried it in forum
00:21:13BlaXpirit_xD
00:21:22*brson quit (Quit: leaving)
00:22:02Trixar_zaThey never do. My disdain comes with Markdown comes from trying to convert MediaWiki pages over to Markdown documentation... Never again :|
00:22:13TriplefoxIf only we could just standardize on wordperfect 5.1
00:22:16Trixar_za- first comes*
00:22:29BlaXpirit_Trixar_za, try that with rst too -___-
00:22:58BlaXpirit_Araq, not much to say about manual. `` becomes ` .. code-block:: nim is simply removed but code is indented with 2 more spaces
00:23:49BlaXpirit_but of course, if you want to specify a language, then extensions would be needed, not gonna lie
00:24:59Araqthe tables would be full of | too :P
00:25:18Araqbut maybe markdown has more hidden ways to write these
00:25:21BlaXpirit_wow big deal, add some | in between columns
00:25:31BlaXpirit_markdown doesn't even have a way to make a table, FYI
00:25:57BlaXpirit_the numerous languages that extend upon it, however...
00:26:40Araqso. to summarize: we should call our RST a dialect of markdown with some non-standard features and you'll be happy
00:26:55BlaXpirit_umm no
00:27:02*bjz quit (Ping timeout: 244 seconds)
00:28:18flaviuI'd be happy with that, make sure it implements everything in http://daringfireball.net/projects/markdown/syntax though.
00:28:25BlaXpirit_yeah
00:28:39flaviuAlso add fenced code blocks, they're incredibly useful.
00:29:42Trixar_zaI'm having the weirdest flashback of when I added MediaWiki syntax on top of LionWiki
00:29:53BlaXpirit_in documentation i definitely wouldn't use fenced code blocks though
00:30:00BlaXpirit_and what else would they be for?
00:30:28flaviuBlaXpirit_: When I'm writing out a message, I can't be bothered to open vim and indent my code.
00:30:37BlaXpirit_oh u mean forum
00:30:39BlaXpirit_sure
00:31:13*xant2 joined #nim
00:33:52BlaXpirit_come to think of it, i dont absolutely have to use rst in my documentation
00:34:02*xant2 is now known as x4nt
00:34:13BlaXpirit_well it's not so bad anyway, the main difference so far has been `` vs `
00:34:15BlaXpirit_...
00:34:47BlaXpirit_but yeah, doing some pandoc magic may be acceptable
00:34:52flaviuIs there a way to get a handle to the caught exception?
00:35:20flaviugetCurrentException() and cast might work
00:36:39*gmpreussner_ quit (Ping timeout: 244 seconds)
00:36:40*gmpreussner__ joined #nim
00:37:00Trixar_zaBtw how hard is it to learn Clojure? I have to learn it for a job opportunity.
00:37:13Trixar_zaI know it uses a LISP variation
00:37:50BlaXpirit_it's not that likely someone present knows it
00:38:26x4nthttp://learnxinyminutes.com/docs/clojure/
00:40:29*adam_s quit (Ping timeout: 264 seconds)
00:40:36x4ntidk, doesn't look like too bad of a functional language
00:41:57BlaXpirit_http://4clojure.com/ is so good tho
00:41:57Trixar_zaBy looking at this example, it seems surprisingly easy to learn
00:42:07*Demon_Fox quit (Quit: Leaving)
00:43:01*brson joined #nim
00:43:36*adam_s joined #nim
00:46:07Kal_It was my first Lisp and I didn't have too much trouble
00:49:07*z1y quit (Ping timeout: 256 seconds)
00:49:08*irrequietus quit ()
00:52:19*tinAndi quit (Quit: ChatZilla 0.9.91.1 [Firefox 34.0/20141125180439])
00:56:49*bjz joined #nim
00:58:45*BitPuffin quit (Ping timeout: 256 seconds)
01:06:53*ajhager quit (Ping timeout: 240 seconds)
01:09:13*BlaXpirit_ quit (Quit: Quit Konversation)
01:09:24*SplinterOfChaos quit (Ping timeout: 245 seconds)
01:22:59*ajhager joined #nim
01:24:30*brson quit (Quit: leaving)
01:26:12*uyppp quit (Remote host closed the connection)
01:31:15*willwillson quit (Remote host closed the connection)
01:45:32*bjz quit (Ping timeout: 265 seconds)
01:52:05*leavengood quit (Ping timeout: 244 seconds)
01:56:39*JinShil joined #nim
02:03:49*leavengood joined #nim
02:04:35*leavengood is now known as Guest64245
02:06:13*Epic|gmpreussner joined #nim
02:06:57*gmpreussner__ quit (Ping timeout: 245 seconds)
02:10:57*Demos joined #nim
02:11:10*Trustable quit (Quit: Leaving)
02:18:08*keyle joined #nim
02:19:52keylehi
02:21:58*VinceAddons quit (Read error: Connection reset by peer)
02:37:46*keyle quit (Quit: leaving)
02:41:22*jefus quit (Ping timeout: 244 seconds)
02:42:14*jefus joined #nim
02:42:46*keyle joined #nim
03:01:38def-hi keyle
03:01:57keylehey def-
03:02:31keylei tried using your irc lib to build a small irc client but no luck
03:03:23keylereadline is blocking.
03:04:27def-I'm not the author of the irc lib, but i can take a look. do you have the source anywhere?
03:05:27keyleoh
03:05:48keylesearch for keyle here and have a quick read http://irclogs.nim-lang.org/09-01-2015.html
03:05:59keylesource here https://gist.github.com/keyle/46337a707c23492c7e11
03:06:04keylethx :>
03:06:21def-ah, an async irc client
03:07:04keylemy goal was a tiny irssi style irc client yep
03:07:50keylebut an await readline blocks everything afaik, and I've been using nim for 5 days so :)...
03:09:52EXetoCcan it not block?
03:10:13def-looks like something is broken indeed
03:10:14*kapil__ joined #nim
03:10:42keylesomeone hinted of polling the keyboard keys but noted that it won't work on windows, so that won't do it for me
03:10:49def-the test clients of the irc lib don't work either, do they?
03:11:02keyleyep it works
03:11:12def-ah wait. so everything works and you just want to get a key press?
03:11:17keyleI can get the test bot in a channel and send command to it and it responds
03:11:18def-I'd use the termbox library
03:11:25keyleyep
03:11:33EXetoCnot for windows
03:11:38keyleok never heard of that one
03:11:53def-oh =/
03:12:22def-i guess ncurses or pdcurses would work?
03:12:35keyleah yep anything else than linux {.error: "This platform has not been accounted for in the termbox wrapper.".}
03:13:05EXetoCtermbox itself supports it?
03:14:36keyleI have no knowledge on how to write a wrapper or using that c2nim tool
03:15:10*Kal_ quit (Ping timeout: 246 seconds)
03:15:49keyleI'd probably should learn c2nim with something much simpler than a TUI lib :D
03:16:24def-If you can get termbox compiled on Windows (no idea if it works on Windows), it should be easy to adapt the wrapper to work
03:16:51EXetoCthe lib is very simple
03:17:49flaviukeyle: consider you could have started with the windows api ;)
03:17:57keylethe go version made its own winapi impl https://github.com/nsf/termbox-go
03:18:42keyleflaviu, I am a noob in system programming.
03:18:58keyleI had C class 14 years ago :)
03:19:27keylewhich is why I'm interested in nim
03:21:00flaviukeyle: You should try writing a personal project in C. I recently did so and found it really rewarding.
03:21:36keyleyep I should.
03:23:15keyledef-, sorry I had you confused with dom96 I think
03:28:23flaviukeyle: dom96's timezone is around UTC, fyi
03:28:48keylethat's UK-ish?
03:29:15flaviuyep
03:31:48*darkf joined #nim
03:32:17keyleI am no expert but seeing that termbox uses /dev/tty... I don't see it working for me :)
03:33:48def-hm, yeah
03:33:53def-looks *nix only
03:34:04def-curses or winapi then
03:34:15def-I don't know how to this in either, in termbox it would've been easy
03:36:10keyletechnically with async I can launch two loops with timers on each and get the results shuffled right?
03:38:05EXetoCthou shalt not use curses for it was conjured by the devil
03:38:40keylebtw the readme link is broken http://nim-lang.org/lib.html#nimble
03:39:30flaviukeyle: https://github.com/nim-lang/nimble#readme
03:39:46keyleyeah I figured as much :>
03:49:00*jsudlow quit (Remote host closed the connection)
03:55:12*BitPuffin joined #nim
03:59:42*BitPuffin quit (Ping timeout: 244 seconds)
04:01:44flaviuI've sent a PR to fix that and some other stuff.
04:01:47flaviunight.
04:02:21*ajhager quit (Ping timeout: 256 seconds)
04:02:44keylenight
04:09:16*ajhager joined #nim
04:20:07*adam_s quit (Quit: Leaving)
04:23:35*EXetoC quit (Ping timeout: 265 seconds)
04:26:29*Guest64245 quit (Ping timeout: 245 seconds)
04:31:16*Demon_Fox joined #nim
04:55:40*ldlework quit (Ping timeout: 250 seconds)
04:56:47*ldlework joined #nim
05:05:20*brson joined #nim
05:08:22*Demon_Fox quit (Quit: Leaving)
05:16:25*AMorpork is now known as ZzZMorpork
05:33:50*bjz joined #nim
05:33:56*z1y joined #nim
05:45:39*bjz quit (Ping timeout: 245 seconds)
05:46:25*bjz joined #nim
06:41:07*superfunc joined #nim
06:57:26*bjz quit (Max SendQ exceeded)
06:58:41*bjz joined #nim
07:02:13*Demon_Fox joined #nim
07:03:15*ARCADIVS joined #nim
07:08:13*ldlework quit (Ping timeout: 256 seconds)
07:12:59*ldlework joined #nim
07:26:51*gour joined #nim
07:35:31*Epic|gmpreussner is now known as gmpreussner
07:56:20*JinShil quit (Quit: Konversation terminated!)
08:06:32*bjz quit (Max SendQ exceeded)
08:07:27*bjz joined #nim
08:24:52*minciue joined #nim
08:32:48Varriountgmpreussner: ping
08:38:36*Lingo__ joined #nim
08:38:44*Lingo__ is now known as HakanD
08:39:20HakanDhey
08:39:34HakanDthere are a few spam posts on the forum front page
08:41:41keyledo you know where I can find an example of async with poll ?
08:54:24*z1y quit (Ping timeout: 244 seconds)
09:01:40Varriountkeyle: Hm?
09:02:23keylesomething similar to this https://github.com/Araq/Nim/blob/a8771b30518c307aa537b122d07bc41426eccb24/tests/async/tasyncawait.nim
09:02:47Varriountkeyle: That uses the old async code.
09:03:04keylehm github search threw me on an old branch
09:03:12Varriountkeyle: Do you know what `poll` is?
09:03:33keylenot really but it's not like it's documented
09:04:26keyleit's ok I'm just mocking around learning the language
09:04:35keyleI wished it were better documented tho
09:04:41Varriountkeyle: I mean, do you know what 'polling a socket' does?
09:04:56keyleyes
09:05:17keyledidn't know that poll was socket polling
09:05:21keylethanks for that
09:05:55Varriountkeyle: Well you can also poll file handles.
09:06:03Varriountkeyle: And stdin is a file handle
09:06:23*brson quit (Quit: leaving)
09:06:38keyleeven on windows?
09:07:16Varriountkeyle: The poll in asyncdispatch is bit different, as it's meant for polling all open sockets and file handles other things are currently waiting on.
09:07:42Varriountkeyle: I can't remember. I think there are some limitations with polling stdin on windows.
09:08:38keyleok
09:09:02keyleI do love how easy it is to hack around
09:09:07keyletemplate `loop`(act:stmt): stmt {.immediate.} = while true: act
09:09:46keylehere is a question, imagine a DSL loaded from a file
09:09:56keyleis there an eval proc somewhere?
09:10:09keyleas in "evaluate this string as code"
09:10:38Varriountkeyle: Yes, but it's compile time only.
09:10:58keyle:/
09:11:09Varriountkeyle: Although, you are ussually better off just using macros, templates, and source filters.
09:11:24keyleso no such thing as creating a bunch of templates, loading up a file and executing it as "my own DSL" ?
09:11:38Varriountkeyle: Not at runtime.
09:11:47Varriountkeyle: Not unless you want to write an interpreter.
09:12:38keyleso if I made my own silly compiler.exe, I can't load a file and execute is as a DSL source?
09:12:49keylewould that qualify as interpreted?
09:13:27keyleI guess simpler question, imagine this: template print(a: expr):expr {.immediate.} = echo a
09:14:03keylevar s = """ print "bla" """
09:14:21*ajhager quit (Ping timeout: 244 seconds)
09:14:22keylehow to 'execute' var s's content?
09:16:24Varriountkeyle: Look in the macros module, at parseStmt
09:17:29keyleah, thank you sir :)
09:19:54*BlaXpirit joined #nim
09:21:25*z1y joined #nim
09:21:43*z1y quit (Client Quit)
09:36:28keylethis doesn't compile, shouldn't it ? var t = parseStmt("echo 5")
09:37:21Varriountkeyle: What error are you getting? Are you using parseStmt in a macro?
09:37:41keyle[Linking]
09:37:43keyleError: execution of an external program failed
09:37:50keyleno, clearly I'm doing something silly
09:38:35Varriountkeyle: What exactly do you have in mind for this? It's much easier to just construct macros and templates to make the DSL you want.
09:38:51*nande quit (Remote host closed the connection)
09:38:57keylethat's my goal indeed
09:39:25keyleright now I'd like to execute "echo 5" from string to AST to running code
09:39:53*z1y joined #nim
09:44:13Varriounthttps://gist.github.com/Varriount/188eb68c84b63306850b
09:44:17Varriountkeyle: ^
09:44:36keyleha
09:44:40keylethank you Varriount :)
09:47:40*Sergio965 joined #nim
09:57:27keylewow this is powerful
09:57:44keyleand arguably dangerous
09:58:03BlaXpiritnah
09:58:09BlaXpiritit's only compile time anyway
09:58:11BlaXpiriti think
09:58:36BlaXpiritand this is exec, not eval :|
09:59:54*Sergio965 quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
10:01:32Varriountkeyle: Oh, try the 'emit' procedure
10:01:56Varriountmacros.emit : accepts a single string argument and treats it as nim code that should be inserted verbatim in the program
10:02:19keyleresult = emit($s) ?
10:02:46VarriountNo, just replace the entire procedure I wrote.
10:02:59Varriountemit("echo 5")
10:04:03keylehehe ok but that needs a const string
10:04:21keyleso like BlaXpirit it's compile time only
10:05:10VarriountAraq: Since, for the fix for #1832 , I'm modify incrSeq, should I rename incrSeq to something more... descriptive?
10:05:35Varriountkeyle: Keep in mind that Nim is primarily a statically compiled language.
10:05:56VarriountRuntime evaluation is possible, but difficult.
10:06:04keyleyep good point
10:07:04*z1y1 joined #nim
10:07:15*z1y quit (Ping timeout: 244 seconds)
10:12:23keyleso there is no jitting in nim
10:18:06*vendethiel joined #nim
10:18:19keyleso I'd have to write an interpreter
10:18:50*Demon_Fox quit (Quit: Leaving)
10:18:56gokr1There is AFAIK some kind of VM that runs the compile time Nim - but no idea on its state.
10:19:37gokr1I also know Araq wants to use tcc to do "dynamic" compilation by simply calling it to compile stuff and reload libraries.
10:21:47novistis there a way to make nim dump AST of some piece of code?
10:22:42def-novist: http://nim-lang.org/macros.html#dumpTree.m,stmt
10:23:50keylethanks guys
10:24:29keyleI'm always torturing compilers
10:24:35novisterr but how do i use it? like if i want to see AST of proc contents?
10:25:23keylenovist: https://github.com/Araq/Nim/blob/188df67677912189438226b96e765ee034b2ff9f/tests/macros/tdumptree.nim ?
10:25:43novistohhhhh thats neat, didnt know it can be used like that too. thanks!
10:25:57keyleme neither... :D
10:26:28keylewhat I love about nim is that I get a damn .exe out of it
10:26:53keyleno runtime shipping, vm, dlls...
10:27:03keyleyet it feels like python
10:27:40novisttotally. all we need is good IDE support now ^_^
10:27:58VarriountWell, onionhammer and I have sublime text covered.
10:28:02keyleyes, I'm with you on that one. I'm an intellij sucker.
10:28:09novistso am i \o/
10:28:16*Matthias247 joined #nim
10:28:21keylesublime is good, but no refactoring
10:28:25VarriountHi Matthias247
10:28:33novisti actually started putting together intellij plugin but stopped due to lexer/parser stuff
10:28:33Matthias247hi
10:28:37keyleno updating imports on refactors
10:28:43keyleand no navigate to definition working
10:28:55Varriountnovist: You could probably just copy the compiler's parser code. It's not that complicated
10:29:06keylenovist: I looked at it too and decided that my life wasn't long enough
10:29:14novistwell.. it would require translating it to java too
10:29:24novistthen different compilers would need explicit support
10:29:41keyleIntelliJ plugin dev is like wearing nipple clamps thrown in a blender
10:29:51novisti silently hope that compiler could do lexing/parsing in the future
10:29:55Varriountnovist: What? Don't just looooove Java? >:D
10:29:56novistkeyle nah..
10:30:07novistVarriount i prefer c# :p
10:30:09Varriountnovist: Um, but what would the compiler output?
10:30:11keylenovist: well then you get my vote to do it!
10:30:40keyleVarriount: is the go to definition meant to work in sublime?
10:30:43novistVarriount i hoped compiler could provide something like loose RCP interface to implement lexing/parsing interfaces
10:30:43Varriountnovist: Things like line numbers and comments get thrown away after parsing..
10:30:59novistactually lexer can be done in java
10:31:05novistbut parsing would be hard
10:31:15Varriountkeyle: Not really. Not until the IDETools part of the compiler is functional.
10:31:19keyleintellij lexer has its own definition thing, that's the easy part
10:31:46Varriountkeyle, novist: You have no right to complain unless you plan on doing something about it.
10:31:57Varriount:/
10:32:05novistits not complaining :p
10:32:19novistif there were right tools i would be on writing some kind of plugin already
10:32:32novistor maybe if i had more experience to fill in gaps myself
10:33:03novisthell actually.. maybe compiler would have to just provide AST dump
10:33:22novistand maybe some support for "broken" code ast dumping like that idetools dirty flag thing
10:34:25*superfunc quit (Ping timeout: 246 seconds)
10:35:42*z1y1 quit (Ping timeout: 264 seconds)
10:40:14keyleyeah no I'd write the intellij plugin if I had the skills, I promise
10:40:25keylevery happy with aporia and sublime
10:41:10keyleI tried Julia 6 months ago, if I remember correctly the tooling was awful
10:41:21keyleDart is also awful
10:41:29keyleso is the language and the damn lib system
10:42:08keyleso didn't meant to come off as a complaint, I was just talking in the realms of an awesome future, intellij would be my IDE of choice
10:42:27keylebbl
10:43:17*skyfex_ quit (Quit: (null))
10:45:26Varriountkeyle: It's just, I wish there were more people contributing to Nim. Even helping with fixing/extending the standard library would be nice.
10:50:55*gsingh93 quit (Quit: Connection closed for inactivity)
10:52:26*BitPuffin joined #nim
10:52:53keyleVarriount: I plan to. I still got my Learner plate on :)
10:53:26keylelike this one, I think I could fix it but I don't know enough yet
10:53:27keylehttps://github.com/Araq/Nim/issues/1906
10:53:55Varriountkeyle: I was actually looking at that one earlier.
10:53:55novistentry bar is pretty high though
10:54:15keyleI plan on writing a small static html generator, so that I can convert gists into a nim cookbook website
10:54:36keylelike novist says, the entry bar is pretty high
10:54:39Varriountkeyle: That issue shouldn't be too difficult. I wouldn't resort to using osExecShell and cls though
10:55:00keyleheh I welcome a better solution
10:55:18Varriountkeyle: I'd look at this -> http://msdn.microsoft.com/en-us/library/windows/desktop/ms682022%28v=vs.85%29.aspx
10:55:25novistthough Varriount im pretty sure people would contribute in other ways. say if i figured out that parser thing for intellij i bet keyle would contribute something to intellij plugin too
10:55:44VarriountAnd see what differences there are between the Nim version and the C version
10:56:08*VinceAddons joined #nim
10:56:10keyleVarriount: great find
10:56:46keyleI know nothing of windows.h and low system dev
10:57:01*BitPuffin quit (Ping timeout: 265 seconds)
10:57:03keyleI spend my days in java hell
10:57:08Varriountkeyle: Ouch.
10:57:11novisteither of you know if i can dump debug info of some variable? like type, value..?
10:57:23keylemaven is my girlfriend
10:57:32*z1y joined #nim
10:57:53keylenovist: like a php vardump? or typeof? nope :/
10:58:17Varriountnovist: you can use typetraits.name to get the type name
10:58:27novistat least thats good, thanks
10:58:35Varriountrepr() works to dump most of an objects information
11:03:16keyleis nimfix like gofmt ?
11:03:28keyledoes it reformat code to standards?
11:03:54*ldlework quit (Ping timeout: 264 seconds)
11:06:35*arekzb joined #nim
11:08:12dv-i don't think that's possible
11:12:48*ldlework joined #nim
11:17:05*gour_ joined #nim
11:17:37Varriountkeyle: Sorta?
11:18:54keyleso proc bla(x:string):string= becomes proc bla (x: string): string =
11:20:42*gour quit (Ping timeout: 265 seconds)
11:26:15*gour_ is now known as gour
11:27:17Varriountkeyle: I really haven't used nimfix, so I don't know.
11:28:53*JinShil joined #nim
11:32:28*vendethiel quit (Ping timeout: 264 seconds)
11:33:02novistcould someone enlighten me why my macro is not modifying ast? http://paste.linuxmint.com/view/xyyv
11:36:03*z1y quit (Remote host closed the connection)
11:36:25*z1y joined #nim
11:36:58*vendethiel joined #nim
11:47:00*SplinterOfChaos joined #nim
12:01:29flaviunovist: `return result` is redundant
12:01:56flaviubut the reason that dumpTree output doesn't is because it dumps the AST right after parsing
12:02:05flaviuit doesn't expand any possible macro invocations.
12:03:32flaviuAlso, if I understand what you're trying to do, you don't really need a macro: https://gist.github.com/flaviut/1ae1d7deac4c57d0a84c
12:04:41*z1y quit (Ping timeout: 265 seconds)
12:05:53*skyfex_ joined #nim
12:08:02*repax joined #nim
12:11:28BlaXpirit.eval var a; echo((a = 5) == 5)
12:11:32MimbusBlaXpirit: eval.nim(4, 4) Error: ':' or '=' expected, but found 'echo'
12:11:35novistthanks flaviu
12:20:27*repax quit (Remote host closed the connection)
12:24:37*Lingo___ joined #nim
12:24:53novist.eval echo($42u)
12:24:54VarriountHello Lingo___
12:24:57Mimbusnovist: 42
12:27:06BlaXpirithow to... inherit constructors?
12:27:55flaviuresult = initFoo(...); ...
12:28:18*HakanD quit (Ping timeout: 264 seconds)
12:28:59BlaXpiritoh yeah...
12:29:05BlaXpiritthx
12:34:12*HakanD joined #nim
12:34:12*Lingo___ quit (Read error: Connection reset by peer)
12:35:34flaviuhttps://gist.github.com/flaviut/e2ddb62c38cb224e5148
12:35:47flaviu"cannot prove ... is not nil"
12:36:02flaviubut if it is nil, than exception will be thrown
12:36:54flaviuAnd inside the if, it can be shown that there are no accesses to potentially nil addresses
12:37:13flaviu*then
12:38:54*alexruf joined #nim
12:39:52*bjz quit (Ping timeout: 245 seconds)
12:41:15*bjz joined #nim
12:47:37*jefus_ joined #nim
12:50:08*z1y joined #nim
12:51:25*jefus quit (Ping timeout: 264 seconds)
12:53:39flaviumaybe `not nil` should be marked as experimental?
12:59:33alexrufIf someone also uses Dash (http://kapeli.com/dash), please write them an mail and request a docset for Dash. Since I did the first vote for a Nim docset, the will only start to generate on when more people request it.
13:02:45VarriountAraq: Does the GC use a sequences length field for anything in particular?
13:04:23*skyfex_ quit (Quit: (null))
13:07:57ekarlso-is there any docs site a'la doc.rust-lang.org yet ?
13:08:39flaviuhttp://nim-lang.org/lib.html
13:09:11*z1y1 joined #nim
13:09:17Varriountekarlso-: Um.. is it not somewhat prominant on the website?
13:09:44VarriountI mean, there's a tab that says 'docs'...
13:10:55ekarlso-ah-,,-
13:11:49flaviuHow does UFCS interact with generics?
13:12:25flaviuIt seems that foo.bar[Type](...) is treated as bar[Type](bar)
13:12:25*z1y quit (Ping timeout: 264 seconds)
13:12:37flaviuerr, bar[Type](foo)
13:12:46flaviuwithout any `...`
13:12:50Varriountflaviu: There are one or two quirks.
13:13:37*z1y1 quit (Ping timeout: 245 seconds)
13:13:47*z1y joined #nim
13:14:21Varriountflaviu: Mainly because the compiler doesn't know if the subscript operator is acting on a generic, or a type that supports `[]`
13:16:56*alexruf quit (Quit: My Mac has gone to sleep. ZZZzzz…)
13:23:32novistis there maybe a way to dump ast of nim file now?
13:29:37keyle.eval echo "hello world"
13:29:40Mimbuskeyle: hello world
13:29:53keyleneat.
13:30:48flaviuDoes the stdlib expose an unchecked array type anywhere?
13:31:58*Trustable joined #nim
13:38:39flaviurtarrays, but that says not to use it.
13:41:34*kapil__ quit (Quit: Connection closed for inactivity)
13:42:09flaviudom96: http://forum.nimrod-lang.org/ doesn't redirect properly.
13:47:48Varriountnovist: You can use the dumpTree macro
13:48:19Varriountnovist: There might be a hidden compiler command, but I can't remember (hidden because it isn't official)
13:48:21flaviuI wonder how it'd be possible to implement sum types.
13:48:38Varriountflaviu: ?
13:48:54flaviulike tuple[foo: string, bar: int]
13:49:06flaviubut instead of having both types, just have one type
13:49:13novistVarriount but can i use dumpTree without re-writing entire file to new file where everything is under the macro?
13:49:19Varriountflaviu: You mean, object variants?
13:49:33flaviuVarriount: Yes, but inline
13:49:46flaviuI don't want to type 'case' once.
13:49:52Varriountflaviu: Macro then?
13:50:02Varriountflaviu: There's also the union pragma
13:50:17flaviuyep, but I need to find the macro invocation rules for types.
13:51:17AraqVarriount: er yes? to determine the length.
13:52:57*BitPuffin joined #nim
13:53:48VarriountAraq: I ask, because for some reason, separating the inc(seq.len) from incrSeq, I get GC errors
13:53:48flaviuAraq: Can you look at what I posted around 12:35:34?
13:55:08*EXetoC joined #nim
13:57:06keyledoes anyone know how I can get the stuffed piped in the program?
13:57:07Araqflaviu: you seem to complain that the analysis is not smarter than what an Option[T] would have given you
13:57:17keyleI know about parseOpt2
13:57:33keylee.g. echo "bla" > mynimapp
13:57:37novistAraq (lets bombard you with questions!) was there unofficial compiler param to dump AST of nim file?
13:57:54*BitPuffin quit (Ping timeout: 264 seconds)
13:58:00flaviukeyle: stdin
13:58:17keyleflaviu: care to share an example?
13:58:30keylelet ins = system.readAll(stdin)
13:58:34keylethat didn't pan well :P
13:59:29flaviukeyle: works fine for me.
13:59:40Araqnovist: hrm no.
13:59:41flaviuThe `echo "bla" > mynimapp` syntax looks wrong though
13:59:52flaviutry `echo "bla" | mynimapp`
14:00:04Araqkeyle: stdin.readAll doesn't work on some OSes iirc
14:00:21Araqgokr1 has a fix but never made a PR
14:00:43keyleI'm one windows
14:00:46keyleon*
14:01:47keyleecho system.readAll(stdin)
14:01:55keyledir > pipe.exe
14:01:58keylenothing
14:02:34keylemaybe I'm not piping right on windows, afaik dir > bla.txt works
14:02:48keyleyeah that works
14:03:13flaviukeyle: sorry, I can't help. I know nothing about how windows works.
14:03:47keyleit's ok don't feel bad, Microsoft doesn't either
14:04:54Araqkeyle: try this: while not eof(stdin): let x = stdlin.readLine
14:06:46keylewhere is eof from?
14:07:04Araqmaybe it's endOfFile instead, it's in system
14:07:27keylek
14:08:01keylewhile not endoffile(stdin): let x = stdin.readLine
14:08:10keylethis compiles but again, nothing at runtime
14:08:26Araqwell try to feed it some input manually
14:09:24keylethis compiles but again, nothing at runtime
14:09:28keyleoops
14:10:23keyleso if I type input manually it does echo back
14:10:32keylebut piping into it not so much
14:10:46Araqwell > is an output pipe
14:11:00Araqtry < but I never used that on windows either
14:13:23keylehttp://pastebin.com/raw.php?i=RP7RdSAW
14:14:06keyleAre you guys linux / mac ?
14:14:28def-keyle: you overwrote the pipe.exe
14:14:45keyleumf did I
14:15:03keyleyes I did
14:15:09keylerofl, mea culpa
14:16:33keyleso every time I compiled, I tried command > pipe.exe first, and then command | pipe.exe
14:16:41keyleeverytime overwriting the binary
14:16:50keyleSo sorry :)
14:16:53def-Haha
14:17:06keyleecho readAll(stdin) # works fine on windows btw!
14:17:31*HakanD quit (Quit: Be back later ...)
14:18:29keylethanks for the help anywya
14:19:13*BitPuffin joined #nim
14:20:50flaviukeyle: 20% linux, 25% mac, 30% windows
14:21:31keylesounds healthy
14:21:39Araq25% Plan 9?
14:21:44flaviulol
14:22:01keyleI did run openbsd for a few years
14:22:06flaviuthese are the stats from google analytics, so I didn't include mobiles and minority OSes.
14:22:36keylethey're all the tor users :>
14:22:47flaviuAraq: 0.08% FreeBSD :P
14:24:34*BitPuffin quit (Ping timeout: 255 seconds)
14:29:10*ZzZMorpork is now known as AMorpork
14:29:29gourkeyle: how did you like openbsd? i tried it the other day on my netbook (with gnome) but it seems to still require some manual fiddling..however i plan to put opensmtpd on th server to replace postfix
14:29:59keyleI liked it above all else
14:30:09gourwhat do you use atm?
14:30:25keylebunch of linodes with debian
14:30:34gourahh, ok
14:31:01gourso, it was not on the desktop?
14:31:22keyleopenbsd as a desktop... it's kind of like taking your bride in a jeep
14:31:34gourhe he
14:32:01gouri read somewhere that openbsd devs use OS on their machines unlike freebsd ones :-'
14:32:08gour:-)
14:32:24keyleit's a neat system
14:32:41gourdoes nim work there?
14:32:42keylethey kind of lost my respect a bit with their arrogance in the heartbleed mess though
14:33:18keyleif I'd pick one it'd probably be archlinux
14:33:32keyleI merely used it but I liked it
14:33:54gouri'm on suse now, after debian...liked it very much, especially zypper
14:34:16gour*like
14:35:05keyleI think I tried suse in the late 90ies, at the time I was using slackware tho
14:35:16keylesuse was `massive`
14:35:48gourit's very polished today, imho...i did start with linux/suse in '99
14:42:40*jefus__ joined #nim
14:44:44*saml_ joined #nim
14:46:23*jefus_ quit (Ping timeout: 240 seconds)
14:46:29flaviuhttps://gist.github.com/flaviut/d5d31442bb70443faee9
14:50:29*dyu quit (Quit: Leaving)
14:51:51flaviunothing I do seems to fix it.
14:52:10Araqtemplate params shouldn't be in ` `
14:53:16flaviuIt give an internal error
14:53:26flaviuif I make it a macro, it still gives an internal error.
14:53:49flaviuI removed the ``, but I doesn't seem to fix it.
14:54:01gokr1Hey guys
14:56:08gokr1keyle: Want my fix?
14:56:23keylegokr1: which?
14:56:26Araqgokr1: I want it. is that enough?
14:56:40gokr1Hehe, well, its not a "fix" - more of a workaround.
14:56:47gokr11 sec
14:57:28gokr1http://pastebin.com/H507u65Y
14:57:51gokr1I just defined my own readAll which doesn't do that stuff at the beginning. I guess a proper fix could use a when: check
14:58:18gokr1Araq: Btw, QtCreator seems very capable
14:59:13gokr1The NimKate highlighting works in QtCreator - it uses the same system.
14:59:43gokr1And debugging seems to work fine, and seems to have quite advanced features.
15:00:12gokr1And QtCreator AFAIK runs on all modern platforms - and is built to work fine with Android etc.
15:00:22gokr1later
15:01:29keylehm gokr1: this worked fine for me http://pastebin.com/cABrDve1
15:01:48keyleoption1 gives an extra line for whatever reason
15:02:43keyle(granted I haven't tested with much)
15:07:15flaviuhttps://gist.github.com/flaviut/d282846647d6ff5f4f9b
15:07:24flaviuif anyone else wants to have fun while using macros :)
15:08:18Araqviolation of NEP-1 detected.
15:08:43flaviuhuh?
15:08:57Araqprocs should start with a lowercased letter
15:09:31flaviuAraq: I like to pretend I live in a world where https://github.com/Araq/Nim/issues/1693 has been accepted.
15:09:57AraqSym is not even a type
15:10:21AraqnnkSym is an enum value that's it
15:11:24*minciue quit (Quit: minciue)
15:11:28flaviuand *Lit is also wrong
15:11:36flaviuI'll fix that once I get to it.
15:13:38*ajhager joined #nim
15:14:22*jefus joined #nim
15:15:14*z1y quit (Ping timeout: 245 seconds)
15:15:53*jefus__ quit (Ping timeout: 240 seconds)
15:20:41*meanfish joined #nim
15:23:09*z1y joined #nim
15:35:05*leavengood joined #nim
15:35:29*leavengood is now known as Guest35594
15:37:27flaviuIs https://gist.github.com/4ff0f300fc9db8ea43c0 too much to expect?
15:37:49flaviuI get the feeling it might be, but I can't think of another way to do what I want.
15:40:50*darkf quit (Quit: Leaving)
15:44:09keylenight
15:44:12*keyle quit (Quit: Leaving)
15:45:03Varriountflaviu: Doesn't #1693 cause ambiguity issues?
15:45:14*arekzb quit (Quit: Page closed)
15:45:15Araqflaviu: at which point will you use the language instead of fighting it all the time?
15:45:24Varriount^
15:49:23flaviuVarriount: How would it cause ambiguity issues?
15:50:09flaviuAraq: What's the point of a language if you can't abuse it to do crazy stuff?
15:51:21*bjz quit (Ping timeout: 244 seconds)
15:56:44*HakanD joined #nim
15:59:51flaviuLooks like it's already been reported: https://github.com/Araq/Nim/issues/1070
16:01:17EXetoCit is of course nice to have a community that takes a more practical approach, but some people just can't help but abstracting as much as possible :p
16:01:34*JinShil quit (Quit: Konversation terminated!)
16:02:54*JinShil joined #nim
16:03:19flaviuEXetoC: I'm not abstracting as much as possible, I'm just trying to keep things DRY for the user.
16:05:14EXetoCfair enough. just gotta be patient then
16:08:20*BitPuffin joined #nim
16:10:01*JinShil quit (Quit: Konversation terminated!)
16:11:20*JinShil joined #nim
16:12:59*BitPuffin quit (Ping timeout: 252 seconds)
16:13:53*no_name quit (Ping timeout: 244 seconds)
16:15:29novisthey i see semicolons used to separate params in proc definition. do they have any special meaning or are they same as comma?
16:15:40flaviunovist: Exactly the same as comma
16:15:49flaviudom96: http://forum.nimrod-lang.org/ doesn't redirect properly.
16:15:51novistawesome, ty
16:16:13novistflaviu that url works just fine. where it should redirect?
16:16:27dom96flaviu: I am aware. No need to tell me twice.
16:16:36dom96I'll fix it when I can.
16:16:46flaviudom96: Ah, sorry, I thought you might have missed it in the logs.
16:17:11flaviunovist: It should go to forum.nim-lang.org
16:17:29Araqdom96: the forum's CSS is also broken.
16:17:42flaviugoogle might penalize the search ranking if it sees two sites with identical content.
16:17:43novistohh i see. fact that forum worked threw me off a bit
16:17:46dom96Araq: huh?
16:17:51Araqthe spacing between paragraphs need to be much larger
16:18:59novistfor site/forum you guys should use some css framework at least. no need to manually do everything.
16:19:08dom96Araq: I don't have time to deal with CSS issues.
16:19:21novistbootstrap is easy and polished thing, could help ya build something good looking fast. and it would be maintainable too
16:19:41*Varriount|Mobile joined #nim
16:19:49Araqdom96: flaviu is busy with re-inventing haskell though :-/
16:19:51EXetoCI prefer foundation, but both simplify writing responsive pages etc
16:21:04dom96flaviu: fixed
16:21:20dom96novist: But we already have something good looking :P
16:21:41flaviudom96: It could use a lot more work.
16:21:51novistdom96 this might hurt your feelings but nim's forum is like from year 1999
16:21:54*ajhager quit (Ping timeout: 245 seconds)
16:22:03novistsite looks bit better but still :p
16:22:20EXetoCwell if someone ever makes it responsive
16:22:20*no_name joined #nim
16:22:36*JinShil quit (Quit: Konversation terminated!)
16:23:35novistyou know there is saying that first impression matters the most. i can totally see people not getting excited when they see something that looks bit like a hack. represents language badly
16:23:41*petantik left #nim ("WeeChat 1.0.1")
16:23:46dom96novist: You're welcome to improve it.
16:24:08flaviudom96: The first step would be re-writing all the CSS and HTML, honestly.
16:24:11dom96It looks better than the first version of the forum.
16:24:18*skyfex_ joined #nim
16:24:23novisthonestly - i have same thing to say for reinventing forum as for reinventing IDE - wasted work bros, pointless..
16:24:45dom96flaviu: Yeah. So do it.
16:24:55Araqyeah right, we get async production ready by not using it in production.
16:25:03Araqmakes perfect sense
16:25:04dom96It's annoying hearing "the forum looks like it's from the year 1999" when you don't even bother to make it look better.
16:25:28Araqthe compiler should also have been written in Ocaml.
16:25:31novistAraq its valid point but still lots of wasted effort while currently available opensrc forums would work much better
16:26:20onionhammerso anyway...
16:26:29dom96I guess all these libraries which I wrote for the forum to use were a waste of effort too then.
16:26:37onionhammerAraq, you mentioned caas the other day? :)
16:27:21novistnah dom96. at least some good came out of it ^_^
16:27:52EXetoCI think it's a net positive
16:28:19*JinShil joined #nim
16:28:36*JinShil quit (Client Quit)
16:28:45*no_name quit (Ping timeout: 252 seconds)
16:28:52*Sphax joined #nim
16:29:06EXetoCand we have several other editor plugins for example. they all probably need some work, but it's something
16:29:15flaviuBut the knee-jerk rejection of a CSS preprocessor isn't really good.
16:30:25*JinShil joined #nim
16:30:33*JinShil quit (Client Quit)
16:30:41*no_name joined #nim
16:31:58*JinShil joined #nim
16:32:13EXetoCthat's more of a luxury compared to other things
16:34:59*JinShil quit (Client Quit)
16:35:25*Sphax quit (Quit: ZZZZZzzzzz)
16:44:31*z1y quit (Ping timeout: 255 seconds)
16:46:58gokr1Araq: I think the issue with readAll on Windows only happened when blimp was used in a pipe-thing (by git).
16:48:14gokr1Ehm... ah, perhaps that was the only time it used stdin. Wonder why it works for keyle.
16:51:20gokr1dom96: I appreciate all your work :)
16:52:36gokr1And even if I would love a mailinglist - I do understand that perhaps all of the networking code comes through your work. And that alone makes me LOVE the forum. ;)
16:55:06*HakanD quit (Quit: Be back later ...)
16:55:41*matkuki joined #nim
16:58:39*BlaXpirit_ joined #nim
16:59:21*z1y joined #nim
17:01:04*BlaXpirit quit (Ping timeout: 245 seconds)
17:04:19novistdom96 do you maybe have a clean nim logo somewhere?
17:05:15*matkuki quit (Quit: ChatZilla 0.9.91.1 [Firefox 34.0.5/20141126041045])
17:08:47*z1y1 joined #nim
17:10:45flaviunovist: http://a.pomf.se/rtjxkg.svg
17:10:55*z1y quit (Ping timeout: 252 seconds)
17:11:16novistthanks
17:15:34*meanfish quit (Ping timeout: 255 seconds)
17:17:34flaviuI need to fix that bottom curve
17:17:57flaviuit's unbelievably irritating.
17:20:12*wan joined #nim
17:23:39flaviufixed: http://a.pomf.se/pcbxmo.svg
17:23:41flaviunovist: ^
17:24:39novisteven better, ty
17:25:15*z1y1 quit (Quit: Leaving.)
17:25:16*gsingh93 joined #nim
17:25:33*z1y joined #nim
17:27:17*ajhager joined #nim
17:31:17*jsudlow joined #nim
17:34:49*BlaXpirit joined #nim
17:35:19*BlaXpirit quit (Client Quit)
17:35:20*z1y1 joined #nim
17:35:39*BlaXpirit joined #nim
17:37:47*z1y quit (Ping timeout: 244 seconds)
17:41:31*zahary1 joined #nim
17:41:32*z1y1 quit (Ping timeout: 245 seconds)
17:50:39*sdw joined #nim
17:52:34novisthey.. we cant use macros in compiler code?
17:55:18BlaXpirit?
17:57:05*BitPuffin joined #nim
17:57:09novistfor some reason i get undefined references when using macros
17:57:30novistmain.c:(.text+0x1412): undefined reference to `parsestmt_305602'
17:57:30novistmain.c:(.text+0x141c): undefined reference to `treerepr_305833'
17:58:17BlaXpiritwhen i used nim-after-0.10.2 (not sure if master or devel), it simply crashed while compiling some of my programs
18:01:10*BlaXpirit-UA joined #nim
18:01:30*BlaXpirit quit (Read error: Connection reset by peer)
18:01:53*BitPuffin quit (Ping timeout: 240 seconds)
18:02:43novistah i guess errors because macros stuff is market as compiletime
18:03:05*BlaXpirit-UA quit (Client Quit)
18:07:24flaviuhttp://nim-lang.org/os.html#sleep,int sleeps for milisecs seconds
18:07:29flaviuon my system
18:08:22def-flaviu: what system is that?
18:08:31flaviulinux
18:08:45def-weird, works for me
18:09:26def-it uses posix.nanosleep
18:09:31def-looks totally fine to me
18:11:17flaviudef-: weird
18:11:48def-.eval import os; sleep(1000)
18:11:50flaviudef-: Oh, it's a problem with my program
18:11:52Mimbusdef-: <no output>
18:11:54flaviusorry.
18:12:07flaviuI put the sleep in the wrong loop.
18:15:49*jsudlow quit (Quit: Leaving)
18:16:22*jsudlow joined #nim
18:17:56*jsudlow quit (Client Quit)
18:19:17novistlib/core/macros.nim(396, 15) Error: cannot generate code for 'kind'
18:19:32novistthis is real bummer. it no longer works when i remove compiletime pragmas in macros module :|
18:20:02novistwhy on earth there have to be two different identical types, TNode in compiler and TNimrodNode in macros module
18:20:41flaviuIs there a way to get the data pointer out of a seq?
18:21:41def-flaviu: pointer to the actual elements?
18:21:46flaviuYep
18:21:49def-maybe addr(mySeq[0])
18:22:02EXetoCyep
18:22:09flaviudef-: Thanks!
18:29:48*Sergio965 joined #nim
18:30:11*Sergio965 quit (Client Quit)
18:58:20*Varriount|Mobile quit (Remote host closed the connection)
19:01:47flaviunim web already outputs mostly-valid markdown, can it be made to output something suitable for github readmes?
19:02:07flaviuIt already works pretty well with some manual modification: https://github.com/flaviut/optional_t/blob/master/readme.md
19:02:22*ajhager quit (Ping timeout: 245 seconds)
19:03:01MyMindopen arrays are can change length at run time ?
19:03:36gokr1MyMind: seq can
19:03:57gokr1openarray is just a special type you can use as parameter type (only) - matching both arrays and seqs
19:04:14gokr1Such procs can then accept either an array (fixed size) or a seq (dynamic size)
19:04:25gokr1For things you can do with a seq - check my article:
19:04:43gokr1The top one: http://goran.krampe.se/category/nim/
19:08:03MyMindty gokr1 somehow wasn't clear enough for me at the doc
19:08:31*onionhammer quit (Ping timeout: 255 seconds)
19:12:21MyMindan equivalent to a python dictionary ?
19:12:27def-MyMind: tables
19:14:17MyMindany of them can mix types?
19:16:51def-no
19:19:07flaviuMyMind: You can hack around that by using json.
19:19:22flaviustore json nodes instead of whatever object you really want to store.
19:19:37MyMindkinda tricky
19:19:45MyMind:D
19:20:15*Lordovos joined #nim
19:21:59MyMindbad python habits I guess
19:23:14wtwfyi: I got the master branch to build under FreeBSD, very strange but apparently it was just a file caching issue
19:24:27def-wtw: interesting. have a way to reproduce?
19:25:24wtwI'm working on it, it was a messy series of updating to different branches, 'koch clean's and manually compiling steps that lead to it
19:27:48*BitPuffin joined #nim
19:28:28flaviuFor a regex library, should it be `captures[0].bounds`, `captures[0].substr`, or should it be `captureBounds[0]`, `captures[0]`?
19:32:49*BitPuffin quit (Ping timeout: 256 seconds)
19:41:51jpoirieris a channel declared global, for threads to use, preferred over passing a channel ptr in as a parameter?
19:45:36EXetoCMyMind: object variants
19:46:34MyMindEXetoC: can you be more specific?
19:52:52EXetoCMyMind: look for it in the manual. they allow for run-time typing, but the valid types must be specified at compile-time
20:10:01*rpag quit (Quit: Leaving)
20:10:17*jorma joined #nim
20:10:22*rpag joined #nim
20:10:28*jorma is now known as jorma2
20:10:58*rpag left #nim (#nim)
20:14:43*jorma2 quit (Ping timeout: 246 seconds)
20:22:18*HakanD joined #nim
20:29:10*dain_ joined #nim
20:32:41*jpoirier quit (Quit: Leaving)
20:32:54*brson joined #nim
20:38:19MyMindan array of void is possible?
20:40:03flaviuMyMind: That's meaningless
20:40:07flaviuvoid means no type.
20:40:30MyMindin C you can use to mix types and cast them later
20:40:36flaviuvoid* and void in C sound similar, but are unrelated.
20:40:39MyMindat runtime
20:40:47MyMindvoid*
20:40:49*EXetoC quit (Ping timeout: 256 seconds)
20:40:59MyMindiirc
20:41:20*onionhammer joined #nim
20:41:25flaviuMyMind: Yes, but think of it as `void*` and `void`, not `void` `*`
20:41:45flaviuYou can sort of emulate it by creating an unchecked array T and casting.
20:42:03flaviualthough you shouldn't store refs in it or you'll have GC problems.
20:44:03MyMindcan you disable Gc?
21:00:01onionhammerMyMind yes
21:00:13onionhammerbut you'll have trouble with the standard library
21:00:30onionhammerbut you can use a custom std library
21:02:35*jsudlow joined #nim
21:04:27MyMindty onionhammer
21:04:38*matkuki joined #nim
21:06:54*matkuki quit (Client Quit)
21:07:03*irrequietus joined #nim
21:09:26*ajhager joined #nim
21:11:01*Fusion_Gaming joined #nim
21:15:35*HakanD quit (Quit: Be back later ...)
21:16:33*BitPuffin joined #nim
21:21:21*BitPuffin quit (Ping timeout: 252 seconds)
21:24:20gokr1MyMind: Note that GC is per thread. I am guessing you could have one thread doing "non GC" code only, thus not using the GC at all.
21:24:31gokr1MyMind: Further, you can control the GC quite a lot.
21:29:40*bjz joined #nim
21:32:59*gour quit (Remote host closed the connection)
21:35:40*ajhager quit (Ping timeout: 255 seconds)
21:51:27Araqwhat should I do instead of 'git pull' again? ;-)
21:51:45Araq'git fetch && git rebase' ?
21:52:01gokr1fetch is always safe.
21:52:22gokr1And rebase indeed often nice.
21:52:40gokr1Reapplying your modifications on current head
21:53:48*minciue joined #nim
21:59:47*Demon_Fox joined #nim
22:00:05gokr1Regarding the Object type in Java (I am porting code from Java) - I kinda punted and used a generic for that, but now... I realize that perhaps I should make an object variant that catches a similarly broad net that Object in Java does.
22:01:20gokr1So it could hold either a seq[T], a T or a string (and perhaps a few more).
22:03:33*BitPuffin joined #nim
22:07:28ekarlso-so any volunteers for packages program ? :)
22:09:50*bjz quit (Max SendQ exceeded)
22:09:58renesacekarlso-: what?
22:10:43*bjz joined #nim
22:12:10flaviuAraq: or git pull --rebase.
22:12:26*ajhager joined #nim
22:13:25flaviuIf you want to update all the branches, I've also written https://gist.github.com/flaviut/c0ec97eb185bf212557f
22:13:32flaviu*nix only though
22:13:50irrequietusdom96: ;)
22:18:13*EXetoC joined #nim
22:22:15*BitPuffin quit (Ping timeout: 264 seconds)
22:22:30Araq"I wanted something like git up, but then realized that it would require me install a shit-ton of ruby dependencies. I can't be bothered to wait for that, so I wrote my own script that does something similar."
22:22:55renesachttps://github.com/msiemens/PyGitUp <-- this python one may be good too
22:23:02EXetoCpeople and their deps
22:23:03Araqah so when others have dependencies that's bad. but throwing away what we have for lots of deps is of course fine
22:23:53flaviuAraq: Depends. If something would take a lot of work to duplicate, then yes, I'll put up with dependencies.
22:24:26flaviuBut if it's trivial to replicate, then I have no problem creating my own.
22:25:49*matkuki joined #nim
22:25:59flaviuA CSS preprocessor seems like the most useful scapegoat here: It may look simple on the surface, but dig underneath and it's a lot less simple.
22:26:28flaviuyou have to write all the builtins, parse and build an AST, do calculations.
22:26:44*HakanD joined #nim
22:27:28Araqwhen I do it and the result is complex you blame me for it. when others do it, it's complex by its nature. you have developed a nice set of double standards.
22:29:54flaviuI'm against unnecessary complexity.
22:30:48matkukiIs partial case sensitivity in Nim here to stay?
22:31:12flaviuAnd if it does seem like I have double standards, it's mostly between software with lots of bugs and software with hardly any bugs.
22:31:46EXetoCmatkuki: yes. what changed is this: Foo != foo
22:32:11EXetoCbut foo = FoO (case-sensitivity for the first char only)
22:32:54ekarlso-renesac: renesac a'la crates.io for nim,
22:33:04matkukiEXetoC: Just making sure, because it messed up a few SDL2 modules
22:35:14matkukiEXetoC: What was the intention behind this?
22:36:03flaviumatkuki: so that we can get rid of the `T` and `P` prefixes
22:36:29matkukiflaviu: Can you give me an example?
22:36:35ekarlso-but I guess people are too busy -,,-
22:37:33flaviumatkuki: var foo: Foo
22:38:00EXetoCwhich someone claimed wasn't really a problem
22:38:20matkukiI mean an example in context of "P" and "T"?
22:38:43flaviuWell, var foo: TFoo would be valid
22:39:03flaviubut if T was removed and the first letter wasn't sensitive, then that would fail to compile.
22:39:51Araqgit pull --rebase
22:39:53AraqCannot pull with rebase: You have unstaged changes.
22:39:54AraqPlease commit or stash them.
22:40:04Araqbah
22:40:45*brson quit (Quit: leaving)
22:40:50flaviuso commit or stash them
22:40:55flaviugit stash
22:40:59flaviugit pull --rebase
22:41:01flaviugit stash apply
22:42:02matkukiOk, why not go to full case sensitivity?
22:42:35flaviumatkuki: If some library author loves his underscore_identifiers, then you can still use underscoreIdentifiers
22:44:31*Guest35594 quit (Ping timeout: 255 seconds)
22:46:44*jefus_ joined #nim
22:47:47*gmpreussner quit (Ping timeout: 244 seconds)
22:50:06*jefus quit (Ping timeout: 264 seconds)
22:51:24matkukiflaviu: Now that you pointed it out, why is Nim so stiff about underscores?
22:51:26matkukiBTW, I'm not bashing Nim, I just want to logic behind the decisions.
22:52:07flaviumatkuki: Araq might be a better person to ask
22:53:07*sillesta joined #nim
22:54:12Araqmatkuki: discussions about coding style take lots of resources which would be better spent on more important things
22:54:14*meanfish joined #nim
22:54:44Araqso the idea was to make the compiler don't care so that the editor can render the AST however you want
22:54:50gokr1Anyone here who have done "class hierarchies" in Nim - and ... if so, did you set up newXXX to call a specific initializeYYY proc in the superclass?
22:55:07Araqgokr1: that's what I've seen yes.
22:55:17sillestahi, is eval(code) supported in nim? i noticed the compiler had an interactive mode, but couldn't find any info related to it
22:55:43gokr1Kinda like in Smalltalk then, an inititalize method that starts by calling the initialize in super.
22:55:44matkukiAraq: Thanks.
22:55:45flaviusillesta: Not without quite a bit of work, it hasn't been done yet.
22:55:47*gmpreussner joined #nim
22:56:38Araqsillesta: I still have some code lying around that does that ...
22:57:03gmpreussnerwhat is the convention for creating Nim bindings to external libraries - do you retain the original names of functions, types and constants, or do you adjust them to match the Nim coding style?
22:57:44flaviugmpreussner: http://goran.krampe.se/2014/10/16/nim-wrapping-c/
22:58:00flaviuseems the convention is to remove the prefix, but to leave them mostly as-is
22:58:14Araqgmpreussner: match the Nim coding style, c2nim supports --nep1 for that
22:58:22*ARCADIVS quit (Quit: ARCADIVS)
22:58:26gmpreussnercool thx
22:58:39gokr1gmpreussner: Not sure if my article mentions it - but generally I think most wrappers are in two layers, one autogenerated - and then a "pure" lib on top that makes it Nimish.
22:58:44gokr1Araq: Right?
22:58:53EXetoCkeeping the names is a pain in the ass when writing high level interfaces
22:59:00EXetoCunless you want to keep ugly enum names and such
22:59:31Araqgokr1: mostly right. but for the big wrappers like GTK we don't have a higher layer
22:59:48gmpreussnerid rather not have ugly names, but a counter argument would be that it better matches any documentation for the original libs. i don't know if that is important or not.
22:59:50gokr1gmpreussner: If you sniff around in lib/pure and lib/wrappers I think you can see this pattern.
23:00:18gokr1Since big wrappers are a pain to maintain a high level of I guess.
23:00:27sillestaflaviu: cool, is it a planned feature or is nim going to be strictly a compiled language?
23:01:16wtwis it possible in nim to write something like in haskell seq1.map( * 2), i.e. currying?
23:01:16flaviusillesta: It's a planned feature, at least in some old conversations. But "<Araq> sillesta: I still have some code lying around that does that ..."
23:01:46flaviusillesta: I may sound like I know what I'm doing, but Araq is the one who wrote most things :)
23:01:56sillestaokay, thanks :)
23:01:57wtwprobably not, but to put it differently, do I always need to write proc(...) for a map or filter
23:02:31gokr1wtw: There is some slick stuff in future.nim
23:02:34gokr1lambdas
23:02:51Araqand I just fixed a showstopper bug for => ... :-)
23:03:43gokr1Also... I wrote an article on seq showing adding some behaviors for it: http://goran.krampe.se/2014/12/03/nim-seq/
23:03:45wtwah, ok, googling :)
23:03:52wtwthx
23:04:01gokr1It tries to show most of what you can do with seq at this time.
23:04:10Araqwtw: so 0.10.2 works out of the box on FreeBSD?
23:04:28gokr1Funny enough I failed to check for "copy" of a seq - but hey - that's just assignment :)
23:04:39wtwwell I'm not sure yet, but at least it's running :)
23:05:02wtwI found nim's features to interesting/compelling to dig further into the build problems :D
23:05:36wtwalso I have to compile/link everything twice, the first run gives unresolved depedencies
23:05:54wtwI'll report tomorrow or so if I find the time
23:05:55Araqoh yeah use --parallelBuild:1 to get around that
23:06:07Araqthere is something wrong with osproc on BSD
23:06:21wtwI see, ok
23:06:22Araqthe compiler runs the C compiler in parallel and the linker afterwards
23:06:42Araqbut on BSD it calls the linker too early
23:06:45MyMindAraq: how many threads use for build by default?
23:07:16wtwis this also for single files? probably yes as the stdlibs are also always included...?
23:07:35AraqMyMind: it checks how many CPUs you have
23:07:57MyMindnice feature :)
23:08:12AraqMyMind: but you can set --parallelBuild:8 to run 8 things in parallel
23:08:39MyMindis the equivalent to make -j8 right?
23:09:16Araqyup
23:12:52*ajhager quit (Ping timeout: 255 seconds)
23:13:09wtwah "future.nim" is not about futures (the language feature) but future features of the language :D
23:13:21wtwlooks nice
23:13:30Araqyeah we copied that from python for
23:13:37Araqfrom future import `=>`
23:16:39wtwah, the lambda syntax is working, nice
23:16:50gmpreussneris c2nim compilable @ master? i'm getting errors :/
23:17:01Araqgmpreussner no sorry, only with devel
23:17:20Araqwtw: don't push it too hard ;-)
23:17:31wtw;)
23:17:40gmpreussnerAraq: i don't see a devel branch. is this in https://github.com/nim-lang/c2nim ?
23:18:08*BitPuffin joined #nim
23:18:23Araqgmpreussner read this please: http://forum.nim-lang.org/t/738
23:19:39gmpreussneryikes ok
23:20:23*Matthias247 quit (Read error: Connection reset by peer)
23:21:03ekarlso-Araq: you got a preference on GET /packages should return all the releases pr package as well ?
23:21:27ekarlso-or anyone else..
23:22:18gmpreussnerAraq: the requirements for working with c2nim aside, shouldn't i still be able to compile c2nim itself with the devel nim compiler?
23:22:41gmpreussneri guess i haven't synced in a few days. that may be why
23:22:53*BitPuffin quit (Ping timeout: 256 seconds)
23:23:14wtwAraq: just tried a fresh build for master, it's working now under freebsd 10.1. The only thing I would change is in build.sh 'cc' instead of 'gcc' as 'cc' will point to the system's default compiler.
23:24:03wtwthis is all with default clang 3.4 btw
23:24:04Araqwtw: no that's stupid, we do the testing with GCC.
23:24:27wtwbut cc should be gcc if nothing else is installed?
23:25:12Araqso check if gcc is available and if not use 'cc' with a warning perhaps
23:25:20ekarlso-Araq: +1 btw for slapping me to read the tutorial
23:25:59Araqgmpreussner I built it with devel myself yesterday
23:26:09Araqbut my devel was not up to date ... ;-)
23:27:38def-Araq: what's missing to do testing with clang?
23:29:23Araqdef-: we need a testing machine that uses clang instead of gcc
23:29:48Araqand ... I don't know ... let's see ... perhaps test results that I can look over
23:30:25Araqbut Varriount is working on that (...right?!)
23:30:52wtwjust checked, 'cc' works fine on all of my Linux machines with only gcc installed
23:31:15Araqwtw: that's not the point
23:31:16def-wtw: we're worried that there may be bugs with clang
23:31:27wtwah I see ;)
23:31:28def-because only gcc is tested regularly
23:31:48wtwyep, got it
23:32:12flaviuAraq: I can switch my arm buildbot to clang
23:32:32Araqflaviu: that would help if somebody would look at the test results
23:32:33def-because clang builds a lot faster and all programs i tested in nim were faster with clang
23:33:00wtwsame here
23:33:02def-I find clang interesting because*
23:33:46wtwalthough that's strange since usually clang is like 10% slower, at least for my benchmarks
23:34:05wtw(meaning compile time as well as runtime)
23:34:09*Araq doesn't like the 'cc' environment variable
23:34:25wtw;D
23:34:32flaviuplease start liking $CC
23:34:43flaviuI don't want to have to symlink clang to gcc
23:34:48flaviuerr, gcc to clang
23:35:35Araqflaviu: you can set cc in your nim config
23:35:40*minciue quit (Quit: minciue)
23:35:52*matkuki quit (Quit: ChatZilla 0.9.91.1 [Firefox 34.0.5/20141126041045])
23:36:06*jpoirier joined #nim
23:36:09flaviuI've still been unable to figure out how to do that.
23:36:24def-flaviu: cc = clang
23:36:29def-instead of cc = gcc
23:37:05flaviuOk, thanks!
23:37:27*jpoirier quit (Client Quit)
23:37:36flaviuI suppose I just read over that without reading when I looked in there.
23:37:45*jpoirier joined #nim
23:40:55Araqflaviu: apparently you also never read our FAQ :P
23:41:13flaviuI read nimc.html
23:41:37flaviuI found the FAQ!
23:45:10*BlaXpirit_ quit (Quit: Quit Konversation)
23:46:57*Lordovos quit (Quit: Leaving)
23:48:42*z1y joined #nim
23:49:32*FusionGaming joined #nim
23:49:52gmpreussnerAraq: compiled fine now with both c2nim and nim @ head
23:50:25*Fusion_Gaming quit (Quit: Leaving)
23:52:14*JinShil joined #nim
23:54:50*rpag joined #nim
23:54:57*z1y quit (Ping timeout: 244 seconds)
23:58:34*FusionGaming quit (Quit: Leaving)
23:58:50*FusionGaming joined #nim
23:58:51*meanfish quit (Ping timeout: 264 seconds)