<< 19-02-2016 >>

00:01:08*yglukhov quit (Remote host closed the connection)
00:08:40*PMunch quit (Quit: leaving)
00:08:47*PMunch joined #nim
00:15:22*Matthias247 quit (Read error: Connection reset by peer)
00:25:52*reactormonk quit (Quit: WeeChat 1.1.1)
00:50:40*brson quit (Ping timeout: 255 seconds)
01:03:28*gokr quit (Quit: Leaving.)
01:03:28*pregressive joined #nim
01:07:27*brson joined #nim
01:21:02*satbyy_ joined #nim
01:26:08*jaco60 quit (Ping timeout: 250 seconds)
01:32:11*Jesin quit (Quit: Leaving)
01:32:49*nande joined #nim
01:39:49*yglukhov joined #nim
01:43:59*yglukhov quit (Ping timeout: 240 seconds)
01:55:29*brson quit (Ping timeout: 240 seconds)
01:56:29*darkf quit (Ping timeout: 240 seconds)
02:00:12*darkf joined #nim
02:22:48*PMunch quit (Ping timeout: 276 seconds)
02:57:56*pregressive quit (Remote host closed the connection)
02:59:58*lokien_ quit (Quit: Connection closed for inactivity)
03:04:37ldleworkAraq: did you ever reason what was going on with the VM?
03:09:00*brson joined #nim
03:21:51*pilne quit (Quit: Quitting!)
04:03:49*endragor joined #nim
04:07:03*darkf quit (Ping timeout: 240 seconds)
04:10:49*darkf joined #nim
04:13:28*endragor quit (Remote host closed the connection)
04:30:38*brson quit (Quit: leaving)
04:36:56*endragor joined #nim
04:43:44*lompik quit (Ping timeout: 250 seconds)
05:21:57*darkf quit (Ping timeout: 244 seconds)
05:22:29*darkf joined #nim
05:26:28awsteelethis is a silly question, but what's the appropriate way to resolve "type mistach: got (BiggestInt) but expected 'int'"?
05:26:49*darkf_ joined #nim
05:27:07*darkf quit (Ping timeout: 244 seconds)
05:31:32*darkf_ is now known as darkf
05:36:18*wuehlmaus quit (Quit: Lost terminal)
05:37:56gmpreussnerawsteele: sounds like you're passing a BiggestInt to an int. you could cast to int (With possible loss of data)
05:38:54awsteelei'm happy with loss of data (because it's json that will only contain values < 100), but i wasn't sure how nicely it would play with truncating
05:40:34gmpreussnerjust cast to int then
05:40:40awsteelethanks :)
05:40:42gmpreussnerare you running on 32-bit?
05:40:47awsteele64
05:40:57gmpreussnerBigint = int then, so no loss of data
05:41:42gmpreussnerbut who knows, maybe BiggestInt changes to 128bit in the future :)
05:41:57awsteelegotta future proof!
05:42:10gmpreussneryou know, when we have those 1000 core cpus that were promised to us years ago
05:42:58gmpreussnerint64 ought to be enough for anyone though (TM)
05:43:12awsteelenot enough for ipv6!
05:43:25endragorI wish Nim didn't have those platform-dependent types... they're annoying, and trying to avoid them is also annoying, because you have to cast to int whenever you use anything from stdlib
05:56:05*darkf_ joined #nim
05:56:16*darkf quit (Disconnected by services)
05:56:18*darkf_ is now known as darkf
06:11:21*Demon_Fox quit (Quit: Leaving)
06:14:43*nande quit (Remote host closed the connection)
07:10:43*Demon_Fox joined #nim
07:46:37*gokr joined #nim
07:51:42*toaoMgeorge quit (Ping timeout: 276 seconds)
08:02:48*yglukhov joined #nim
08:08:29*yglukhov quit (Ping timeout: 240 seconds)
08:11:39*yglukhov joined #nim
08:23:06*filcuc joined #nim
08:45:49*filcuc_ joined #nim
08:48:35*filcuc quit (Ping timeout: 240 seconds)
09:04:13*satbyy_ is now known as satbyy
09:04:38*satbyy left #nim ("Kumbhakarna mode . . . zzZZ")
09:07:42*wuehlmaus joined #nim
09:13:31wuehlmaushi, all. can somebody confirm that the lazy nim package is broken right now?
09:13:32*Arrrr joined #nim
09:14:20*nsf joined #nim
09:20:17*reactormonk joined #nim
09:24:28*gokr quit (Quit: Leaving.)
09:26:28Araqwuehlmaus: no idea.
09:29:16wuehlmausi don't get it running here on two systems, throwing different errors at me
09:47:24*lokien_ joined #nim
10:11:34*krux02 joined #nim
10:11:44*jaco60 joined #nim
10:12:43krux02I am programming with macros, and at the moment the error I get is "SIGSEGV: Illegal storage access. (Attempt to read from nil?)" without any additional information. Why doesn't it show some information where it failed?
10:15:55flyxkrux02: because it's a segfault, i.e. the compiler runs into a non-recoverable error. you can try and compile your code with ./koch temp c yourcode.nim
10:18:31endragor@krux02 that typically happens when your macro outputs invalid AST. put `echo treeRepr result` at the end of the macro code and try to determine what's wrong with it. Another typical reason is dereferencing nil in your macro code.
10:27:28*Trustable joined #nim
10:32:55Araq"typically happens"?
10:33:07Araqhow about you create some bug reports?
10:37:54*toaoMgeorge joined #nim
10:47:03*Demon_Fox quit (Quit: Leaving)
10:57:00endragorAraq: oh so there are some checks in the compiler actually :) I previously got those SIGSEGVs quite often when implementing big macros. Here is one report: https://github.com/nim-lang/Nim/issues/3883 Will create more when I get back to implementing macros
10:57:21Araqthere are LOTS and lots of checks -.-
10:57:49Araqand I did run thousands of lines of code at compile-time without any problems
10:58:12Araqexcept compilation speed, so I did things differently via staticExec
11:56:07Araqendragor: thanks. fixed.
11:56:47*darkf quit (Quit: Leaving)
12:05:22*gokr joined #nim
12:37:11*lokien joined #nim
12:38:30*mountaingoat quit (Quit: WeeChat 1.3)
12:39:03*toaoMgeorge quit (Ping timeout: 240 seconds)
12:41:32*gokr quit (Quit: Leaving.)
12:47:17*BitPuffin joined #nim
13:07:04*lokien quit (Remote host closed the connection)
13:29:58*lokien_ quit (Quit: Connection closed for inactivity)
13:30:48*boopsies joined #nim
13:40:45*yglukhov quit (Ping timeout: 276 seconds)
13:51:20*arnetheduck joined #nim
13:58:44*mat4 joined #nim
14:08:11*lokien_ joined #nim
14:17:25*lompik joined #nim
14:19:15*yglukhov joined #nim
14:32:42*yglukhov quit (Ping timeout: 244 seconds)
15:00:51*Johz joined #nim
15:02:09JohzHeya, I'm working on the unlikely/likely issue atm, and I just wanted to check that using templates isn't going to upset anything.
15:06:32AraqJohz: don't make them .immediate and it should be fine
15:06:47Araqthanks for working on it :-)
15:09:57JohzGreat, that's what I've got. And it's easier for me to fix something easy like this than to hold up development on something more interesting... :P
15:14:07*yglukhov joined #nim
15:20:30*mat4 quit (Quit: Leaving)
15:26:18*gokr joined #nim
15:43:51JohzAraq: I'm trying to run a specific set of tests, but ./koch test doesn't seem to be using the version of the compiler that I've just modified and built
15:44:28Araqif you mean "koch temp" by "just modified and built"
15:44:32Araqthen yeah.
15:44:41Araq"koch temp" produces nim_temp
15:44:49Araqdo 'koch boot -d:release'
15:44:55Araqand then the tests use the new nim
15:45:27JohzWill having another nim on the path confuse things at all?
15:45:40JohzBecause I'm using koch boot, albeit not in release mode
15:46:51Johzbin/nim c -r test/... works, it's just when using koch to run testament that things seem to be breaking
15:52:03*CcxCZ quit (Ping timeout: 276 seconds)
15:53:22JohzYeah, it was a path problem, should be fixed now. I should have pull request ready soon
15:55:19*gokr quit (Quit: Leaving.)
16:11:12JohzAraq, pull request sent
16:15:27*arnetheduck quit (Ping timeout: 276 seconds)
16:16:52*CcxCZ joined #nim
16:28:00*satbyy joined #nim
16:28:53*satbyy left #nim ("Kumbhakarna mode ... zzzZ")
16:39:18*yglukhov quit (Ping timeout: 244 seconds)
16:48:24*toaoMgeorge joined #nim
16:49:58*lokien_ quit (Quit: Connection closed for inactivity)
16:54:23*mahasamoot joined #nim
17:26:12*filcuc_ quit (Read error: Connection reset by peer)
17:26:45*yglukhov joined #nim
17:27:54flyxis it possible at compile time to check whether an object type has a discriminator, i.e. is a variant object?
17:31:15*yglukhov quit (Ping timeout: 248 seconds)
17:33:20*[CBR]Unspoken quit (Ping timeout: 250 seconds)
17:34:37*boopsies is now known as boopsiesisaway
17:34:50*gokr joined #nim
17:37:48*[CBR]Unspoken joined #nim
17:42:43*brson joined #nim
17:46:01*tdc joined #nim
17:46:34*tdc quit (Client Quit)
17:57:44*yglukhov joined #nim
18:03:35*PMunch joined #nim
18:08:42*yglukhov quit (Read error: Connection reset by peer)
18:09:05*yglukhov joined #nim
18:10:46*pilne joined #nim
18:10:46*yglukhov quit (Read error: Connection reset by peer)
18:18:50Araqflyx: yeah via macros.getType()
18:19:54flyxAraq: nice, thanks
18:25:55*NimBot joined #nim
18:26:15*BlaXpirit joined #nim
18:27:08*fold3 joined #nim
18:27:25*SirCmpwn quit (*.net *.split)
18:27:25*r-ku quit (*.net *.split)
18:27:26*Gonzih quit (*.net *.split)
18:27:26*so quit (*.net *.split)
18:27:26*dom96 quit (*.net *.split)
18:27:26*gmpreussner quit (*.net *.split)
18:27:38*so joined #nim
18:27:38*SirCmpwn joined #nim
18:27:38*r-ku joined #nim
18:27:41*dom96 joined #nim
18:27:45*gmpreussner joined #nim
18:27:45*Gonzih joined #nim
18:30:11*krux02 quit (Quit: Page closed)
18:31:13*yglukhov joined #nim
18:35:49*yglukhov quit (Ping timeout: 255 seconds)
18:44:51*mahasamoot quit (Ping timeout: 250 seconds)
18:46:14*Sembei joined #nim
18:47:33*PMunch quit (Ping timeout: 276 seconds)
18:48:31*Jesin joined #nim
18:52:27*exebook quit (Quit: Leaving)
18:52:49*mahasamoot joined #nim
18:53:42*Matthias247 joined #nim
19:02:39*lokien_ joined #nim
19:08:32*ics joined #nim
19:40:34*yglukhov joined #nim
19:51:08*brson quit (Ping timeout: 250 seconds)
19:52:35*yglukhov quit (Remote host closed the connection)
19:53:43*brson joined #nim
19:54:59*Johz quit (Quit: Page closed)
20:00:51*dorei joined #nim
20:00:55doreihello
20:01:00doreiwhere do I start? :)
20:03:26*nsf quit (Quit: WeeChat 1.4)
20:05:02ArrrrTo learn nim?
20:06:48doreiyeap
20:07:10ArrrrWell, there are many resources, have a look at this page http://nim-lang.org/learn.html
20:07:46doreithanx a lot :)
20:08:05ArrrrYou are welcome my friend
20:11:15*BitPuffin quit (Ping timeout: 248 seconds)
20:13:39*endragor_ joined #nim
20:14:56lokien_hey guys. when nim 1.0 is released, but you'll find some nasty bug/very very ugly syntax, but changing this would break backwards compatibility.. would you break it?
20:15:36lokien_s/backwards/backward
20:17:04*endragor quit (Ping timeout: 240 seconds)
20:17:58*endragor_ quit (Ping timeout: 255 seconds)
20:19:16ArrrrNah, nasty bugs deservers to live
20:22:29lokien_:(
20:22:49lokien_that's nasty
20:24:42doreithat's the art of software engineering ;-)
20:28:57ArrrrI have to go, good luck with your learning dorei
20:29:00*Arrrr quit (Quit: WeeChat 1.2)
20:29:04lokien_art, or engineering? :D
20:29:17lokien_we can learn together dorei
20:29:25lokien_'cause it's my first day
20:31:49doreiArrrrr pointed me to http://nim-lang.org/learn.html
20:31:54doreinow i'm installing nim
20:32:09doreiand i'm thinking of installing https://github.com/wheineman/nrpl too
20:32:22lokien_I'm reading that. and I'll install it in 15 mins or so
20:32:23doreiso as to check pieces from the tutorial at a repl :)
20:32:53lokien_are you coming from clojure?
20:34:04doreinop, ruby and C, ruby mainly
20:34:16doreii think i've got parenthesophobia :(
20:36:19lokien_why not crystal then? :D
20:36:25lokien_it's c with ruby syntax
20:39:57doreihmm
20:40:59doreiw0w, crystal has no int type, only int8, int16, int32 and int64
20:41:16doreii hope that nim's int will give me no trouble
20:41:44lokien_:D
20:41:58lokien_it doesn't have that crown without a reason
20:45:23*lokien joined #nim
20:45:32*aziz joined #nim
20:45:49doreiif i install nim from github, is there anything else to do after compilation other than adding the path/to/cloned_repo/bin to my $PATH ?
20:48:47lokienI'll just go with nim 0.11, since it's in ubuntu
20:52:53doreihttps://github.com/def-/nrpl
20:53:07doreithis is a more compatible fork with latest ver of nim
20:54:33lokienwhy would you want repl, besides running examples?
20:56:26doreiwell, running examples seems to be a fine way to start learning, no?
20:56:46*[CBR]Unspoken quit (Remote host closed the connection)
20:57:01lokienit is a fine way :D
20:58:30*Demon_Fox joined #nim
21:05:02awsteelethat nim repl looks great!
21:05:39*dthrvr quit (Ping timeout: 248 seconds)
21:08:19*Kingsquee joined #nim
21:08:59lokienawsteele: have you ever seen utop?
21:09:15awsteelenope, what is it?
21:09:48lokienocaml's repl
21:09:56lokienprettiest repl in the world
21:10:29awsteeleah ok. i've never played with ocaml. although i'm quite partial to the "pry" repl for ruby. MUCH better than the standard irb
21:10:46lokienhttp://i.stack.imgur.com/xnQjZ.png that's utop
21:11:01awsteelevery colourful :)
21:11:16lokienand shows time! :D
21:13:15awsteeleanyone have experience with travis-ci and nim projects? i'm having issues wherein it can't load libpcre. this is supposed a fix, but it didn't work for me: https://github.com/docopt/docopt.nim/commit/2323fd956c8a22b1ce3e4c00ce34437f6cca75b5
21:18:15*dthrvr joined #nim
21:24:01awsteeleseems i needed to add "sudo: required" in order to activate the newer ubuntu, now it works
21:32:57*BitPuffin|osx joined #nim
21:36:00ldleworklokien: how's your nim learning going
21:36:24lokienldlework: struggling to install vim with python support on my new ubuntu :I
21:36:42lokienif I fail now, I'll just install howl/sublime
21:37:46doreipython support for vim? why?
21:37:58lokienfor nim vim plugin
21:38:07doreioh, i see
21:38:44*nsf joined #nim
21:39:34dom96ooh new Nim people. Hello guys.
21:39:37doreioh, python2 for my vim :)
21:39:45doreii hope nim.vim doesn't need python3
21:39:56lokienhello dom96, old nim human
21:40:08dom96hello lokien :)
21:40:15doreihi dom96
21:40:53dom96If you guys haven't seen it already, i'm writing a book which teaches you Nim: https://manning.com/books/nim-in-action?a_aid=niminaction&a_bid=78a27e81
21:41:17doreino pirated copy yet however :p
21:42:28lokiencan you ship to poland?
21:42:33dom96I would upload it to TPB myself but I don't think my publisher would be too happy about that :P
21:42:56doreii guess when it's finished it'll find its way into libgen
21:43:26lokienhm, it's not printed yet :(
21:44:29lokienmaybe we'll write a fun book? like brave clojure? or c# yellow book?
21:45:32dom96lokien: I would be surprised if that was a problem. Ale ja jestem Polakiem, więc jak będzię z tym problem to może przywioze ci personalnie ;)
21:45:44lokiendom96: o panie :D
21:47:35dom96dorei: The first chapter is free in any case.
21:47:50lokienI'm enjoying it right now
21:49:05*BitPuffin joined #nim
21:50:49*BitPuffin quit (Read error: Connection reset by peer)
21:51:33dom96lokien: yay, please let me know what you think, or if you have any questions. If i'm not around here or you want to do post it somewhere more permanent then you can do so on the Nim forum (http://forum.nim-lang.org/t/1978) or the Manning forum (https://forums.manning.com/forums/nim-in-action).
21:51:42dom96*to post
21:52:33doreidom96: it's pretty cool, the only minus i've found is that you dont expand on nim weakness and makes it look a little bit unbalanced
21:52:54dom96dorei: That's because Nim is perfect :P
21:53:33dom96heh, in all seriousness it's a bit hard to do. I don't want to sound too negative about Nim in the book, since it is a book that is meant to encourage you to learn Nim.
21:53:43lokiendom96: ha, I love it so far :D maybe I'll buy it for my bday! (I haven't bought any programming book ever)
21:54:28lokiendom96: but you can sound negative here. tell us about its weaknesses!
21:54:58dom96I pretty much covered the biggest weakness in the book.
21:55:40dom96The biggest problem is that it's not as mature as other languages, but that will improve with time.
21:56:50lokienimmaturity is the biggest flaw?
21:57:15dom96lokien: that would be awesome! It would be a big honour if you bought Nim in Action as your first ever programming book :)
21:57:33dom96lokien: pretty much.
22:00:00lokiendom96: and the only issue with the book is the awkward syntax in longer sentences :D
22:00:23lokienuh, or it's a typo
22:00:39dom96hrm, which part?
22:00:40lokienyou forgot to put a word here. so, a wordo
22:01:00lokien"is necessary when interfacing with
22:01:00lokienC libraries and supporting these unsafe features makes Nim a powerful systems programming language."
22:01:14lokienshouldn't it be "which makes Nim a powerful..."?
22:01:19*filwit joined #nim
22:01:36lokienor I'm just weird, I don't know :D
22:01:49lokien(page 6)
22:05:29dom96Hmm. I think it makes sense.
22:07:03lokienmy proposition, or your sentence?
22:09:48dom96My sentence
22:10:47lokienI didn't say it doesn't make sense, it was just a bit funky. maybe that's because I'm sleepy, sorry :)
22:11:19awsteeleI just bought the book. It's the first programming book I've bought too. Well, except TAOCP, but that's just to look pretty on my shelf :)
22:13:04dom96lokien: I'm sleepy too so I could be wrong too. It's also hard to say, because I wrote it so it makes sense to me. Will look at it in the morning again.
22:13:26dom96awsteele: Awesome. Thank you!
22:15:40lokiendom96: chat application in chapter 3? with gui, connections and all that stuff?
22:16:26dom96lokien: CLI but yes :)
22:16:55dom96It's nowhere near as complex as IRC of course
22:17:11lokiendom96: I'm so hyped right now :D
22:17:44dom96lokien: Brilliant. Exactly what I was going for :D
22:18:07dom96Currently working on Chapter 7 which will involve the development of a simple Twitter clone.
22:18:14dom96Should be pretty fun too
22:19:57lokienbut there are still only 3 chapters available?
22:20:43awsteeledoes nim's dynlib loading respect LD_LIBRARY_PATH?
22:20:58dom96The others still need to be reviewed by my editor, then I need to make corrections based on his feedback, and once the editor is happy they will be released.
22:21:56lokienoh, okay. good luck with that book, it's really well-written :)
22:21:59filwitis there anyways to make a ``type CArray{.unchecked.}[T] = ptr array[1,T]`` (note the `ptr`) ?
22:21:59dom96awsteele: IIRC it uses dlopen which respects LD_LIBRARY_PATH.
22:22:46filwiti mean making an unchecked ptr array[] in the same type (it's easy to do with using 2 types).. just wondering
22:27:24dom96lokien: Glad you think so! :D
22:28:03dom96filwit: Don't think so
22:28:33filwitdom96: k, thanks
22:34:01*jeffc joined #nim
22:35:27*PMunch joined #nim
22:35:39*jeffc_ joined #nim
22:35:46*jeffc quit (Client Quit)
22:36:02*jeffc_ left #nim (#nim)
22:36:14awsteeleI have libpcre.so in a dir in my LD_LIBRARY_PATH, but I'm still getting "could not import: pcre_free_study" :(
22:36:52*jeffc joined #nim
22:39:06lokienhey, guys, how do you structure your code? do you put it in modules, namespaces? or just separate files?
22:39:06def-awsteele: wrong version of pcre maybe?
22:39:17awsteele~/libpcre/lib# nm libpcre.so | grep pcre_free_study
22:39:17awsteele0000000000016aa0 T pcre_free_study
22:39:59def-awsteele: and no 32/64 bit issue either I guess, hm
22:40:36awsteeleoh, maybe? i just did the standard "./configure --prefix=..; make; make install" so i would think not
22:40:58def-lokien: each file is automatically a module with its own namespace
22:41:12filwitlokien: in Nim a file *is* a 'module' when it's 'imported' (and you can use 'include' to split modules across multiple files). There are no "namespaces" exactly (although you can use _:typedesc[T] as a first-parameter to associate a proc with a specific type.. which is somewhat similar)
22:41:22def-awsteele: I think there would be a different error in that case
22:41:28dom96awsteele: maybe it's loading a libpcre.so.3 or libpcre.so.1? https://github.com/nim-lang/Nim/blob/devel/lib/wrappers/pcre.nim#L322
22:42:04awsteelethere is also a libpcre.so.1 in the dir, but it has the same symbols
22:42:13awsteeleno libpcre.so.3 though..
22:42:15def-filwit: why are there no namespaces?
22:42:46lokienthanks def- filwit
22:42:57def-awsteele: you could try running it with strace and check which library is actually opened
22:43:03filwiti misspoke, dom said it better, each 'imported' module is it's own "namespace"
22:43:45def-filwit: alright. I'm not dom though, even though people call me that rather often
22:44:10filwitdef-: i know.. i was referring to dom's response right above mine
22:44:54*darkf joined #nim
22:45:08awsteelegreat idea, def-! i'll try that
22:46:06filwitdef-: about the namespaces thing though.. "namespaces" in Nim do work differently than in C++/C#/Java/etc where each Class provides a namespace around it's methods (and therefor can be included/excluded individually.. unlike Nim which is a procedural language where procs are namespaced by the module only)
22:46:39filwitdef-: unless you use the _:typedesc[T] trick... which is why I mentioned it as well
22:48:07filwiterr.. included/excluded as a package by type-name I mean.. eg, you can "using System.Console" where Console is a Class and you only want to work with it's methods, not the everything from System
22:49:28filwitthat's not really possible in Nim... not that's a practical problem or anything, since it's rare you actually don't just want to include the entire module anyways (that's why you packaged it as a module in the first place)
22:55:31*PMunch quit (Ping timeout: 248 seconds)
22:59:58*lokien_ quit (Quit: Connection closed for inactivity)
23:04:42*saml quit (Quit: Leaving)
23:11:18*lokien quit (Quit: Leaving)
23:27:23*aziz quit (Remote host closed the connection)
23:35:39*mahasamoot quit (Remote host closed the connection)
23:36:29awsteeleHow does this line work for loading a dynlib? https://github.com/nim-lang/Nim/blob/devel/lib/wrappers/pcre.nim#L322 It looks like it's some kind of regex - is it? I see the stdlib_pcre.c file ends up with the three possible filenames as string literals
23:39:09awsteeleAh it's in the manual
23:47:51*gokr quit (Ping timeout: 276 seconds)
23:57:01*lokien_ joined #nim
23:58:42*Kingsquee quit (Read error: Connection reset by peer)
23:59:50*Kingsquee joined #nim