<< 10-06-2015 >>

00:02:49*Jesin quit (Ping timeout: 255 seconds)
00:16:02*Jesin joined #nim
00:24:53*drewsrem quit (Quit: Leaving)
00:31:27*boop is now known as boopisaway
00:38:39wbJust noticed it says in the documentation that os.sleep() takes milliseconds. It actually takes seconds on my (windows) system, so either the code or doc is wrong or my system is strange
00:41:49cazovas far as I can see, it should be milliseconds unless there's something funny on your system. os.sleep goes straight down to https://msdn.microsoft.com/en-us/library/windows/desktop/ms686298%28v=vs.85%29.aspx
00:43:23cazovahh, yeah, there might be something funny with your system clock going on. windows and time/clock stuff has always been a scary maze of things
00:45:27*cornus_ammonis joined #nim
00:48:21cornus_ammonishello, I'm new to nim and I'm trying out some of the templating examples in aporia, and the result of one of them is different from the documentation
00:49:16cornus_ammonistemplate t{(0|1|2){x}}(x: expr): expr = x+1
00:49:20cornus_ammonislet a = 1
00:49:32cornus_ammonisecho a
00:49:44cornus_ammonisfor me, that outputs 3, but it's supposed to be 2
00:50:49cornus_ammonisindeed it outputs 3 if a is 0, 1, or 2
00:53:13*wan quit (Ping timeout: 264 seconds)
00:54:50*kumul quit (Ping timeout: 256 seconds)
00:55:16reactormonkcornus_ammonis, I think that's because the template is applied repeatatly
00:55:28reactormonkcornus_ammonis, check the compiler output
00:57:06*jaco60 quit (Ping timeout: 256 seconds)
00:58:37cornus_ammonisreactormonk, the C output? I'm looking at it, not sure what part is relevant
00:58:48reactormonkcornus_ammonis, no, the nim compiler output
00:59:37cornus_ammonisoh, this?
00:59:39cornus_ammonisc:\users\winter~1\appdata\local\temp\aporia\a0.nim(2, 9) Hint: t(1) --> '2' [Pattern]
00:59:44reactormonkexactly
00:59:44cornus_ammonisc:\users\winter~1\appdata\local\temp\aporia\a0.nim(2, 9) Hint: t(2) --> '3' [Pattern]
01:00:08cornus_ammonisit does say in the docs that outputs 2, though
01:00:28reactormonkSounds like a regression to me
01:00:35cornus_ammonishttp://nim-lang.org/docs/manual.html#term-rewriting-macros-pattern-operators
01:01:42reactormonkwe need doctest or something similar :-/
01:03:21reactormonkcornus_ammonis, https://github.com/Araq/Nim/issues/new
01:03:59cornus_ammonisgot it, will submit an issue
01:05:07reactormonkcornus_ammonis, the basic question - should term rewrite be applied repeatly? e.g. for recursive stuff
01:06:02cornus_ammonisI'm sure a case could be made for either behavior being preferable in some situation
01:06:28cornus_ammoniswhat happens if my rewrite rules create a loop, anyway
01:06:43reactormonktry it
01:08:28cornus_ammonisinfinite compilation
01:08:41cornus_ammoniser
01:08:45*ChrisMAN quit (Ping timeout: 264 seconds)
01:09:01cornus_ammonisactually it bails after a bunch of iterations, possibly stack overflow?
01:09:16cornus_ammonistemplate t{(0|1){x}}(x: expr): expr = x xor 1
01:09:22cornus_ammonislet a = 1
01:09:27cornus_ammonisecho a
01:09:35cornus_ammonisthen a bunch of this:
01:09:48cornus_ammonisc:\users\winter~1\appdata\local\temp\aporia\a0.nim(2, 9) Hint: t(0) --> '1' [Pattern]
01:09:53cornus_ammonisc:\users\winter~1\appdata\local\temp\aporia\a0.nim(2, 9) Hint: t(1) --> '0' [Pattern]
01:10:20cornus_ammonisit outputs 1 after iterating a couple hundred times
01:10:27cornus_ammoniscompilation is somehow successful
01:14:49*dddddd quit (Ping timeout: 256 seconds)
01:15:52reactormonk^^
01:17:02*wan joined #nim
01:17:08reactormonkcornus_ammonis, stresstesting the compiler is always good
01:17:50cornus_ammonisI suppose that's hitting a recursion depth limit somewhere
01:19:24reactormonkcornus_ammonis, wanna mess around in the compiler? ./koch temp c <your file> to see what the compiler does and if you wanna change stuff in it
01:24:28*kumul joined #nim
01:27:55cornus_ammonistook me a minute to figure out how to do that on windows
01:32:01*lokulin joined #nim
01:33:30cornus_ammonisoutput isn't much different than what's shown in aporia, except it also shows a big list of packages
01:33:50reactormonksure, that's just for compiling the compiler after you messed with it
01:34:26cornus_ammonisah ok
01:35:37reactormonkcornus_ammonis, eg.g. insert debug(n) at patterns.nim in the compiler at line 157 (below the elif) and run the koch temp
01:38:47reactormonkcornus_ammonis, then you can see that's it's a symbol like this:
01:38:50cornus_ammonismy line nums seem to be different, you mean elif p.kind == nkCurlyExpr: ?
01:38:50reactormonk{
01:38:52reactormonk "kind": "nkIntLit",
01:38:54reactormonk "intVal": 2,
01:38:56reactormonk "info": ["test.nim", 2, 8]
01:38:58reactormonk}
01:39:00reactormonkyeah
01:39:30reactormonkSo you can go and an if n.kind == nkIntLit:\n debug(n) writeStackTrace to get some more info
01:40:14reactormonkAnd as you see, it's in proc hlo in the file hlo.nim where the recursion happens
01:40:29reactormonkapparently line 90
01:41:42reactormonkif you take a look at proc hlo, you'll also see a comment about loop detector :-)
01:42:43cornus_ammonisso the limit is 300 iterations I guess
01:45:56reactormonkI don't know how exactly to solve the problem with non-repetitive expansions
01:46:55cornus_ammonisI'd be satisfied with the docs matching actual behavior :)
01:47:38reactormonkcornus_ammonis, that's in doc/trmacros.txt
01:47:46reactormonkbut I'm pretty certain it's a bug for them not to work
01:51:48*shodan45 joined #nim
01:58:51*pregressive joined #nim
02:11:44*OnO quit (Ping timeout: 272 seconds)
02:11:51*OnO joined #nim
02:12:15*OnO is now known as Guest9271
02:45:03*BitPuffin|osx quit (Ping timeout: 250 seconds)
02:55:14*fioco_ joined #nim
03:20:07*saml_ quit (Quit: Leaving)
03:31:01*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
03:33:01*fioco__ joined #nim
03:35:12*fioco_ quit (Ping timeout: 256 seconds)
03:35:36*fioco__ left #nim (#nim)
03:45:05*darkf joined #nim
03:57:02*vendethiel joined #nim
04:18:55*cornus_ammonis quit (Read error: Connection reset by peer)
04:19:14*cornus_ammonis joined #nim
04:25:13*pregressive quit (Remote host closed the connection)
04:26:36*jbomo quit ()
05:04:15*shodan45 quit (Quit: Konversation terminated!)
05:08:05*vikaton quit (Quit: Connection closed for inactivity)
05:10:32*ddl_smurf quit (Quit: ddl_smurf)
05:14:18*Jesin quit (Quit: Leaving)
05:25:30*datanoise quit (Ping timeout: 246 seconds)
05:42:17*dalarmmst quit (Ping timeout: 256 seconds)
05:42:17*vendethiel quit (Ping timeout: 250 seconds)
05:51:35*kas joined #nim
05:56:36*woadwarrior joined #nim
06:01:03*woadwarr_ joined #nim
06:02:39*woadwarrior quit (Ping timeout: 250 seconds)
06:08:21*vendethiel joined #nim
06:17:21*kumul quit (Quit: Leaving)
06:22:57*datanoise joined #nim
06:25:53*tennix joined #nim
06:37:01*vendethiel quit (Ping timeout: 264 seconds)
06:38:44*bjz joined #nim
06:39:07*bjz quit (Client Quit)
06:40:11*vendethiel joined #nim
06:40:56*FreeArtMan joined #nim
06:57:02*bjz joined #nim
07:10:43*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
07:11:20*Trustable joined #nim
07:19:59*Guest93295 is now known as wuehlmaus
07:25:57*kas quit (Ping timeout: 276 seconds)
07:27:45*jaco60 joined #nim
07:33:52*Ven joined #nim
07:36:43*ingsoc joined #nim
07:41:13*datanoise quit (Ping timeout: 264 seconds)
07:50:49*davidhq joined #nim
07:55:35*Ven quit (Read error: Connection reset by peer)
07:55:37*Ven_ joined #nim
08:02:28*avsej joined #nim
08:02:28*avsej quit (Client Quit)
08:03:13*avsej joined #nim
08:03:13*avsej quit (Changing host)
08:03:13*avsej joined #nim
08:06:14*Kingsquee quit (Quit: Konversation terminated!)
08:06:53*coffeepot joined #nim
08:10:49*wan quit (Ping timeout: 265 seconds)
08:13:17*afiskon joined #nim
08:15:55wbPut up an issue about the `^` vs pow() thing: https://github.com/Araq/Nim/issues/2897
08:18:23*bjz joined #nim
08:20:16*yglukhov________ joined #nim
08:20:58*Sembei joined #nim
08:23:29*wan joined #nim
08:24:29*ioctl joined #nim
08:30:18*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
08:37:10*Ven_ quit (Ping timeout: 255 seconds)
08:38:56*banister joined #nim
08:43:37*Sembei quit (Ping timeout: 256 seconds)
08:59:53*Sentreen joined #nim
09:05:21*Sembei joined #nim
09:07:21scoeriis there a way to look at my code after macro-expansion?
09:09:34r-kuscoeri: you can print tree that macro returns
09:09:49r-kutree_repr(result) i believe
09:15:12*banister quit (Ping timeout: 256 seconds)
09:19:10*coffeepot joined #nim
09:24:45scoeriI'll try that, thanks
09:25:40*milosn quit (Quit: leaving)
09:27:34*avsej quit (Ping timeout: 255 seconds)
09:28:38*FreeArtMan quit (Ping timeout: 265 seconds)
09:35:39*woadwarr_ quit (Ping timeout: 245 seconds)
09:41:10*FreeArtMan joined #nim
09:41:29*avsej joined #nim
09:41:29*avsej quit (Changing host)
09:41:29*avsej joined #nim
09:44:05*Sentreen quit ()
09:46:27*FreeArtMan left #nim ("=P")
09:56:30scoeriis there a page where I can get an overview of all the possible AST nodes and their constructors?
09:59:24*Sembei quit (Ping timeout: 256 seconds)
10:01:23scoeriI think I found it in the macro module documentation
10:06:36*zikolach joined #nim
10:09:56*woadwarrior joined #nim
10:11:48*woadwarr_ joined #nim
10:11:56*Ven joined #nim
10:13:33*Sembei joined #nim
10:14:21*woadwarrior quit (Ping timeout: 244 seconds)
10:19:06*Sentreen joined #nim
10:22:20*datanoise joined #nim
10:24:14*Arrrr joined #nim
10:26:54*datanoise quit (Ping timeout: 245 seconds)
10:27:25*zikolach quit (Ping timeout: 250 seconds)
10:33:50*JinShil joined #nim
10:38:43*Sembei quit (Ping timeout: 265 seconds)
10:40:10*zikolach joined #nim
10:45:26*cornusammonis joined #nim
10:47:20*datanoise joined #nim
10:47:57*datanoise quit (Client Quit)
10:48:20*Tennis joined #nim
10:48:34*cornus_ammonis quit (Ping timeout: 245 seconds)
10:48:44*Tennis quit (Changing host)
10:48:44*Tennis joined #nim
10:49:24*boopisaway is now known as boop
10:51:30*jm116__ quit (Ping timeout: 252 seconds)
11:04:55*tennix quit (Remote host closed the connection)
11:05:53*tennix joined #nim
11:11:57*dddddd joined #nim
11:13:53*Sentreen quit ()
11:20:15*Sentreen joined #nim
11:20:56*miraclesu joined #nim
11:25:28*miraclesu quit (Ping timeout: 246 seconds)
11:29:32*zikolach quit (Read error: Connection reset by peer)
11:29:51*ddl_smurf joined #nim
11:30:10*zikolach joined #nim
11:31:07*tennix quit (Remote host closed the connection)
11:35:38EastBytehello there
11:36:03EastBytewhy is \n not allowed as character literal?
11:38:25*zikolach quit (Quit: Leaving)
11:38:39*zikolach joined #nim
11:39:16ArrrrEastByte, use \l
11:39:42ArrrrI dont recall the reason behind this
11:40:56*JinShil quit (Quit: Konversation terminated!)
11:41:40EastByteokay I will, thanks
11:48:52*zikolach quit (Ping timeout: 265 seconds)
11:49:18*so joined #nim
11:50:26*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:54:42*zikolach joined #nim
11:54:52dom96_EastByte: it's two characters on some platforms
11:55:02dom96_Arrrr: ^
12:01:46*Ven joined #nim
12:02:35*Ven quit (Client Quit)
12:20:33EastBytewell that makes sense
12:23:16afiskonAre threads in Nim usual OS threads or Go/Erlang-style lightweight threads with scheduler, user space context switches etc?
12:25:43gokrOS threads
12:26:36gokrBut if you use say spawn with threadpool - they are quite fast (since you don't recreate them all the time). My socket server article demos that.
12:27:20*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
12:28:01*zikolach quit (Ping timeout: 256 seconds)
12:28:48afiskongokr, Thanks. I believe you are talking about this article? http://goran.krampe.se/2014/10/25/nim-socketserver/
12:28:55gokryes
12:29:26*davidhq joined #nim
12:32:19afiskonAnd what about IO? Is it sync, async or it depends?
12:32:26*zikolach joined #nim
12:32:42gokrIt depends, there is an asynch framework if you want.
12:33:09gokrdom96 wrote it, he knows more :)
12:33:53*davidhq quit (Ping timeout: 246 seconds)
12:35:05*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
12:36:09*Ven joined #nim
12:36:30*coffeepot joined #nim
12:36:44*zikolach quit (Ping timeout: 252 seconds)
12:36:52afiskonhttp://nim-lang.org/docs/asyncdispatch.html - I see there are Futures in Nim. Its quite a substitution for lightweight threads as I understand.
12:37:30*zikolach joined #nim
12:42:36*zikolach quit (Ping timeout: 252 seconds)
12:43:19*Ven quit (Ping timeout: 276 seconds)
12:44:41pigmejafiskon: yup it's async :)
12:44:55dom96_afiskon: yep, we've got async via epoll (on linux) and iocp on windows
12:45:09dom96_Async await ala C# too.
12:45:20pigmejand python 3.5+
12:45:23*zikolach joined #nim
12:46:09dom96_and all the other languages which copied C# :P
12:46:51pigmej;]
12:54:06taotetekI like this poll loop abstraction - very nice
12:54:24taotetekenjoying nim quite a bit so far.
12:57:43afiskonsame here. One thing I can't figure out so far - how to create trait/interface in Nim
12:58:22*zikolach quit (Ping timeout: 272 seconds)
13:00:20dom96_afiskon: http://nim-lang.org/docs/manual.html#generics-concepts
13:04:28afiskondom96_, it looks like concepts are a bit more powerful than traits/interfaces/type classes in haskell. right?
13:05:00dom96_yeah, I think in some ways they are.
13:10:08*zikolach joined #nim
13:16:36scoerican somebody explain why the above code compiles and the bottom code doesn't # http://pastie.org/10233158
13:16:43*zikolach quit (Read error: Connection reset by peer)
13:17:47scoeriI'm struggling to create a macro that accepts a variable amount of expressions
13:18:27scoeriand accepts undefined identifiers as arguments
13:18:37*kumul joined #nim
13:19:35*TEttinger quit (Ping timeout: 256 seconds)
13:21:51ozracornusammonis: reactormonk: saw the earlier discussion about template recursion, was thinking this might be somewhat related? : #2859
13:22:17ozraI mean.. https://github.com/Araq/Nim/pull/2859
13:23:35*zikolach joined #nim
13:25:17afiskonIs there any roadmap like "release 1.0 in may 2016" or something similar?
13:25:27*Ven joined #nim
13:35:57*davidhq joined #nim
13:37:11*Sembei joined #nim
13:45:14*avsej quit (Ping timeout: 245 seconds)
13:50:04NfNitLoopWas talking about {.noforward.} in here yesterday. Didn't seem to work for me. If I'm reading this correctly, the test for it is disabled: https://github.com/Araq/Nim/blob/devel/tests/misc/tnoforward.nim So... that would explain things. :p
13:52:23*pregressive joined #nim
13:54:05*xcombelle joined #nim
13:57:28*pregressive quit ()
13:57:49*aziz joined #nim
13:58:44*pregressive joined #nim
14:00:58azizHi! Nim should be theoretically able to compile for the ARM architecture via C. Has this been tried and is it possible to write code as part of an Android app?
14:02:38*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:04:02*banister joined #nim
14:05:19*anthgur joined #nim
14:05:31*ggVGc joined #nim
14:05:51ggVGcwhat's the difference between var and ref arguments to a proc?
14:09:33*gokr quit (Quit: Leaving.)
14:15:14*Sentreen quit ()
14:15:45aziznew to Nim, but I know about compiler construction. A ref parameter is basically a pointer to the argument passed to the proc, which means that assigning to it will change the contents of the variable outside. The argument will also have to have a location (stack or heap), so you can't pass null to the proc.
14:18:10ggVGcaziz: sure, but how is "var" different then?
14:18:18ggVGcto me they both seem to be "modifiable references"
14:18:51azizonly for objects, because they are passed as a pointer behind the scenes
14:18:53ggVGcit eve sais says in the doc that a var argument is just implemented as a pointer
14:18:59ggVGcah, okay
14:19:44*milosn joined #nim
14:19:54azizalso assigning to a var inside the proc will not modify the variable of the caller
14:22:35*pregressive quit (Remote host closed the connection)
14:22:38ggVGcaziz: you sure? This prints '20' for me, https://gist.github.com/6cc19201d552e99ec713
14:22:52azizI have to say that Nim is so much cleaner than the D programming language, which also turned into a Frankenstein monster, yet not as horrifyingly bad as C++.
14:23:27*Ven joined #nim
14:23:39azizggVGc, wow, okay, so the docs are correct
14:24:16ggVGcwell, that's because D tried to be a C++ "with better syntax", while Nim is trying map quite closely to C
14:24:23ggVGcwhich imo is a much better plan
14:24:36ggVGcaziz: seems to me that var/ref only matters for value types
14:25:09ggVGca ref int and a var int is very different, but since objects are always passed by ref(it seems), ref/var is the same for object types
14:25:16ggVGcbut I'm basically guessing now
14:25:22ggVGcbecause I can't find docds on ref params
14:25:23azizD is actually way more than a C++ with better syntax.
14:25:47azizlet me try compiling some code
14:26:18ggVGcaziz: what I meant is that walter seems to have been quite into the type system and object model of C++, and attempted to improve it, while Nim stuck with the simplicity that is C
14:26:34ggVGcbut I haven't been following D since about 7 years ago
14:26:36azizjust installed Nim a few minutes ago. thought I'd give it a chance because it's really appealing in many ways.
14:26:53ggVGcI used to hang out in ##D here on freenode, but that was like 10 years ago now
14:27:08aziza long time
14:27:19azizI haven't been following it for 1.5 years now
14:27:50*zikolach quit (Remote host closed the connection)
14:27:54azizI started writing a compiler for it years ago and eventually got stuck with the semantic analysis
14:28:07ggVGcto me D seems to have wanted to be a better variant of the C++/Java/C# type of languages, and imo that whole family is rotten at the core
14:28:14azizI got so very tired of it and just left it collecting dust
14:28:23ggVGcwhy did you start writing a D compiler?
14:28:37azizfor the learning experience
14:28:46azizand it did teach me alot
14:28:49ggVGcwhy D out of all possible choices?
14:29:09azizI can understand new languages very quickly because I know how compilers work
14:29:11ggVGcit seems like a very big project for writing your first compiler. Or maybe you've written compilers before that?
14:29:23azizNim wasn't really an option back then
14:29:36azizno, my first attempt
14:30:11azizI put my hopes and dreams on D
14:30:16*Ven quit (Read error: Connection reset by peer)
14:30:37azizas time passed though I started to realize that it was getting uglier and uglier
14:31:16*pregressive joined #nim
14:31:23aziz*as time was passing
14:31:33ggVGcfrom the D homepage, this is why I said it seems like a strange choice for writing a first compiler, " D offers classic polymorphism, value semantics, functional style, generics, generative programming, contract programming, and more—all harmoniously integrated"
14:31:57ggVGcit's just a fucing huge project to implement all that semantics, and D doesn't have very easy to parse syntax either
14:34:50azizdoing the lexer was the easiest but the bigger challenge for me was writing the parser. never did it before so the path was very steep in the beginning.
14:35:27azizeventually I got the hang of it, and I believe I did a far better job than the ref compiler did
14:36:43azizfor example, I could actually try a parse function and reject or accept the output if there was an error or not
14:37:01azizand it backtracked automatically
14:37:12*ingsoc quit (Read error: Connection reset by peer)
14:38:37azizWalter had all these duplicated funcs for the actual parsing funcs as a way to test whether it was a Declaration for example
14:39:47*Ven joined #nim
14:40:34azizmade the error msges even multilingual, because I could and cause I'm sure it would help out devs with other native languages especially when they are beginners
14:44:01*woadwarr_ quit (Quit: Textual IRC Client: www.textualapp.com)
14:45:49*Ven quit (Read error: Connection reset by peer)
14:48:36*Ven joined #nim
14:52:07*milosn_ joined #nim
14:52:09pigmejreactormonk: ping
14:52:42*milosn quit (Read error: Connection reset by peer)
14:52:56azizggVGc, always passing integral types like int doesn't seem very efficient to me. This certainly affects performance.
14:53:21*Ven quit (Read error: Connection reset by peer)
14:53:55azizggVGc, as a pointer I mean
14:54:34*vikaton joined #nim
14:59:45*shodan45 joined #nim
15:04:00ozraaziz: Well, D 10 years ago might have been simpler to implement ;)
15:04:15aziznot even then haha
15:04:31ozraaziz: ggVGc: If you don't use var in the param, it should be compile time error trying to modify it, *me thinks*
15:04:44azizozra, oh interesting
15:05:03ozraby default params a immutable constrained
15:05:08ozra*are*
15:05:27azizbut then I'm not sure any longer what the difference between var and ref is
15:05:33ggVGcright
15:05:36ggVGcwhich was my original question
15:06:12ozraaziz: var gives ok for modifying the argument in the proc.
15:06:45azizand ref does, too, no?
15:06:50ggVGcbut now i I have another one. How do I get export a nim type to C fully, i.e so the header contains all fields, rather than a forward declaration
15:07:02ggVGc-get
15:07:04azizapparently not, I tested it
15:07:06ozraNo, ref just passes the data by ref instead of by value
15:07:20ozraIt's constrained to read only
15:07:34*Ven joined #nim
15:07:42azizwow, I would have expected it to be the other way around
15:07:45ozraKeeps your code safer . It's like the reverse of C/C++ const ;-)
15:08:01azizozra, that's really great!
15:08:12ozraaziz: Arguably the keyword should be 'mut'..
15:08:19ozraperhaps less confusion
15:08:36*Ven quit (Read error: Connection reset by peer)
15:08:37ozraaziz: Yeah, it's a nifty language :-)
15:09:16azizthat's the way D wanted to be but that train was already gone by then
15:10:53ozraggVGc: Haven't tried that yet.. http://nim-lang.org/docs/theindex.html is a good start for searching things..
15:10:54azizare there plans for changing ref to mut?
15:11:09*gokr joined #nim
15:11:13ozraaziz: No, that's just something I thought of now...
15:11:44ggVGcaziz: that would break shitloads of code, so I assume no
15:11:47ggVGcfor like no benefit
15:12:17ozraJust think of it like "may _var_y" or something ;)
15:12:21azizold code could be converted by a tool that parses the sources and replaces the keywords
15:12:36ddddddddi cant remember who was working on some type safe sql, but imo this is the way to do it: http://fsprojects.github.io/SQLProvider/general.html
15:12:51Arrrrmaybe coffeepot
15:13:03dddddddd100% type safe , types generated at compile time from the database, with FK support etc
15:13:23azizozra, I've been musing on it, var is just a variable which may change, and ref is a reference to an immutable argument, because immutability is the default
15:13:44ozraaziz: There is a tool for upgrading code, nimfix. Pre 1.0 I think it would be good to change some things in one go (so everyone can do one fix up), as not to get C++ deseases for the rest of the future after 1.0... But it's up to the Wizards of Nim.
15:15:13azizozra, can be very useful in case a wrong or better decision was made
15:15:34ozraYeah
15:15:40azizbut I'm okay with ref now, because I didn't know that parameters were immutable by default
15:16:42ozraCool.
15:16:56azizI love how Nim is similar to Python in syntax. it's so elegant and way more readable than C/C++/D crap
15:17:33ddddddddimmutability by default is a good thing
15:17:46ozraaziz: Deffo! I've been coding C++ for 16 years, and from time to time tried to find an alternative. This is the first! I'm just a few weeks in playing with it :)
15:18:05ozradddddddd: Deffo! :)
15:18:46ddddddddi wish nim had more of a functional focus :(
15:19:24azizozra, hope it's not gonna disappoint :)
15:19:31Arrrrwhwat functional feature are you missing dddddddd
15:19:56ozradddddddd: It's not hard to code functional. Use "future" mod for shorthand lambda notation. And, well.. code away :)
15:19:58ddddddddplenty, but pattern matching with better ADT syntax are the main one
15:20:11ozradddddddd: Yeah pattern matching would be nice :)
15:20:14dddddddd+ more immutability support
15:20:29ozradddddddd: More? How?
15:21:42ddddddddyou can do any sideeffect you please, so you are not really immutable
15:21:47ddddddddeven if the 'ref' is immutable
15:21:49ozraaziz: As always you have your gripes, still it blows C++ away :)
15:22:02azizabsolutely
15:22:05ddddddddyou can still do, seqx.add(x)
15:22:13aziznot that hard to do honestly hehe
15:22:36ozradddddddd: Yeah, I'd like to see the func keyword make a proc which is pure functional (no mutation, globals etc. allowed in it)
15:22:57*kumul quit (Ping timeout: 250 seconds)
15:23:02ddddddddid like to be able to restrict it as much as haskell :)
15:23:13Arrrrthat's too much
15:23:22ddddddddi mean, with qualifiers
15:23:42ozradddddddd: https://github.com/Araq/Nim/issues/2716
15:24:26ozradddddddd: I haven't coded too much Haskell, been to a few seminars, since most of my coding requires imperative (with todays compilers)
15:24:57ddddddddyou can do imperative with haskell
15:25:03ddddddddio + do notation
15:25:42*ChrisMAN joined #nim
15:25:47ozraI'm aware of that, I mean for performance, not out of "want".. and the C* compilers are the optimal still to this day (yes, surpassed Fortran also)
15:26:43ozraWhich makes Nim a great option for me :)
15:26:54vikatonw0w
15:27:05vikatonI just got $100 in DigitalOcean 4free
15:27:10azizisn't compiling to LLVM code a better option?
15:27:46azizozra, that means that you can write Android apps, or parts thereof, in Nim, doesn't it?
15:28:29*johnsoft quit (Ping timeout: 258 seconds)
15:28:58*kumul joined #nim
15:29:04ozraaziz: One of the things that attracted me to Nim is that it does _not_ go the LLVM route. It would be great to do that _too_. But I like this way since there are more target options, and gcc is currently faster than clang for my projects. But I can see clang/llvm surpassing gcc soon, so it won't be an issue for long. Still yet, I find C as perfect modern assembly (given that you utilize certain compiler specific pragmas and don't stick to
15:29:08ozra...lang)
15:29:11*johnsoft joined #nim
15:29:35ozraaziz: Yeah, I think there was someone here on the IRC that does that - not sure..
15:29:47ArrrrYeah, pattern matching would be useful to have. I have the secret hope that someday ozra will pr it
15:30:15azizozra, yeah as long as gcc is faster than llvm it makes sense to compile to C
15:30:21ozraArrrr: Haha, I think it's beyond my capabilities (given time constraints)
15:30:48ozraaziz: And then also for different obscure targets like your favourite kitchen toaster..
15:31:23azizor the microwave oven :)
15:31:46ozraaziz: Oh those are dangerous, dooom! Dooom I tell you! ;)
15:33:35azizA guy who knows his stuff actually modified his microwave and managed to get it to oat with fruits in a perfect way
15:33:47aziz*get it to cook
15:34:14ozra"cook with gay people"? haha
15:35:24azizsounds fabulous
15:35:59ozraTime to get some coding done. later folks
15:36:27wuehlmauswhat i love about nim is that i can use --cc:tcc and this is sooo fast for trying out stuff :)
15:37:47azizwuehlmaus, what does it do?
15:37:56wuehlmausit uses the tcc compiler
15:38:07wuehlmausand tcc is the fastest c compiler that i know
15:38:20wuehlmausdone by a genius :)
15:38:29wuehlmausBellard did ffmpeg and qemu, too :)
15:38:59wuehlmaushttp://en.wikipedia.org/wiki/Fabrice_Bellard
15:38:59azizwish C had modules then it would be even faster
15:39:08azizI mean the compilation process
15:43:10wuehlmaushttp://en.wikipedia.org/wiki/Tiny_C_Compiler
15:46:11*pregressive quit (Remote host closed the connection)
15:46:43azizwuehlmaus, why is it not the default C compiler?
15:48:28*anthgur quit (Quit: My Mac has gone to sleep. ZZZzzz…)
15:48:31wuehlmaussoe trade offs as mentioned in the wiki article
15:48:46wuehlmausbut it's very, very cool while trying out stuff :)
15:48:59*milosn_ is now known as milosn
15:50:32ggVGcyep tcc is great
15:53:15azizshould only make a difference when compiling huge projects, no?
15:53:39ggVGcaziz: or as wesaid, when testing out stuff
15:54:16azizdon't understand how tcc helps with that
15:54:16coffeepotcan anyone help me here? If I have an array[arrsize, byte] and need to pass it to a C call as an untyped pointer (for a buffer), can I just use addr(myarray)? 'Cos this doesn't seem to work :/
15:54:48*pregressive joined #nim
15:56:25Arrrrmaybe myarray[0].addr ?
15:57:18coffeepotArrrr good idea, unfortunately still confusing the C call :(
15:57:45Arrrrwhy
15:58:38coffeepotI'm trying to get SQL to accept string parameters but it's just returning garbage, though reading the string back in nim it's fine
15:59:03coffeepoti thought it was a unicode issue at first but now I'm starting to think it's something funky with the address of the array
16:00:11*afiskon quit (Quit: Leaving)
16:00:45coffeepotI had better luck with string -> cstring, I think I'll try that for a buffer instead...
16:01:01*aziz quit (Remote host closed the connection)
16:03:55*dalarmmst joined #nim
16:03:59coffeepotnope, still garbage, ahhh leave till tomorrow i think. Thanks Arrrr
16:05:10*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
16:29:49*yglukhov________ quit (Ping timeout: 264 seconds)
16:30:06*darkf quit (Quit: Leaving)
16:30:25*yglukhov________ joined #nim
16:31:22*yglukhov________ quit (Client Quit)
16:34:31*dddddddd quit (Ping timeout: 246 seconds)
16:40:05*Tennis quit (Quit: Leaving)
16:50:31*Jesin joined #nim
16:51:33*kas joined #nim
16:51:40*pregressive quit (Remote host closed the connection)
16:51:56*vbtt_ quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
16:53:27*pregressive joined #nim
16:57:39*brson joined #nim
16:59:36*dddddd_ joined #nim
16:59:53r-kuhow c2nim is supposed to be built? i get c2nim/c2nim.nim(11, 42) Error: cannot open 'compiler/llstream'
16:59:59r-kuthis kind of stuff really should be in docs..
17:00:08*shodan45 quit (Quit: Konversation terminated!)
17:01:59reactormonkpigmej, pong
17:14:02*Sembei quit (Ping timeout: 256 seconds)
17:18:34reactormonkozra, I have to admit I've never seen a coder that and also write well
17:19:09reactormonkr-ku, yeah, compiler stuff still sucks via nimble, if you wanna poke someone about it, go for dom96_
17:19:51ozrareactormonk: Eh?
17:19:52r-kuthing is im not using nimble, i checked c2nim repo out to Nim's repo dir, it made most sense
17:19:57r-kustill cant compile though
17:21:11reactormonkozra, I like your arguments.
17:21:23reactormonkr-ku, really? muh.
17:21:30wuehlmaushow can i get ``nim doc`` to generate the html in a certain directory?
17:21:34ozraHaha, ah, ok. Thanks.
17:21:54gokrr-ku: That sounds familiar
17:22:03reactormonkr-ku, just yesterday nimble build in the c2nim directory worked
17:22:18gokrr-ku: Did you actually install nim? Or did you just add it to your PATH?
17:22:37r-kugokr: as per Araq's instructions i put it on PATH and uninstalled from /usr/local
17:22:42r-kustill doesnt help
17:22:44reactormonkwuehlmaus, does help show you anything? Otherwise I'll dig the source real quick
17:23:10gokrThat llstream stuff is from compiler - so...
17:23:11reactormonkr-ku, try nimble build in the c2nim repo
17:23:33gokrI think dom96 or someone turned that into a nimble package, and I guess c2nim nimble package has it as dep?
17:24:00*mgee joined #nim
17:24:01*mgee left #nim (#nim)
17:24:04wuehlmausreactormonk: perhaps i was missing something
17:24:17reactormonkr-ku, I'll fix the c2nim readme
17:24:30wuehlmausbut it's a bit hard if you generate /usr/lib/nim files as non root :)
17:24:54wuehlmausand i seem to miss a -o
17:25:11reactormonkwuehlmaus, you can probably adjust your package-building program to move them
17:27:06r-kuam i supposed to clone c2nim repo and run "nimble build" inside that dir?
17:28:02r-kucause doing that nimble checks out compiler but trying to build it results in cparse.nim(146, 11) Error: undeclared field: 'next'
17:28:28reactormonkr-ku, added documentation
17:28:40reactormonkor not, fucking git https remotes
17:29:15r-kuhmm yeah noticed last commit is day old ;)
17:30:05reactormonkwuehlmaus, lemme check
17:31:59r-kudeleting old c2nim and cloning new one made nimble build work. thanks for help
17:32:43reactormonkwuehlmaus, apparently you can make it output to stdout
17:32:45*Matthias247 joined #nim
17:32:57wuehlmausah, that would be sufficient
17:33:48reactormonkwuehlmaus, there's also doc2, but I have no idea what the difference is
17:34:01*yglukhov________ joined #nim
17:35:03wuehlmausi tried 'nim doc file.nim -' , that didn't work :)
17:38:14*pregressive quit (Remote host closed the connection)
17:39:07wuehlmausah, -dump
17:39:35dddddd_is there a way to push : noSideEffect: off
17:39:52dddddd_or not even push it, just mark it as off
17:42:11reactormonkdddddd_, you just add a sideeffect?
17:45:09*Guest68501 is now known as avsej
17:45:38*avsej is now known as Guest49008
17:46:19*Guest49008 is now known as avsej_
17:46:21*avsej_ quit (Changing host)
17:46:21*avsej_ joined #nim
17:47:19wuehlmausreactormonk: i don't get it, tried all kinds of commands
17:48:02dddddd_reactormonk: im pushing on all my modules nosideeffect
17:48:09dddddd_and just want to disable it for specifics
17:48:22dddddd_its a pain with push pop
17:48:23reactormonkdddddd_, I don't think that's how push works
17:48:29dddddd_what?
17:48:34dddddd_it definitly is
17:49:19dddddd_.push nosideeffect works
17:49:43dddddd_then id like to push nosideffect: off, but.. its not possible
17:49:46dddddd_anyway bbl
17:50:59reactormonkwuehlmaus, try --stdout
17:51:50wuehlmausah, thanks for looking it up
17:51:50reactormonkdddddd_, not sure if the compiler is smart enough to deal with the inverse logic pushes
17:52:00reactormonkwuehlmaus, it's just a guess.
17:53:46wuehlmausit just worked :)
17:54:06wuehlmausso it really solves my problem
17:54:15wuehlmausredirection
17:54:37reactormonkwuehlmaus, I guessed that from the fact that it checks for gStdout
18:00:34ozradddddd_: As reactormonk said, it's not push prob, it's that nosideeffect is an atomic term, so to speak. No reversing. I can see from your use case how the reverse would be useful though.
18:02:29dddddd_thats what im sayting
18:02:40ozraozra: And a great role model for coding!
18:04:54reactormonkdddddd_, then create an issue
18:05:04*glurp joined #nim
18:06:24*glurp quit (Client Quit)
18:06:28*pregressive joined #nim
18:35:56*kas quit (Ping timeout: 258 seconds)
18:46:38*wuehlmaus quit (Quit: Lost terminal)
18:48:31*aziz joined #nim
18:49:17*NimBot joined #nim
18:53:57*xet7 quit (Quit: Leaving)
18:56:49*Arrrrr joined #nim
18:58:11*Arrrr quit (Ping timeout: 276 seconds)
18:58:27*wuehlmaus joined #nim
18:59:13*milosn quit (Ping timeout: 264 seconds)
19:00:28*milosn joined #nim
19:05:42*afiskon joined #nim
19:07:12pigmejreactormonk: hey
19:07:37reactormonkpigmej, sup, currently RL-grinding
19:08:41pigmejjust finished my supper
19:08:42pigmej:)
19:08:55pigmejand I think I will code some nim-mode ;D
19:09:05afiskonI have some problems installing nimsuggest http://paste.ubuntu.com/11691787/ As I understand there is no nim version 0.11.3 so far. Any ideas how to solve this issue?
19:09:17reactormonkpigmej, your time to shine ^^
19:10:22afiskonOr nim 0.11.3 == nim in devel branch?
19:11:30pigmejreactormonk: nah... I just like to have nice tools:P
19:11:47reactormonkpigmej, I mean in terms of helping afiskon >:)
19:12:35pigmejah :D
19:12:57pigmejreactormonk: I think nimbot has to learn nimsuggest questions;P
19:13:05pigmejafiskon: so, clone nim repo
19:13:30pigmejafiskon: then goto compiler/nimsuggest
19:13:47pigmejthen nim c -d:release nimsuggest.nim
19:14:02pigmejand then copy nimsuggest to THE SAME bin directory where nim resides
19:16:34afiskonpigmej, thanks a lot!
19:16:36*rgv151 joined #nim
19:17:11pigmejreactormonk: ah I have one problem with your nim-mode.el
19:17:27pigmejis there any way to hide message about dirty file ?
19:17:35afiskonnow I have another problem - core dump in aporia when using goto definition :) I believe I stick with vim for a while :)
19:18:00pigmejbecause everytime epc does something, I have mess in echo area
19:18:08pigmejafiskon: ouch
19:19:10reactormonkpigmej, huh? The writing file part?
19:19:15reactormonkpigmej, ask in #emacs, I dunno.
19:19:47*aziz quit (Remote host closed the connection)
19:19:51pigmejI just found some dirty hacks with defadvice that temporary disables echo area ;D
19:20:37reactormonkpigmej, Normally, write-region displays the message ‘Wrote filename’ in the echo area. If visit is neither t nor nil nor a string, then this message is inhibited. This feature is useful for programs that use files for internal purposes, files that the user does not need to know about.
19:20:46reactormonkpigmej, read doc first, apply hacks later
19:21:26pigmejreactormonk: ....
19:21:38pigmejmy elisp fu is weak ;d
19:22:05reactormonkthat's not elisp, that's reading doc
19:22:22pigmejI searched for it already...
19:22:28pigmejehs;/
19:22:34reactormonk:-(
19:22:41reactormonkYeah, apparently it's called "echo area" not message :-/
19:22:51reactormonk(write-region (point-min) (point-max) filename nil 1)
19:22:53reactormonk^ there we go
19:22:58pigmejso
19:23:03pigmejyou already use it in taht way:D
19:23:08pigmej(write-region (point-min) (point-max) filename) nil 'foo)
19:23:13pigmejand it still messeas with echo area
19:23:21reactormonknope, check parens
19:23:49pigmejahs
19:23:52reactormonkoh fuck, I messed up the parens
19:23:54reactormonkmy faul.
19:24:06reactormonkjust move the parens at the end by two.
19:24:10pigmejyeah
19:24:11pigmej;D
19:24:11reactormonkif you have paredit-mode (recommended)
19:24:15pigmejI do :)
19:24:20pigmejC-arr
19:24:30pigmejthough I have no idea how to "delete" ()
19:24:41reactormonkctrl-right
19:24:45reactormonkehh alt-right
19:25:00reactormonkalt+up: delete parens
19:25:04reactormonkalt+down: delete parens & content
19:25:08reactormonk... or the other way round
19:25:11pigmejk
19:25:17pigmejI was unaware of "up/down" then :)
19:26:04reactormonkcheck C-h m
19:26:09reactormonkthen C-s paredit
19:28:38pigmejk
19:28:49*afiskon quit (Quit: Leaving)
19:34:59*sepisoad joined #nim
19:37:21*gokr quit (Quit: Leaving.)
19:39:24*TEttinger joined #nim
19:39:57ozraAnyone know if there's a way to test expected failure of lexing, like `compiles()` does for expressions?
19:41:31reactormonkozra, use case?
19:41:44ozraunittest of the lexer :)
19:41:46reactormonkah, for tests. Yeah, there's a few of those IIRC
19:41:52reactormonkcheck tests/
19:42:04ozraalright, digs..
19:42:41reactormonkozra, there's a few that check for compiler output
19:43:03ozraYes, I'll opt for that - thanks
19:47:17*Arrrrr quit (Quit: WeeChat 1.2)
19:49:24*rgv151 quit (Quit: Leaving...)
19:56:01*kas joined #nim
20:10:23Varriountonionhammer: Found any NimLime bugs in ST3?
20:13:45ozradom96_: around for a quick quiz? Blame check ;)
20:14:09dom96_sure
20:14:43ozradom96: in lib/pure/terminal.nim - this should really be unsigned, no? `0x8000'i16 # COMMON_LVB_UNDERSCORE`
20:16:15dom96_why?
20:17:48ozraStumbled upon it because of my fixes to the literal lexer (above hex would become -1 in i16, is that intended?) in that case it's the question if this edge case should be allowed for creating -1's. I was pondering it while coding, but thought "why not use '-0x1' in such cases?"
20:18:18ozraAlso: 0b10000000'i8 - same thing..
20:19:00dom96_I don't think that matters. It's just a flag.
20:19:22ozraI'm guessing it should be u16 then?
20:19:54*gokr joined #nim
20:20:13*kas quit (Ping timeout: 264 seconds)
20:21:19dom96_Unsigned numbers are discouraged in Nim, so I would say no.
20:21:31vikatonwhy are they discouraged
20:21:59dom96_vikaton: Check the unofficial FAQ
20:22:00ozradom96_: If I change it, it compiles and tests pass...
20:22:14dom96_ozra: oh, is it broken?
20:22:18ozraThis is an exception, since it's bit fiddling I guess.
20:23:13ozraYes, after my fix to the lexer, it's broken, because the code in fact is 'wrong' (32768 does not fit in i16), but the lexer didn't catch that before...
20:24:49ozraIn this particular case it works in practise because it only looks at the bits, the real number there is -1 instead of 32768
20:25:38ozraI'll just change it to u16 and call it a day :)
20:26:07dom96_might want to ask Araq
20:26:12ozradom96_: Unless the beaviour i wanted?? (I can see reasons for that too)
20:26:21ozradom96_: Yes, good idea!
20:26:27dom96_If it breaks stdlib code then it also breaks code in the wild
20:26:40dom96_So your patch needs to be reviewed by the BDFL :P
20:27:41ozradom96_: Yes :) It only breaks -1 expressed as overflowing positive numbers.
20:29:19*sepisoad quit (Ping timeout: 250 seconds)
20:29:59dom96_I don't think the hex representation of numbers should have the notion of a negative or a positive.
20:31:47*kumul quit (Ping timeout: 276 seconds)
20:34:46pigmejhmm
20:35:02pigmejreactormonk: SIGSEGV: Illegal storage access. (Attempt to read from nil?)
20:35:03pigmej
20:35:03pigmejProcess epc:server:6 exited abnormally with code 1
20:35:11reactormonkpigmej, fuck.
20:35:15reactormonkcompile with debug?
20:37:20pigmejhmm
20:39:23pigmejreactormonk: http://wklej.to/yS3wa/text nimsuggest --stdin /tmp/{this_file}
20:39:24ozradom96_: Elaborate?
20:39:30pigmejcrashes instantly
20:39:37reactormonkpigmej, fuck
20:40:02ozradom96_: Meaning that their more of 'bit-setting' then number represantations?
20:40:07dom96_yeah
20:40:36pigmejreactormonk: I will recompile Nim to be sure :D
20:40:54ozraOk, then I change the behaviour so that it's allowed as long as the literal gives a unique bit pattern that fits in the data type.
20:44:12pigmejdom96_: what's currently the right way of using nimsuggest ?
20:44:29pigmejusing 'old' way returns compiler/nimsuggest/nimsuggest.nim(12, 8) Error: This project has moved to the following repo: https://github.com/nim-lang/nimsuggest
20:44:42dom96_ozra: Ask Araq please. I'm by no means an expert on these matters.
20:44:57pigmejand using repo throws exception as usually
20:45:02dom96_yeah, the new way needs to be fixed.
20:45:29pigmejbecause I got SIGSEGV on nimsuggest
20:45:31dom96_You can move ~/.nimble/pkgs/nimsuggest-ver/nimsuggest to $nimLoc/bin/ as a workaround
20:45:34pigmejand I wanted to chceck
20:46:06dom96_Nimsuggest needs to search for the nim stdlib
20:46:09pigmejhmm
20:46:17ozraAraq: Are you around? Decision needed on the edge case whether 0x80'i8 == - 1, 0x8000 == -1, etc. should be ok.
20:46:50ozra* 0x8000i16 == -1 *
20:47:00*xcombelle quit (Remote host closed the connection)
20:47:56pigmejdom96_: no it's still broken
20:48:29pigmejI have nimsuggest in $nimLoc/bin/
20:48:32dom96_You sure you're calling the right one?
20:48:37dom96_check 'which nimsuggest'
20:48:42pigmejad it throws Error: unhandled exception: cannot open: lib/system/inclrtl.nim [IOError
20:48:47pigmejdom96_: I'm using full path
20:48:55pigmejso yes, correct one for sure
20:49:16pigmejI have to enter $nimLoc
20:49:25pigmejsome paths are messed up
20:49:46pigmejwhen I will execute nimsuggest from $nimLoc then it works (still SIGSEGV but works)
20:49:52pigmejin any other location => crash
20:50:34pigmejand taht SIGSEGV of nimsuggest is: http://wklej.to/ILT8J/text
20:50:53dom96_yeah, you have to do that too
20:51:07pigmejdom96_: prety useless then ?
20:51:34pigmejI mean, then I need hacks around PATH and make wrappers
20:52:10dom96_Yes, it's a bug.
20:52:14dom96_It needs to be fixed.
20:52:25dom96_The old version needed that too
20:52:36pigmejdom96_: ok so that's the firt 'bug' what about that SIGSEGV ?
20:52:45pigmejdom96_: nope old version worked fine from any directory
20:52:47Araqozra: yeah I think that's fine
20:52:55dom96_pigmej: No idea
20:53:03pigmejAraq: http://wklej.to/ILT8J/text
20:53:26ozraOk, cool. I'll push the change soon along with the tests.
20:54:05Araqpigmej: well?
20:54:29pigmejAraq: http://wklej.to/k5QcJ
20:54:35pigmejnimsuggest segfaults on this file
20:54:44pigmej(anoter demo file from internet)
20:55:13pigmejI'm too noobish to fix it.
20:55:16dom96_pigmej: what are you sending to nimsuggest?
20:55:23pigmejdom96_: that's the thing
20:55:24pigmejnothing ;)
20:55:29pigmejit crashes just on start
20:55:43dom96_Report it on github
20:55:44pigmejbin/nimsuggest --stdin /tmp/blah.nim
20:55:52pigmejand bum
20:56:05Araqthere is a --debug switch or something
20:56:23pigmejAraq: it doesn't even enter nimsuggest
20:56:30pigmejit crashes before nimsuggest fully load
20:56:46Araqaye, well 'assert not carl.dead' is wrong
20:57:01Araqthe compiler will likely crash on that too then
20:57:12Araqso it's not nimsuggest's fault :P
20:57:17pigmejsegfault
20:57:38pigmejbtw if it's another 'broken code' then http://nim-by-example.github.io/ is full of broken codes
20:58:36pigmejbut yeah removing assert not carl.dead
20:58:41dom96_pigmej: Ty tez jestes z polski? :O
20:58:49pigmejdom96_: ....
20:59:04pigmejczesc :)
20:59:07dom96_hah
20:59:11dom96_fajnie.
20:59:25dom96_Anyway, you should tell flaviu about this.
20:59:41pigmejabout nim-by-example ?
20:59:43dom96_(Moze czas zrobic #nim-pl? :P)
20:59:51dom96_yeah
20:59:57dom96_There is a repo for it
21:00:26pigmejk I will try to remember about that then.
21:00:41pigmejdom96_: anyway, Error: unhandled exception: cannot open: blah.nim [IOError]
21:00:51dom96_https://github.com/flaviut/nim-by-example
21:01:11pigmejoks,
21:01:17pigmejand back to the error, that file exists
21:03:14pigmejso I wonder what the heck
21:03:45pigmejdom96_: yeah there is a bug
21:03:50*bulbasaur joined #nim
21:03:57pigmejnimsuggest is now always looking for relative paths
21:04:15reactormonkpigmej, http://pastie.org/10234427
21:04:35pigmejreactormonk: yeah same there
21:04:48pigmejAraq: said that assert not carl.dead makes it crash
21:05:36dom96_pigmej: relative to what? $PWD?
21:05:40pigmejyeah
21:05:49pigmejbin/nimsuggest --stdin /tmp/blah.nim
21:05:53pigmejsearches 'blah.nim'
21:06:00dom96_interesting
21:06:25pigmejbut
21:06:32pigmejnim/nimsuggest --stdin ../../../../tmp/blah.nim
21:06:34pigmejworks fine
21:07:30pigmejhmm
21:07:51pigmejI created subdirectory in /tmp
21:07:57pigmejso now I have /tmp/nims/blah.nim
21:08:03pigmejand absolute path works also
21:08:43Araqyeah somebody should look into how the compiler handles paths.
21:08:55Araqwe have a "Path handling" issue tag
21:09:37pigmejAraq: it was working "before"
21:09:46pigmejsadly I have no idea what git tag I had before
21:10:27reactormonkpigmej, git bisect ./koch temp nimsuggest.nim /tmp/blah.nim
21:10:35reactormonkoh, I forgot -r c there
21:11:03pigmejyeah but nimsuggest is now separate package
21:11:03pigmej;d
21:11:39pigmejor could I safely copy just nimsuggest.nim package?
21:11:41pigmejfile
21:12:18reactormonkpigmej, why? should still work.
21:12:38reactormonkoh, right, might be easier to copy it over for the paths
21:13:01Araqyeah I just wanted to check nimsuggest still compiles with the colors patch
21:13:02reactormonkjust make sure you don't use the nimsuggest folder so it doesn't conflict with older checkouts
21:13:05pigmejit prints now some repo info or something
21:13:13Araqand it told me "it's now an external package"
21:13:19Araqand I was like "wtf?"
21:13:43reactormonkAraq, did it tell you with colored output at least?
21:13:52pigmejAraq: don't worry, for now package setup is even more complicated ;P
21:14:12pigmejreactormonk: lol
21:14:48Araqreactormonk: no cause they are still disabled per default
21:15:25pigmejoh, i destroyed my nimcache ;/
21:15:32AraqTIL our website sucks cause it uses colors and our compiler sucks cause it doesn't use colors
21:15:59*Ven joined #nim
21:16:53pigmejreactormonk: the problem is that I can't use koch now ;d
21:16:57reactormonkpigmej, hm?
21:17:07pigmejah nvm
21:17:24reactormonkkoch temp rebuilds the compiler, you might not need that
21:17:31pigmej(nimsuggest requires now (bug) to be runned from $nimLoc)
21:18:00Araqozra: btw you're wrong. ;-) top level menu bars are wrong in the age of 27" monitors
21:18:16reactormonkAraq, top level menu bars? mac-style?
21:19:14Araqand if I have 3 windows vertically aligned why should they share the topmost 20 pixels for the menu bar? I aligned them so they don't share pixels
21:19:19ozraAraq: Haha, fair enough, I'm sitting with a stone age 22" though :-0
21:20:48ozraI have that "task bar" up there anyway, it shares the space with the menu, I like seeing the watch, haha
21:20:55pigmejreactormonk: nah automating this is kinda tricky now
21:20:55pigmej;d
21:21:08reactormonkpigmej, then do it manually
21:21:29pigmejdoing
21:21:51Araqozra: yeah but the "task bar" is shared space. it doesn't change contents willy-nilly
21:23:48ozraWhen I shove the mouse pointer up there, the menu texts are revealed on it, to the left, and all notification panel stuff, menu etc. is to the right. I like it :)
21:23:55pigmejhm
21:29:22flaviuFixed nim-by-example, thanks dom96_ for the ping.
21:29:56pigmejflaviu: cool
21:30:07pigmejI can now use it as my source for nimsuggest + emacs ;P
21:32:36reactormonkpigmej, neat
21:33:16reactormonkAraq, I'm gonna test the repo transfer with nim-mode
21:35:34reactormonkAraq, https://github.com/nim-lang/nim-mode/pulls looks good, PR still here
21:37:12pigmej(my irc crashed)
21:37:18pigmejreactormonk: what nimsuggest do you have ?
21:37:38reactormonkpigmej, the one from the nim-lang repo
21:38:16reactormonkpigmej, btw, tossed you an invite
21:39:05pigmejconfirmed ;)
21:39:08pigmejcool :)
21:39:39reactormonkalso included the nimsuggest repo
21:40:00pigmejyou mean nim-mode ?
21:40:04reactormonkthat too
21:40:18pigmejok
21:40:42pigmejreactormonk: could you copy that 'blah.nim' to /tmp
21:40:49pigmejand try to run ith with --stdin ?
21:40:51reactormonkpigmej, did so
21:41:01pigmej--stdin /tmp/blah.nim
21:41:03pigmejand works for oyu ?
21:41:17pigmejI mean, it doesn't complain about 'blah.nim not found' ?
21:41:46*kumul joined #nim
21:42:10reactormonkError: unhandled exception: cannot open: lib/system/inclrtl.nim [IOError]
21:42:50pigmejoh I got this one too,
21:43:03pigmejbut I recompilled nim and it started working
21:43:15pigmejI got also lib/system/gc_ms.nim(61, 52) Error: key:value pair expected
21:43:18pigmejand some other funny things
21:43:41pigmejit seems that devel commits are changing a lot of things in compiler
21:43:51reactormonkError: unhandled exception: not (son == nil) [AssertionError]
21:44:05pigmejyeah that is our original failure
21:45:09pigmejAraq: should we report that assert not blah segfault ?
21:45:47Araqyeah please
21:46:14*Mat4 joined #nim
21:46:47pigmejbut hmm Araq compilre is not crashing on it
21:47:13Araqwell then it's a nimsuggest bug
21:48:14pigmejyeah obvious but you said that assert not carl.dead would crash compiler too probably ;-)
21:48:30pigmejhm
21:48:31pigmejhttps://github.com/nim-lang/nimsuggest/issues/4
21:48:45pigmejreactormonk: this looks like yours
21:48:59*BitPuffin|osx joined #nim
21:49:26reactormonkI don't get a "cannot open"
21:53:33pigmejdom96_: I really have no idea why nimsuggest tries to open blah.nim file instead of /tmp/blah.nim
21:58:26dom96_pigmej: I only ever made nimsuggest work as a separate package. Haven't changed anything else.
21:58:43dom96_The changes needed to get that working were minimal
21:58:48pigmejok let's blame fedora then..
21:59:06*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:59:39pigmejprobably it dislikes something in my /tmp
22:01:22reactormonkdom96_, hm. What are the proper installation instructions for nimsuggest?
22:02:20dom96_For now: install it via nimble and copy the binary to where your Nim compiler is
22:02:45pigmejreactormonk: AND you have to run it from $nimDir
22:02:59pigmejbecause otherwise it will complain about some stuff
22:03:04reactormonkpigmej, hm? oh fuck
22:04:39*pregressive quit (Remote host closed the connection)
22:05:52pigmejreactormonk: yeah ;/
22:06:35bulbasaurCould someone help me with this? https://bpaste.net/show/96b91fb767cd
22:07:10pigmejreactormonk: bash exec + cd and it will work
22:09:53dom96_bulbasaur: did you just paste your password?
22:10:16bulbasauromfg
22:10:19bulbasaurshit
22:11:16pigmejbulbasaur: well at least it was not password1
22:11:17pigmej;P
22:11:21pigmejor dupadupa ;d
22:13:47bulbasaur:p
22:15:16bulbasaurany ideas dom96?
22:17:21*Mat4 left #nim (#nim)
22:17:51dom96_need the {.no_conv.} pragma?
22:18:42bulbasaurThanks that fixed it
22:22:12*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:25:32*Trustable quit (Ping timeout: 258 seconds)
22:27:55*Trustable joined #nim
22:37:00*Jehan` joined #nim
22:38:03*Matthias247 quit (Read error: Connection reset by peer)
22:39:05pigmejcu !
22:40:47bulbasaur;-; I need a static analyzer for nim
22:45:29*yglukhov________ quit (Quit: Be back later ...)
23:14:14*Jehan` quit (Quit: Leaving)
23:16:01bulbasaurhttps://gist.github.com/DTSCode/7bbcf0c8cd40dd7c8d89 :D
23:18:06*vikaton quit (Quit: Connection closed for inactivity)
23:19:35reactormonkbulbasaur, we have one, it's called the compiler
23:20:02bulbasaureh
23:20:20bulbasaurIt missed an out of bounds
23:20:44reactormonkthen improve it
23:21:13bulbasaurOr we could not have every tool rolled into one like an ide :p
23:24:43*Trustable quit (Remote host closed the connection)
23:27:46reactormonkbulbasaur, an IDE only works for that ide. tools work for all envs
23:30:45bulbasauruh wat? an ide can work on all environments too. and not all tools work on all environments
23:31:16reactormonklet's say nimsuggest can be integrated with all editors, as can the compiler. Static code analyzers... oh well
23:31:22*Jesin quit (Ping timeout: 276 seconds)
23:31:24reactormonkAnd it's duplicated work :-)
23:34:42*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:34:42bulbasaurWhats you point? and its not really duplicated work...
23:35:21ozraEhm, how does on PM in IRC (noob!)
23:35:40bulbasaurozra: /query the_person
23:35:43bulbasaurusually
23:35:51bulbasauralthough irc sees them all as the same thing
23:36:17ozrabulbasaur: Hmm, ok, how do you mean?
23:37:11bulbasaurThats how you pm someone
23:37:41*bjz joined #nim
23:38:49*bjz quit (Client Quit)
23:39:53ozraOk, got it, thanks bulbasaur :)
23:45:19*Jesin joined #nim
23:46:20reactormonkAraq, and get that repo over. as you see, PRs get transferred
23:54:50reactormonkis it possible to create two binaries?
23:57:44*Kingsquee joined #nim