<< 13-02-2016 >>

00:01:43*pregress_ quit (Remote host closed the connection)
00:18:57*toaoMgeorge quit (Read error: Connection reset by peer)
00:21:23*yglukhov joined #nim
00:26:34*yglukhov quit (Ping timeout: 240 seconds)
00:43:13*Trustable quit (Remote host closed the connection)
01:09:21*Matthias247 quit (Read error: Connection reset by peer)
01:11:50*jaco60 quit (Ping timeout: 260 seconds)
01:16:28*shodan45 quit (Quit: Konversation terminated!)
01:23:56*yglukhov joined #nim
01:28:06*yglukhov quit (Ping timeout: 240 seconds)
01:43:11*mahasamoot joined #nim
02:11:50arnetheduckVarriount, there?
02:21:26*ephja quit (Ping timeout: 240 seconds)
02:24:47*yglukhov joined #nim
02:28:55*yglukhov quit (Ping timeout: 240 seconds)
02:29:35*mahasamoot quit (Ping timeout: 264 seconds)
02:37:13*nimcc joined #nim
02:50:23*nimcc quit (Quit: Page closed)
02:58:44*Dildosan quit (Quit: Leaving)
03:14:00*spt joined #nim
03:19:27*filwit quit (Quit: Leaving)
03:41:01*Varriount quit (Disconnected by services)
03:41:01*Varriount_ joined #nim
04:05:32*emery quit (Ping timeout: 250 seconds)
04:16:58*brson quit (Ping timeout: 252 seconds)
05:30:33*Demon_Fox joined #nim
05:42:47*lompik quit (Ping timeout: 264 seconds)
06:13:46*brson joined #nim
07:11:28*yglukhov joined #nim
07:31:49*yglukhov quit (Remote host closed the connection)
08:05:00Varriount_arnetheduck: I'm here now...
08:05:05*Varriount_ is now known as Varriount
08:09:02*[CBR]Unspoken joined #nim
08:12:26*M-Quora quit (Quit: node-irc says goodbye)
08:14:05*OnO_ joined #nim
08:14:51*exebook_ joined #nim
08:15:41*OnO quit (Ping timeout: 240 seconds)
08:15:41*exebook quit (Ping timeout: 240 seconds)
08:23:26*toaoMgeorge joined #nim
09:09:54*Arrrr joined #nim
09:39:25*Matthias247 joined #nim
09:42:46*BitPuffin|osx quit (Ping timeout: 240 seconds)
10:06:44*brson quit (Ping timeout: 272 seconds)
10:14:45*Trustable joined #nim
10:15:07*darkf quit (Quit: Leaving)
10:22:21*toaoMgeorge quit (Read error: Connection reset by peer)
10:22:33*toaoMgeorge joined #nim
10:34:19*skyfex joined #nim
10:35:14*toaoMgeorge quit (Ping timeout: 272 seconds)
10:44:52*skyfex quit (Ping timeout: 248 seconds)
10:52:18*Demon_Fox quit (Quit: Leaving)
10:57:31*Varriount quit (Disconnected by services)
10:57:31*Varriount_ joined #nim
10:59:23*gokr joined #nim
11:33:47*Salewski joined #nim
11:34:49*gokr quit (Quit: Leaving.)
11:36:19Salewski@Dom96: In the PDF preprint of your book, page 52: assert genHello("John", "Bob") == "Hello John\nHello Bob" # I wonder why there is no \n after Bob. Or is the assert intended to fail?
11:39:41SalewskiAnd a general remark: Personally I would like that font for code examples and font for ordinary text have nearly the same size. In my PDF code font is nearly halve size of text font, so reading the code on a tablet/screen is not very easy.
11:39:47*Salewski quit ()
11:40:32dom96Salewski: thank you. Corrected the code on page 52.
11:48:24*emery joined #nim
12:07:54*jaco60 joined #nim
12:13:48*toaoMgeorge joined #nim
12:22:23*toaoMgeorge quit (Ping timeout: 264 seconds)
12:22:37*desophos quit (Read error: Connection reset by peer)
12:31:22*apotheon quit (Read error: Connection reset by peer)
12:32:50*apotheon joined #nim
12:42:12*aziz joined #nim
12:52:23*gokr joined #nim
13:02:36*lompik joined #nim
13:30:08*toaoMgeorge joined #nim
13:30:52*gokr quit (Quit: Leaving.)
14:17:27*spt quit (Ping timeout: 252 seconds)
14:33:57*spt joined #nim
14:33:58*ephja joined #nim
14:35:16*wuehlmaus joined #nim
14:43:35*filwit joined #nim
14:51:46*Jesin quit (Quit: Leaving)
15:31:02sptfilwit: Hello and tnx for yesterday messages, I read it from log. But I'm don't understand where need insert "./"?
15:32:34filwitspt: you just prefix a "./" to whatever path you're trying to lookup.. eg, one windows you'd say "lib.dll" (if the lib was in the same folder as your application) and on *nix you'd say "./lib.so"
15:32:56filwit*on* windows..
15:34:06dom96On Unix running your command like so should work: `LD_LIBRARY_PATH=./:$LD_LIBRARY_PATH ./application`
15:34:20dom96Windows should support DLLs in the same directory as your exe by default.
15:39:51filwitdom96: technically so does Unix.. I don't understand why you'd need to modify an environment variable unless there's some limitation with {.dynlib.} (or perhaps a GCC setting?) which prevent a "./whatever" path from being looked up... I mean I can load dynamic libs explicitly from the same folder that way just fine: http://forum.nim-lang.org/t/1400
15:40:28dom96Well then there must be a different reason why spt cannot load the .so
15:40:29filwitbut I don't have a Linux machine setup ATM to test this out right now.
15:41:32*Jesin joined #nim
15:48:27sptI know how work LD_LIBRARY_PATH, and just want make program without modify ENV variables before start. On win I can put dlls in folder with EXE file. Looking at link which give filwit, think this is solution - going to try it now (sorry for rough english)
15:58:43sptfilwit: This solution (http://forum.nim-lang.org/t/1400) work only with nim libraries :(
15:58:48ephjaspt: --passC:Wl,-rpath=dir?
16:00:52filwitspt: Actually it works with any C library too, but I'm not sure exactly what problem you're having.. have you tried simple ``proc foobar() {.dynlib:"./somelib.so".}`` ?
16:04:00filwiter... proc foobar() {.importC dynlib:"./somelib.so".} # to bind to 'foobar' function in 'somelib.so' from the app directory
16:04:43sptdescribe what needed for me: program under linux, i'm use standart module IUP for simple gui, if libiup.so not installed in LD_LIBRARY_PATH - "could not load: libiup". I'm just want put libiup.so in folder with my program for portability
16:05:45sptall works fine if .so in /usr/lib or other LIB dir
16:06:12sptin programm i'm just make "import iup"
16:07:41ephjafilwit's approcah would require a modification of the wrapper
16:07:46sptwant use wrapper "http://nim-lang.org/docs/iup.html"
16:07:50ephjaif you don't want to do that then try my approach
16:08:41ephjaoops, forgot a "-" after the colon
16:08:51filwitspt: yes, this is because the IUP nim lib does not specify a relative path.. so it's pretty much impossible to do this in a "portable" way on Unix without modifying the IUP source with a `when defined(relativeLibPath): ...`
16:09:07filwitephja: yeah, exactly
16:10:20filwitin fact, it might be a good guild-line for Nimble packages to have uses some common "relativeLibPath" directive for this situation on Unix...
16:11:41ephjaso pass this to nim when building: "--passC:-Wl-rpath=.". modify the path if needed
16:12:14filwitoh yeah.. or that probably works too..
16:12:15ephjaI do hope that the windows approach catches on for other platforms
16:13:37filwitidk, having an explicit path distinction might be a good thing in other ways.. and if you can just pass a command to GCC to tell it to look through the local, I don't see much of a difference
16:13:52ephjaI don't know if they could make steam work well without providing specific versions of libraries
16:17:26sptephja: can't find key "--passC" in nim compiler :(
16:18:27filwitspt: use like "nim c --passC:-Wl-rpath=. yourapp.nim"
16:19:15spttrying... "gcc: error: unrecognized command line option ‘-Wl-rpath=.’"
16:20:20filwithmm... one sec..
16:20:37ephjaforgot a comma
16:21:19ephja-Wl, ...
16:21:49filwitprobably need to do: --passC:"-Wl,-rpath=."
16:21:53filwit(with quotes)
16:21:55filwitor possibly
16:22:11filwit--passC:-Wl --passC:-rpath=.
16:24:33sptcompiled with --passC:"-Wl,-rpath=./", but don't work
16:42:09filwitspt: trying to find more info on this.. does it work at when you use simple: "--passC:-rpath=./" ?
16:43:16sptgcc: error: unrecognized command line option ‘-rpath=./’
16:44:05filwitwhat's the runtime error when you use "-Wl,-rpath=./" ? Just the standard "cannot load iup.so"?
16:44:22sptyes
16:45:49filwitwhat's the actual name of your .so file? IUP module looks for "libiup(3.0|2.7|2.6|2.5|2.4).so.1" on Unix.. does that pattern match?
16:46:33spt"libiup.so" and when I put this in /usr/lib - program works
16:47:58filwityeah but there might be aliases to a 'libiup.so' under a matching pattern.. try renaming the file to libiup3.0.so.1 (or whatever version you're using) and try it
16:48:16*arnetheduck quit (Ping timeout: 245 seconds)
16:48:30sptpattern: could not load: libiup(|3.0|2.7|2.6|2.5|2.4).so(|.1)
16:48:49spt"libiup.so" - norm for it
16:49:29sptno more symlinks for libiup.so in system
16:50:02filwitthere might be in other places where the PATH points too.. and then youre libiup.so if found.. just saying
16:50:53filwityou should try making an alias, or renaming the .so to something that the IUP module is looking for directly.. eg "libiup3.0.so.1" or whatever
16:51:15def-spt:try --passL:"-Wl,-rpath=."
16:51:18sptno no, i'm get this lib out of system not throuth repository, just download
16:51:58sptWORK!
16:52:08Araqspt: one solution people use on Linux is to write a small shell script setting up LD_LIBRARY_PATH
16:52:13filwitgreat! thanks def-... the solution was so obvious...
16:52:21def-great, passC is for the compilation, passL for the linking
16:52:25spti know LD_LIBRARY
16:52:34*Sembei joined #nim
16:52:45sptbut --passL:"-Wl,-rpath=." - work fine, TNX DEF
16:54:08def-When you think about it's a bit funny, telling the Nim compiler to tell gcc to tell ld to use -rpath=.
16:54:32spttnx filwit, ephja, def for spend your time for my stupid question
16:54:43sptand Araq too
16:54:44def-spt: not a stupid question at all, I'll need this as well
16:54:55filwitdef: well it makes sense.. and I'm completely aware of the two commands.. just kinda early in the morning for me today :\
16:56:46sptnice phrase - "telling the Nim compiler to tell gcc to tell ld to use -rpath=." :)
17:02:20ephjaonly passL? or both?
17:02:30def-ephja: only passL
17:02:38sptyep, passL
17:02:45def-ephja: it's an argument for the linker (ld) and so it's only necessary at the linking step
17:04:58filwitbtw, I was trying use Visual C++ with Nim (nim c --cc:vcc ...) and everything seems to work except that Nim still produces '.o' files instead of '.obj' files and the linker fails
17:05:03ephjaright, because it's a separate step (gcc -c)
17:05:14filwitdoes anyone know how to get VC++ working with Nim?
17:07:45def-filwit: you might want to edit the objExt in compiler/platform.nim
17:08:19filwitdef-: k, was thinking it was probably just a bug due to just lack of use
17:08:38def-filwit: Visual C++ on Windows? Because according to that file .obj should be used on Windows already
17:09:16filwitdef-: well I tried this IDK, a month ago.. I'll give it another shot again soon and see what happens
17:09:28filwittrying to figure out something else ATM
17:10:42ephja"gcc -c" (no linking) followed by a linking step, to be less vague. -Wl is not going to do anything then
17:46:02*someplac- is now known as someplace
17:48:21*nsf quit (Quit: WeeChat 1.4)
18:00:54*spt quit (Quit: Page closed)
18:05:27*yglukhov joined #nim
18:09:26*yglukhov quit (Ping timeout: 240 seconds)
18:13:27*endragor joined #nim
18:29:10*yglukhov joined #nim
18:32:07*darkf joined #nim
18:33:26*Varriount joined #nim
18:36:47*Varriount_ quit (Ping timeout: 264 seconds)
18:40:15*Varriount_ joined #nim
18:40:15*Varriount quit (Disconnected by services)
18:50:48*nsf joined #nim
18:56:14*endragor quit (Remote host closed the connection)
19:01:40*yglukhov_ joined #nim
19:01:40*yglukhov quit (Read error: Connection reset by peer)
19:25:22*desophos joined #nim
19:29:47*irrequietus joined #nim
19:54:02*Arrrr quit (Quit: WeeChat 1.2)
20:01:37*yglukhov joined #nim
20:01:37*yglukhov_ quit (Read error: Connection reset by peer)
20:04:51*yglukhov quit (Read error: Connection reset by peer)
20:05:25*yglukhov joined #nim
20:44:42ldleworkAraq: should I really avoid uints in my program?
20:59:02*mat4 joined #nim
21:01:42*yglukhov quit (Read error: Connection reset by peer)
21:03:07*yglukhov joined #nim
21:09:49*Jesin quit (Quit: Leaving)
21:21:43ldleworkecho -12.0 mod 10.0
21:21:51ldleworkgives me an error about the `.` operator :3
21:21:53ldleworkyikes
21:22:05ldleworkI should just always use parens
21:23:42def-ldlework: i don't see it, only get an error because `mod` is not defined for floats
21:23:50ldleworkdef-: import math
21:23:59def-works for me
21:24:01def-no error
21:24:20ldleworkf.nim(2, 6) Error: type mismatch: got (proc (x: varargs[typed]){.gcsafe, locks: 0.}, float)
21:24:34ldleworkfor:
21:24:36ldleworkimport math
21:24:38ldleworkecho -12.0 mod 10.0
21:24:51def-try most recent devel branch of Nim
21:25:07ldleworkdef-: another problem
21:25:14ldleworkmath.floor(-1.2) gives -1
21:25:40def-ldlework: gives -2 for me
21:25:42ldleworkwtf
21:26:44*ldlework updates
21:28:13ldleworkheh I wonder if my bugs go away now :D
21:28:49def-alternatively, maybe you have a math.nim file with other definitions
21:29:24ldleworknope, I was running 0.12
21:29:29ldleworkfixed in 0.13 apparently
21:29:32ldleworkthanks
21:29:33def-ok, great
21:29:53ldleworkI've been thinking I was bad at math for like three days :(
21:30:02ldleworkhehe
21:31:57ephjawhat do you need unsigned integers for?
21:36:44*Matthias247 quit (Quit: Matthias247)
21:42:53ephjaI don't remember all the reasons why he thinks they are bad, but it's true that they rarely are necessary
21:48:26dom96https://github.com/nim-lang/Nim/wiki/Unofficial-FAQ#why-are-unsigned-types-discouraged
21:52:54*nande joined #nim
21:58:50*Jesin joined #nim
22:00:35*Demon_Fox joined #nim
22:04:00*ics quit (Quit: Connection closed for inactivity)
22:10:36*filwit quit (Quit: Leaving)
22:19:37reactormonkpretty sure the part about the block comments should be updated.
22:20:29*irrequietus quit ()
22:26:13dom96reactormonk: it's a wiki, have at it ;)
22:26:28ldleworkAnother reason is that noise generators rarely work with negative coordinates
22:26:32ldleworkthe one in the stdlib does not
22:26:39reactormonkThen I'd have to look up what the block comment syntax is...
22:26:46reactormonkJust delete it?
22:29:45dom96just search for it on github
22:29:47dom96it's not hard to find
22:33:45*mat4 quit (Quit: Verlassend)
22:38:26ephjaldlework: ok but is the extended positive range necessary?
22:38:37ldleworkIts certainly nice?
22:38:50ldleworkI mean, more capacity is certainly helpful..
22:41:20*Matthias247 joined #nim
22:45:42ephjathe additional range is often not necessary, but if it is, then sure use unsigned integers
22:50:27ephjathey aren't needed for indexing for example
22:52:30ephjawell, unless you need 8-bit integer sequences that might take up at least 50% of the address space on <= 32-bit platforms
22:57:16*ga2arch joined #nim
22:57:47ga2archhi, is it safe to pass a pointer of a global var between threads ?
22:58:06ga2archsafe i mean, "allowed" by nim ?
22:58:28ephjaldlework: I would use SomeInteger for such interfaces (SomeSignedInt | SomeUnsignedInt), even though signed integers would be fine in most cases
22:58:31dom96only if it's allocated via allocShared
22:58:55ldleworkephja: the library produces wrong output with negative numbers
22:59:06ldleworkyou can't just say "signed integers are fine!"
22:59:17ldleworkin this case negatives break the math the perlin library is using
22:59:25ldleworkso...
22:59:58ephjaI didn't
23:00:25ephjaok I wouldn't use signed integers then, of course
23:00:33ldleworkSorry I was getting the impression you were just waving away the details and suggesting signed integers are fine for everything
23:01:27ga2archdom96: right now i'm sharing a Redis object between threads using a pointer to a global variable, nim doesn't complain and it works
23:01:56*yglukhov quit (Read error: Connection reset by peer)
23:03:13*yglukhov joined #nim
23:13:10*filwit joined #nim
23:14:21ephjaldlework: I often use ranges when I don't want to allow negative values for example: http://nim-lang.org/docs/system.html#Natural
23:14:52ephjaI was just stressing the point that they aren't needed very often, and this is just another suggestion
23:17:17ephjathey are tedious to use in conjunction with tuples though, because you can't just pass in (0, 0), when (Natural, Natural) is expected
23:17:44filwitephja you can make a converter for that tho
23:17:47ephjaperhaps it will work at some point, but I'll just replace some tuple instances with objects for now
23:18:12ephjayes I know. it's a decent workaround
23:19:11ephjaspeaking of which, is this another use case for macros and 'getType'? ;)
23:24:00*ga2arch quit (Quit: Page closed)
23:25:58*vikaton joined #nim
23:26:08*toaoMgeorge quit (Ping timeout: 256 seconds)
23:35:50*toaoMgeorge joined #nim
23:40:08*[CBR]Unspoken quit (Ping timeout: 276 seconds)
23:53:53*aziz quit (Remote host closed the connection)
23:56:29*[CBR]Unspoken joined #nim