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:50 | arnetheduck | Varriount, 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:00 | Varriount_ | 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:19 | Salewski | @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:41 | Salewski | And 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:32 | dom96 | Salewski: 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:02 | spt | filwit: Hello and tnx for yesterday messages, I read it from log. But I'm don't understand where need insert "./"? |
15:32:34 | filwit | spt: 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:56 | filwit | *on* windows.. |
15:34:06 | dom96 | On Unix running your command like so should work: `LD_LIBRARY_PATH=./:$LD_LIBRARY_PATH ./application` |
15:34:20 | dom96 | Windows should support DLLs in the same directory as your exe by default. |
15:39:51 | filwit | dom96: 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:28 | dom96 | Well then there must be a different reason why spt cannot load the .so |
15:40:29 | filwit | but I don't have a Linux machine setup ATM to test this out right now. |
15:41:32 | * | Jesin joined #nim |
15:48:27 | spt | I 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:43 | spt | filwit: This solution (http://forum.nim-lang.org/t/1400) work only with nim libraries :( |
15:58:48 | ephja | spt: --passC:Wl,-rpath=dir? |
16:00:52 | filwit | spt: 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:00 | filwit | er... proc foobar() {.importC dynlib:"./somelib.so".} # to bind to 'foobar' function in 'somelib.so' from the app directory |
16:04:43 | spt | describe 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:45 | spt | all works fine if .so in /usr/lib or other LIB dir |
16:06:12 | spt | in programm i'm just make "import iup" |
16:07:41 | ephja | filwit's approcah would require a modification of the wrapper |
16:07:46 | spt | want use wrapper "http://nim-lang.org/docs/iup.html" |
16:07:50 | ephja | if you don't want to do that then try my approach |
16:08:41 | ephja | oops, forgot a "-" after the colon |
16:08:51 | filwit | spt: 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:07 | filwit | ephja: yeah, exactly |
16:10:20 | filwit | in 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:41 | ephja | so pass this to nim when building: "--passC:-Wl-rpath=.". modify the path if needed |
16:12:14 | filwit | oh yeah.. or that probably works too.. |
16:12:15 | ephja | I do hope that the windows approach catches on for other platforms |
16:13:37 | filwit | idk, 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:52 | ephja | I don't know if they could make steam work well without providing specific versions of libraries |
16:17:26 | spt | ephja: can't find key "--passC" in nim compiler :( |
16:18:27 | filwit | spt: use like "nim c --passC:-Wl-rpath=. yourapp.nim" |
16:19:15 | spt | trying... "gcc: error: unrecognized command line option ‘-Wl-rpath=.’" |
16:20:20 | filwit | hmm... one sec.. |
16:20:37 | ephja | forgot a comma |
16:21:19 | ephja | -Wl, ... |
16:21:49 | filwit | probably need to do: --passC:"-Wl,-rpath=." |
16:21:53 | filwit | (with quotes) |
16:21:55 | filwit | or possibly |
16:22:11 | filwit | --passC:-Wl --passC:-rpath=. |
16:24:33 | spt | compiled with --passC:"-Wl,-rpath=./", but don't work |
16:42:09 | filwit | spt: trying to find more info on this.. does it work at when you use simple: "--passC:-rpath=./" ? |
16:43:16 | spt | gcc: error: unrecognized command line option ‘-rpath=./’ |
16:44:05 | filwit | what's the runtime error when you use "-Wl,-rpath=./" ? Just the standard "cannot load iup.so"? |
16:44:22 | spt | yes |
16:45:49 | filwit | what'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:33 | spt | "libiup.so" and when I put this in /usr/lib - program works |
16:47:58 | filwit | yeah 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:30 | spt | pattern: could not load: libiup(|3.0|2.7|2.6|2.5|2.4).so(|.1) |
16:48:49 | spt | "libiup.so" - norm for it |
16:49:29 | spt | no more symlinks for libiup.so in system |
16:50:02 | filwit | there might be in other places where the PATH points too.. and then youre libiup.so if found.. just saying |
16:50:53 | filwit | you 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:15 | def- | spt:try --passL:"-Wl,-rpath=." |
16:51:18 | spt | no no, i'm get this lib out of system not throuth repository, just download |
16:51:58 | spt | WORK! |
16:52:08 | Araq | spt: one solution people use on Linux is to write a small shell script setting up LD_LIBRARY_PATH |
16:52:13 | filwit | great! thanks def-... the solution was so obvious... |
16:52:21 | def- | great, passC is for the compilation, passL for the linking |
16:52:25 | spt | i know LD_LIBRARY |
16:52:34 | * | Sembei joined #nim |
16:52:45 | spt | but --passL:"-Wl,-rpath=." - work fine, TNX DEF |
16:54:08 | def- | When you think about it's a bit funny, telling the Nim compiler to tell gcc to tell ld to use -rpath=. |
16:54:32 | spt | tnx filwit, ephja, def for spend your time for my stupid question |
16:54:43 | spt | and Araq too |
16:54:44 | def- | spt: not a stupid question at all, I'll need this as well |
16:54:55 | filwit | def: well it makes sense.. and I'm completely aware of the two commands.. just kinda early in the morning for me today :\ |
16:56:46 | spt | nice phrase - "telling the Nim compiler to tell gcc to tell ld to use -rpath=." :) |
17:02:20 | ephja | only passL? or both? |
17:02:30 | def- | ephja: only passL |
17:02:38 | spt | yep, passL |
17:02:45 | def- | ephja: it's an argument for the linker (ld) and so it's only necessary at the linking step |
17:04:58 | filwit | btw, 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:03 | ephja | right, because it's a separate step (gcc -c) |
17:05:14 | filwit | does anyone know how to get VC++ working with Nim? |
17:07:45 | def- | filwit: you might want to edit the objExt in compiler/platform.nim |
17:08:19 | filwit | def-: k, was thinking it was probably just a bug due to just lack of use |
17:08:38 | def- | filwit: Visual C++ on Windows? Because according to that file .obj should be used on Windows already |
17:09:16 | filwit | def-: well I tried this IDK, a month ago.. I'll give it another shot again soon and see what happens |
17:09:28 | filwit | trying to figure out something else ATM |
17:10:42 | ephja | "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:42 | ldlework | Araq: 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:43 | ldlework | echo -12.0 mod 10.0 |
21:21:51 | ldlework | gives me an error about the `.` operator :3 |
21:21:53 | ldlework | yikes |
21:22:05 | ldlework | I should just always use parens |
21:23:42 | def- | ldlework: i don't see it, only get an error because `mod` is not defined for floats |
21:23:50 | ldlework | def-: import math |
21:23:59 | def- | works for me |
21:24:01 | def- | no error |
21:24:20 | ldlework | f.nim(2, 6) Error: type mismatch: got (proc (x: varargs[typed]){.gcsafe, locks: 0.}, float) |
21:24:34 | ldlework | for: |
21:24:36 | ldlework | import math |
21:24:38 | ldlework | echo -12.0 mod 10.0 |
21:24:51 | def- | try most recent devel branch of Nim |
21:25:07 | ldlework | def-: another problem |
21:25:14 | ldlework | math.floor(-1.2) gives -1 |
21:25:40 | def- | ldlework: gives -2 for me |
21:25:42 | ldlework | wtf |
21:26:44 | * | ldlework updates |
21:28:13 | ldlework | heh I wonder if my bugs go away now :D |
21:28:49 | def- | alternatively, maybe you have a math.nim file with other definitions |
21:29:24 | ldlework | nope, I was running 0.12 |
21:29:29 | ldlework | fixed in 0.13 apparently |
21:29:32 | ldlework | thanks |
21:29:33 | def- | ok, great |
21:29:53 | ldlework | I've been thinking I was bad at math for like three days :( |
21:30:02 | ldlework | hehe |
21:31:57 | ephja | what do you need unsigned integers for? |
21:36:44 | * | Matthias247 quit (Quit: Matthias247) |
21:42:53 | ephja | I don't remember all the reasons why he thinks they are bad, but it's true that they rarely are necessary |
21:48:26 | dom96 | https://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:37 | reactormonk | pretty sure the part about the block comments should be updated. |
22:20:29 | * | irrequietus quit () |
22:26:13 | dom96 | reactormonk: it's a wiki, have at it ;) |
22:26:28 | ldlework | Another reason is that noise generators rarely work with negative coordinates |
22:26:32 | ldlework | the one in the stdlib does not |
22:26:39 | reactormonk | Then I'd have to look up what the block comment syntax is... |
22:26:46 | reactormonk | Just delete it? |
22:29:45 | dom96 | just search for it on github |
22:29:47 | dom96 | it's not hard to find |
22:33:45 | * | mat4 quit (Quit: Verlassend) |
22:38:26 | ephja | ldlework: ok but is the extended positive range necessary? |
22:38:37 | ldlework | Its certainly nice? |
22:38:50 | ldlework | I mean, more capacity is certainly helpful.. |
22:41:20 | * | Matthias247 joined #nim |
22:45:42 | ephja | the additional range is often not necessary, but if it is, then sure use unsigned integers |
22:50:27 | ephja | they aren't needed for indexing for example |
22:52:30 | ephja | well, 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:47 | ga2arch | hi, is it safe to pass a pointer of a global var between threads ? |
22:58:06 | ga2arch | safe i mean, "allowed" by nim ? |
22:58:28 | ephja | ldlework: I would use SomeInteger for such interfaces (SomeSignedInt | SomeUnsignedInt), even though signed integers would be fine in most cases |
22:58:31 | dom96 | only if it's allocated via allocShared |
22:58:55 | ldlework | ephja: the library produces wrong output with negative numbers |
22:59:06 | ldlework | you can't just say "signed integers are fine!" |
22:59:17 | ldlework | in this case negatives break the math the perlin library is using |
22:59:25 | ldlework | so... |
22:59:58 | ephja | I didn't |
23:00:25 | ephja | ok I wouldn't use signed integers then, of course |
23:00:33 | ldlework | Sorry I was getting the impression you were just waving away the details and suggesting signed integers are fine for everything |
23:01:27 | ga2arch | dom96: 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:21 | ephja | ldlework: 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:52 | ephja | I was just stressing the point that they aren't needed very often, and this is just another suggestion |
23:17:17 | ephja | they 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:44 | filwit | ephja you can make a converter for that tho |
23:17:47 | ephja | perhaps it will work at some point, but I'll just replace some tuple instances with objects for now |
23:18:12 | ephja | yes I know. it's a decent workaround |
23:19:11 | ephja | speaking 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 |