<< 11-03-2017 >>

00:00:59*libman quit (Quit: Connection closed for inactivity)
00:05:39*rauss joined #nim
00:37:00*def-pri-pub joined #nim
00:37:29*Ven quit (Ping timeout: 240 seconds)
00:38:00*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
00:40:10*Ven joined #nim
00:47:57*Matthias247 quit (Read error: Connection reset by peer)
00:56:34*roygbiv joined #nim
01:05:32*roygbiv quit (Quit: ™)
01:08:38*jivank_ joined #nim
01:09:47*aedigix quit (Remote host closed the connection)
01:10:09*aedigix joined #nim
01:14:02*aedigix quit (Remote host closed the connection)
01:15:25*aedigix joined #nim
01:47:52*bjz joined #nim
02:22:20*Ven quit (Ping timeout: 246 seconds)
02:23:44*girvo joined #nim
02:25:08*Ven joined #nim
02:32:09*girvo quit (Ping timeout: 260 seconds)
02:32:49*chemist69 quit (Ping timeout: 240 seconds)
02:33:29*yglukhov joined #nim
02:46:23*yglukhov quit (Remote host closed the connection)
02:46:51*yglukhov joined #nim
02:46:51*chemist69 joined #nim
02:51:37*girvo joined #nim
02:55:57*girvo quit (Ping timeout: 240 seconds)
02:56:39*yglukhov quit (Remote host closed the connection)
02:58:10*yglukhov joined #nim
02:58:20*girvo joined #nim
02:58:50*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
03:02:57*girvo quit (Ping timeout: 260 seconds)
03:04:50*girvo joined #nim
03:07:54*dddddd quit (Remote host closed the connection)
03:09:29*girvo quit (Ping timeout: 268 seconds)
03:09:39*yglukhov quit (Remote host closed the connection)
03:11:53*yglukhov joined #nim
03:17:53*Jesin quit (Ping timeout: 260 seconds)
03:24:39*vlad1777d quit (Quit: Leaving)
03:29:52*yglukhov quit (Remote host closed the connection)
03:33:27*yglukhov joined #nim
03:39:54*brson quit (Quit: leaving)
03:44:12*Jesin joined #nim
03:45:10*bjz joined #nim
03:52:21*Ven quit (Ping timeout: 256 seconds)
03:57:34*Ven joined #nim
04:05:07*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
04:08:16*IrcDroidClient joined #nim
04:13:13*bjz joined #nim
04:17:36*IrcDroidClient quit (Ping timeout: 240 seconds)
04:34:35*chemist69 quit (Ping timeout: 264 seconds)
04:37:41*Ven quit (Ping timeout: 256 seconds)
04:38:35*chemist69 joined #nim
04:39:48*Jesin quit (Quit: Leaving)
04:41:12*Ven joined #nim
04:44:37*Jesin joined #nim
05:07:45zachcarterDoes anyone know how to specify a library search path with the nim compiler? I —clibdir doesn’t seem to be working
05:08:27*bjz_ joined #nim
05:11:35*bjz quit (Ping timeout: 268 seconds)
05:14:01*ofelas quit (Remote host closed the connection)
05:16:18*ofelas joined #nim
05:22:58*Ven quit (Ping timeout: 240 seconds)
05:23:28*lenstr joined #nim
05:25:43*Ven joined #nim
05:54:39*yglukhov quit (Remote host closed the connection)
06:39:21ldleworkWhen using nimlang/nim:alpine I can't execute Nimble
06:42:59*chemist69 quit (Ping timeout: 264 seconds)
06:43:17Araqldlework: what is nimlang/nim:alphine ?
06:43:55ldleworkAraq, apparently the official Docker image for Nimlang
06:44:19ldleworkI think it didn't install the libcrypto apk
06:44:31ldleworkNeat reading their Nim-based build system
06:44:39ldleworkhttps://github.com/moigagoo/nimage/blob/master/build.nim
06:44:53ldleworkAlso, hi Araq hope you're well
06:45:20*chemist69 joined #nim
06:46:27ldleworkAraq: I want to build a package manager using Nim and Docker
06:46:48Araqhey, thanks, I'm fine
06:54:16AraqNim+Docker, nice. is this a package manager for an OS or for programmers?
06:57:20ldleworkAraq: my laptop recently crashed. luckily I had all my dotfiles. however, I discovered this is really only half the story
06:57:29ldleworkI had to remember what software I even used for these dotfiles
06:57:52ldleworkso I want to take things to the next level, and store dockerfile + dotfile + volume-managed state (logs, plugins, etc)
06:58:13ldleworkSo all my tools like nim, go, python, emacs, git, tig, jq, httpie, and so on and on
06:58:45ldleworkwill all be little alpine based images that are invoked via small scripts installed in /usr/local/bin that start containers invisbily
06:59:40ldleworkThey will use named volumes for their data requirements. Those volumes will be mounted into ~/.dmt/ so you can easily manipulate the state of these programs
06:59:45ldleworklike edit your weechat config or whatever
07:00:12ldleworkthen there will be a "dmt export" command which will give you a tarball which will contain all the volumes used by your installed tools, plus some metadata
07:00:47ldleworkwhen you go to a new machine with dmt installed you'll just "dmt import the.tar.gz" and it'll fetch the docker images, install the scripts in /usr/local/bin and expand your volume data back into place.
07:01:38Araqha, I know it brings bad luck to say this. but I never lost data due to a hard disk crash :-)
07:02:11ldleworkAraq: hehe, shamefully, I let my laptop's power die during an Ubuntu dist upgrade v_v'
07:02:13ldleworklol
07:02:49ldleworkBut sometimes you just want to buy a new computer too :)
07:09:38Araqhttps://blogs.msdn.microsoft.com/dotnet/2017/03/09/new-features-in-c-7-0/ C# 7 is getting more like Nim :-)
07:10:00*Vladar joined #nim
07:19:17ldleworkI love C#
07:19:23ldleworkI've been writing tons of it
07:19:27ldleworkFor Unity
07:19:51ldleworkIts in superposition with python as my favorite language
07:19:59ldleworkthen nim is #2
07:28:26Araqglad to hear it.
07:29:30Araqcan anybody confirm https://github.com/nim-lang/nimsuggest/issues/55 ?
07:30:23Araqwe use nimsuggest with a large code base all the time and recent versions got much more responsive. it's puzzling.
07:32:11*bjz_ quit (Ping timeout: 268 seconds)
07:33:37*bjz joined #nim
07:34:41*def-pri-pub quit (Quit: leaving)
07:35:56*rokups joined #nim
07:38:22*rauss quit (Quit: WeeChat 1.7)
07:41:38ldleworkCan anyone remind me how to do string interpolation?
07:43:26ldleworkoh right %
07:48:40ldleworkIs there a nice declarative argument parsing thingie?
07:51:37rokupsldlework:
07:51:44rokupsopss. anyway look on nimble
07:52:00rokupsnim itself uses very basic arg parsing so i doubt there is anything cool in stdlib
08:00:15rokupsany idea if nim script build system can have children projects (like cmake add_subdirectory()) and have options specified in parent project affect children?
08:01:39Araqspeaking of build systems.
08:02:10AraqI'd like to patch the compiler so that 'nim c -r foo' is smart and only recompiles 'foo' if necessary
08:02:27Araqfor the compiler that's very simple to do, it knows the dependencies precisely
08:02:59*sdw joined #nim
08:03:13Araqbut (a) this change affects compatibility, so maybe it should be 'nim c -x foo'
08:04:15Araqand (b) I wonder if it should only check foo's direct dependencies and e.g. skip checking if the stdlib changed
08:04:22rokupsguess answer to my question is a 'no' then :)
08:05:10Araqrokups: you can 'include' the other config file, but in general
08:05:41Araquse pragmas in the module that requires them instead of options in your config
08:05:58Araqbecause pragmas are "collected", options are not
08:06:38rokupsno idea what that means, but some stuff does not make sense to be as pragma in modules. like --nimcache or --lineDirs etc
08:06:52rokupscan nim script read env variables at least?
08:07:24rokupsoh yeah it can. great
08:07:40rokupsi think i can do what i want with some includes and Makefile ;)
08:08:01*nsf joined #nim
08:10:33Araqif you use 'make', you're doing it wrong :P
08:10:46Araqat least use 'tup' or something
08:15:16Araqbut what do you use 'make' for? I think nimscript only needs a hasChanged builtin
08:16:36*xmonader joined #nim
08:20:29rokupsi want to run one command that builds several binaries with results /bin and build files wherever else
08:24:00*Ven quit (Ping timeout: 260 seconds)
08:26:43*Ven joined #nim
08:31:41*nsf quit (Quit: WeeChat 1.7)
08:32:09ldleworkHas anyone here got nim completion working in emacs
08:33:49Araqldlework: krux02 has, reactormonk wrote it :-)
08:34:00Araqmaybe we can summon him this way
08:40:21*Ven quit (Ping timeout: 260 seconds)
08:42:02*Ven joined #nim
08:49:30*chemist69 quit (Ping timeout: 258 seconds)
08:50:02*chemist69 joined #nim
08:59:30reactormonkldlework, I haven't touched it in ages :-(
09:00:00*Trustable joined #nim
09:00:01rokupsAraq: i looked at tup. it surprises me you suggested it because it seems bigger clusterfuck of madness than Makefiles
09:01:22Araqrokups: alright, well I could have suggested https://github.com/SimonAlfie/fabricate too
09:02:17rokupsill just write a bash shellscript because its more or less same thing anyway
09:03:39Araqwhy not write a nimscript instead? :P
09:03:51Araqwhat feature is missing?
09:05:35rokupsgues i just dont know what im doing but i couldnt even declare a variable at root scope. it kept complaining about invalid flags
09:07:05cheatfate^ +1, nimscript a little bit ugly
09:07:57Araqnimscript is just Nim with a tiny stdlib
09:08:06Araqhow can it be "ugly"?
09:09:39cheatfateAraq, it has some kind of strict structure, so you dont have such freedom as you have in Nim itself...
09:10:29Araqyou need to elaborate
09:12:04cheatfateyou know, always present some things that you don't like, for me this things is parsers/compilers/interpreters, i just dont want to touch this niche
09:12:34cheatfateso i can only whine about that
09:12:54cheatfateas for me nimscript must be equal to nim
09:13:18cheatfateall specific flags must be passed as pragmas
09:13:32cheatfateso everybody knows nim understand what is pragma
09:15:41cheatfateand now every tool which uses nimscript uses its own scheme...
09:17:10cheatfatefor example `mode = ScriptMode.Verbose`
09:17:12rokupsin all honesty we could benefit from cmake support. im not writing that though :p
09:17:40cheatfatewhy not `{.scriptmode:"verbose".}`?
09:19:21cheatfatealso i'm very interesting how i can enhance nimscript with own functions?
09:19:33cheatfateis it easy?
09:19:41Araqdepends on what you're after
09:19:58cheatfateor i need to modify compiler/stdlib to implement my own function for nimscript?
09:20:07Araqwhen you use nimscript in your own program, aka import the compiler as a library, it is easy
09:20:22Araqnimscript is Nim.
09:20:34Araqproc foo(...) = # works in your nimscript file
09:20:50Araqyou don't need to modify the compiler/stdlib for that
09:20:57*gokr joined #nim
09:21:04Araqmode = ScriptMode.Verbose # that's valid Nim code
09:21:12Araq'mode' is a global variable
09:21:16*IRCFrEAK joined #nim
09:21:23Araqyou assign the enum value ScriptMode.Verbose to it
09:21:34cheatfateAraq, i understand your logic
09:21:57cheatfatebut this is somekind of system variable, so i think i can't declare `var mode = 0`
09:23:39*IRCFrEAK quit (K-Lined)
09:25:26cheatfatealso i see here https://nim-lang.org/0.11.3/nimscript.html
09:25:37cheatfatethere many variables that are nimble specific
09:25:37*Ven quit (Ping timeout: 260 seconds)
09:25:49cheatfatecan i use it?
09:25:54cheatfatein pure nimscript file?
09:26:35rokupsthere are uglier things though
09:26:42ldleworkconst module = instantiationInfo().filename[0..⁵]
09:26:50ldleworklib/system.nim(3681, 8) Error: no surrounding array access context for '^'
09:26:52ldleworkwat
09:26:53rokupsfor example exec taking single string instead of multiple strings meaning individual elements.
09:27:23rokupsi knew ^ operator was not a good idea, i knew it!
09:27:42ldlework...?
09:27:50*Ven joined #nim
09:27:58rokupsignore me :)
09:29:43rokupsAraq: well i am trying to write nimscript. turns out there is no way to get absolute path of something. CurDir (in)conveniently returns "." while it should return absolute path
09:33:26Araqldlework: interesting error
09:35:29Araqcheatfate: https://github.com/nim-lang/Nim/blob/devel/lib/system/nimscript.nim#L166
09:36:03Araqwhy would 'mode' be yet another pragma? also it's a different module, you can have your own 'var mode = 0' in your nimscript file
09:36:39Araqthe nimble specific parts could be removed again, I think
09:37:03Araqnimble now uses its own implementation for these
09:37:51ldleworkAraq, will Nim ever have first-class interpolation like in C#?
09:38:21ldleworkWhere I can just access locals straight from inside strings
09:38:55Araqrokups: CurDir doesn't do anything different from the one in os.nim. the docs do not claim anything like "get absolute path"
09:39:13ldleworkthis https://msdn.microsoft.com/en-us/library/dn961160.aspx
09:39:26ldleworkOh I guess that's a trivial macro...?
09:39:33AraqI know what string interpolation is ffs
09:39:34cheatfateAraq, just because `mode` is system specific, as for me it will be more logical clear if `mode` will be passed as pragma or as # comment
09:39:38ldleworkAraq: haha <3
09:39:44ldleworkXD
09:40:06*Ven quit (Ping timeout: 240 seconds)
09:40:22Araqldlework: it's a macro away and somebody wrote a nice nimble package to do it. we could maybe add it to the stdlib though
09:40:48Araqpackage nimfmt or something
09:40:48rokupswell yeah.. thing is i see it and think "oh thats what i need!", and then it turns out its a damn dot. same dot used on every platform. no point in having it defined even because it serves no purpose other than random noise. also this is a non-problem since there is thisDir(), but it triggers complaining button. sigh
09:41:33Araqrokups: os.nim tried to abstract away file system differences in a *consistent* way
09:41:47Araqnow you complain about its consistency, some people are never happy
09:42:04*Arrrr joined #nim
09:42:04*Arrrr quit (Changing host)
09:42:04*Arrrr joined #nim
09:42:20rokupsconsistency? every platform uses . for current dir and .. for parent dir. I understand these constants for path separators and stuff, but not for current dir ;)
09:42:30*Ven joined #nim
09:42:44Araqwhat if I write my own OS that uses _ instead of . ? :P
09:42:59Araqthen os.nim is already prepared to handle it
09:43:06rokupseveryone will make fun of you and noone will use your os :p
09:43:17Araqnow that sounds familiar.
09:43:24rokupsi mean heck, look at GNU Hurd - and they didnt even make this fatal mistake! ;))
09:45:02Araqincidentically I'd like to change file paths, they are wrong ... :P it should be foo@subdir@dir instead of dir/subdir/foo
09:45:15Araqimportant stuff must come first, not last.
09:45:19Araqbut that's offtopic.
09:45:50rokupsjust reading that might give me diarrhea ^_^
09:46:16Araqreplace @ with something more to your liking then.
09:46:28*shashlick quit (Ping timeout: 240 seconds)
09:46:57rokupsnow we are talking - pluggable path separators. everyone uses separators they like
09:47:12Araqit's not about the separator, it's about the order
09:47:23Araqand about autocompletion
09:47:37sdwhttps://nim-lang.org/docs/ospaths.html so is getCurrentWorkingDirectory missing?
09:47:42rokupsneed to pitch these ideas to that TempleOS guy, he might make it happen
09:47:47*shashlick joined #nim
09:48:26rokupssdw: same sdw from l2j?
09:48:40sdwno
09:49:22ldleworkIs there a way to do something like `import os.joinPath as join` ?
09:49:43ldlework(I'm sorry I lost all my Nimskills)
09:50:14ldleworkah
09:50:16Araqldlework: nah, but you should use / operator anyway
09:51:22Arrrrhttps://nim-lang.org/docs/os.html#getCurrentDir,
09:51:25ldleworkAraq: in what sense?
09:51:25ArrrrUnless you actually need it for nimscript
09:52:47ldleworklet
09:52:48ldlework home_dir = os.getHomeDir()
09:52:54ldleworkdmt.nim(13, 32) Error: attempting to call undeclared routine: 'home_dir'
09:52:56ldleworkwat
09:53:52ldleworkthat's 2 in an in hour ;P
09:54:19ldleworkoh I see
09:56:46*Matthias247 joined #nim
09:57:25ldleworkI need a clever name for my package manager
10:01:38Araqldlework: nocker. knocks you out.
10:04:20ldleworkAraq: its gotta be 3 letters
10:05:10ldleworkCurrently using 'dmt'
10:05:17Araqwhat? why 3 letters?
10:06:31ldleworkAraq: all the best tools are
10:06:44ldleworklol
10:06:57Araqstart with 'nocker' and remove a letter for every major release then
10:07:12Araqnocker, nocke, nock, noc <--- finally reached perfection
10:07:39ldleworkdmt: docker managed tooling
10:07:39Araqnox, noctis the night.
10:07:54ldleworkdbt - docker backed tools
10:07:58ldleworksomething like that
10:07:58Araqyeah use 'nox', it sounds interesting.
10:08:05ldleworkits probably taken
10:08:20Araq'Nim + dOcker on uniX'
10:08:29ldleworklol
10:09:35Araqhttps://nox-app-player.en.softonic.com/mac
10:09:37Araqyup, taken
10:10:08ldleworkI like DMT :)
10:11:14cheatfateall abbreviations are from cold war time... be modern use something natural :)
10:13:25rokupswhats the usecase for nim on docker?
10:14:00cheatfaterokups, CI?
10:14:22rokupsoh indeed
10:15:23ldleworkHow do I define a field on a tuple type that is a two-string tuple?
10:15:48ldleworkhmm
10:16:19ldleworkhmm what's nim's dictionary type?
10:16:40rokupstables
10:17:10ldleworkah
10:17:26rokupssmells of lua i know
10:18:49ldleworkNim has always had an abusive relationship with its stdlib
10:19:49*sdw left #nim (#nim)
10:20:21rokupsi wonder what we have to sacrifice in order to get Type.new() and Type.init() to be adopted as default constructor style. cat? dog? horse?
10:24:01Araqrokups: aha, did you just submit a proposal that actually doesn't involve a language change?
10:24:20Araqand only a slight change in the stdlib's convention?
10:24:21rokupsweird right? i must be loosing my form
10:24:24Araqif so, congrats.
10:24:40*Vladar quit (Remote host closed the connection)
10:24:45rokupsAraq: but seriously what do you think of it?
10:25:21Araqwell I'm not sure Table[int, string].init() would work out of the box. but then why wouldn't it.
10:25:52rokupsit does, i tried it with tables. ugly part is defining those procs that have template stuff. let me show you how table ones look..
10:26:21rokupsproc new*[A, B, C](_: typedesc[TableRef[A, B]], collection: A, index: proc(x: B): C): TableRef[C, B] {.inline.} = new_table_from[A, B](collection, index)
10:27:05rokupsbasically ugly part is that first param that ties proc to a type. im not sure if it could be macroed-away either
10:29:04*couven92 joined #nim
10:29:21*nsf joined #nim
10:29:39Araqmeh.
10:31:25rokupscant quite tell what that reaction means. gimme hand out here..?
10:35:16Araqit means. you made it sexier to use, but harder to write constructors
10:36:04Araqin some sense, the C++ mistake. "classes are always used, never written by mortals"
10:37:43rokupsthat is why i mentioned macro. now that i look at this snippet im not sure it is properly done either because return type does not match typedesc parameter type.
10:39:33*yglukhov joined #nim
10:42:50*yglukhov_ joined #nim
10:42:53*yglukhov quit (Read error: Connection reset by peer)
10:49:22rokupsactually macro should be very easy. and it would look like: proc new[A, B](initial_size:B=64): seq[A] {.constructor.} = ....
10:49:37*yglukhov_ quit (Ping timeout: 260 seconds)
10:49:47rokupsas far as i can tell injecting first parameter _:typedesc[ReturnType] should be enough
10:51:21*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
10:55:06*Ven quit (Ping timeout: 240 seconds)
11:02:19*Ven joined #nim
11:02:50*bjz joined #nim
11:10:35rokupsAraq: i made it easy to use: https://www.jdoodle.com/a/2tp
11:11:11*Ven quit (Ping timeout: 264 seconds)
11:12:10rokupsideally it should also validate proc result, make sure if its a ref type or not. is that possible?
11:12:38AraqI wouldn't bother. the newT convention is not checked either
11:13:17Araqnow the problem that's left that these new* and init* proc signatures look ugly in the generated documentation ...
11:13:39*IrcDroidClient joined #nim
11:13:53Araqand new users need to understand 'typedesc'
11:14:06rokupscant we patch doc tool?
11:14:36*Matthias247 quit (Read error: Connection reset by peer)
11:14:48Araqand what about nimsuggest integration?
11:15:48Araqyou only create more complexity. and for what? Table.new is not even shorter than newTable.
11:16:18rokupsthis is snowballing rather quick ;) nimsuggest works out of the box, but signature does display that _:typedesc thing so that probably also needs patching? or maybe not? new(seq[int], ..) also valid
11:16:24rokupsit gives more clarity to code though
11:17:33Araqno, it's anything but clear. it looks sexy though.
11:18:19Araqthe _: typedesc is not "clarity" otherwise we wouldn't consider to hide it.
11:18:36rokupsi mean on surface :p
11:19:06AraqNim needs to get back to my original vision.
11:19:38Araqa simple procedural language that leverages meta-programming to get what other languages need to have builtin.
11:20:14rokupswell this is more about ugly stdlib, not about language lacking :p
11:20:53Araqso that it can be implemented with sparse developer resources, has fewer gotchas (once you know the rules) and gets v1 out in time.
11:21:27AraqI haven't sticked to my vision and that's why v1 is still not out.
11:22:07*Ven joined #nim
11:23:01*Ven quit (Read error: Connection reset by peer)
11:23:20Araqunfortunately my vision never considered to have users that demand features ... :P
11:23:26*IrcDroidClient quit (Ping timeout: 268 seconds)
11:25:41*deavmi joined #nim
11:27:54rokupswho would have thought... :D
11:27:59*tankfeeder joined #nim
11:28:41rokupson the second thought i am not entirely sure hiding typedesc thing is a good idea. for type.new() its fine, but then people who like new(type, ..) would be confused
11:31:35*gokr quit (Ping timeout: 264 seconds)
11:41:21*xmonader quit (Remote host closed the connection)
11:42:07*Ven joined #nim
11:46:19*wan quit (Quit: WeeChat 1.7)
11:47:27dom96the newT/initT convention is pretty well accepted nowadays
11:48:09dom96And its in my book as well
11:54:22*Vladar joined #nim
11:56:07*Ven quit (Ping timeout: 268 seconds)
11:59:58FromGitter<rsirres> Hi guys
12:01:07FromGitter<rsirres> what is the difference between the tables and strtabs module ?
12:01:54*Ven joined #nim
12:02:49*tankfeeder quit (Quit: Leaving)
12:05:42Araqrsirres: strtabs supports case insensitive keys but apart from that you should use tables
12:07:57FromGitter<rsirres> Thx @Araq
12:12:23*Ven quit (Ping timeout: 264 seconds)
12:21:52*Ven joined #nim
12:23:34*Ven quit (Read error: Connection reset by peer)
12:36:02FromGitter<Varriount> I'll admit that Nim's lack of constructors confused me a bit when I first encountered the language, but it makes sense when you consider the fact that Nim's paves match less focus on the OO paradigm.
12:42:11*Ven joined #nim
12:44:19*bjz_ joined #nim
12:44:58*bjz quit (Ping timeout: 240 seconds)
12:55:29*chemist69 quit (Ping timeout: 240 seconds)
12:56:59*Ven quit (Ping timeout: 260 seconds)
12:58:04*chemist69 joined #nim
12:59:28*deavmi quit (Quit: deavmi)
13:01:52*Ven joined #nim
13:06:21*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
13:09:55zachcarterVarriount: gave up on nim-bgfx
13:10:05*Arrrr quit (Ping timeout: 260 seconds)
13:12:27*Ven quit (Ping timeout: 240 seconds)
13:21:45*Ven joined #nim
13:23:46*Ven quit (Read error: Connection reset by peer)
13:23:55rokupscute: Error: cannot instantiate Table / got: (A, B) / but expected: (A, B)
13:32:55rokupsthis is clearly a bug. see this: https://jdoodle.com/a/2tt
13:32:56*PMunch joined #nim
13:33:13PMunchIs there anything like pyudev for Nim
13:33:24rokupsAST is same in both cases, however proc that is modified by macro causes this error. how do i even name bug report..
13:34:14rokupsPMunch: nimble has no packages with "udev" in the name so my guess is not
13:34:55PMunchHmm, saw that as well
13:38:21PMunchBut there are some packages which are not on Nimble
13:41:51*Ven joined #nim
13:45:04rokupsbug report with very awkward title: https://github.com/nim-lang/Nim/issues/5507
13:46:55*PMunch quit (Quit: leaving)
13:58:17*Ven quit (Read error: Connection reset by peer)
13:58:28*ibk joined #nim
14:01:32*Ven joined #nim
14:03:59*fold4 quit (Ping timeout: 264 seconds)
14:11:26*Ven quit (Ping timeout: 246 seconds)
14:20:09*gokr joined #nim
14:21:27*Ven joined #nim
14:24:46*Ven quit (Read error: Connection reset by peer)
14:34:34*nsf quit (Quit: WeeChat 1.7)
14:41:37*Ven joined #nim
14:45:11zachcarterhow do I link to a shared library on linux with nimc?
14:45:32zachcarterI’m trying combinations of passL:-L/usr/local/lib passL:-llibnamehere
14:45:34zachcarterbut that’s not working for me
14:47:10zachcarternevermind I think I’m doing something stupid...
14:49:35*gokr quit (Ping timeout: 264 seconds)
14:49:48zachcarteractually nevemrind, still not getting how this works on linux
14:50:35demi-that is how that works
14:51:25zachcarteralright thanks
14:51:44demi-can you show what you are doing? that might help uncover the problem
14:52:33zachcarterSure
14:52:41zachcarterlet me put together a gist one second
14:55:09*rauss joined #nim
14:55:58*couven92 quit (Ping timeout: 240 seconds)
14:57:30*Ven quit (Ping timeout: 258 seconds)
14:59:00zachcarterdemo-:
14:59:04zachcarterdemi-: sorry
14:59:05zachcarterhttps://gist.github.com/anonymous/6c2ed2d8c1ad1d5de1aeb26f99433fd8
14:59:08zachcartersorry that took so long
15:00:11demi-no worries, let me take a look
15:00:24zachcarterthanks
15:01:19*Ven joined #nim
15:01:35demi-zachcarter: you need to pass `-lSoloudDynamic`, the `lib` part of the name is inferred
15:01:41zachcarterahhh thank you
15:02:26zachcarterthat resolves that error, but then I’m back to my original error which is :
15:02:45zachcartercould not load: libSoLoudDynamic.so
15:03:30*couven92 joined #nim
15:05:24zachcarterit’s almost like the linker wants me to specify /usr/local/lib/
15:05:33zachcarterbefore the lib name or something
15:05:52demi-this is on linux right?
15:05:57zachcarteryeah ubuntu
15:06:19zachcarteralthough another member in here is tryin to get this to work on arch-linux and is facing the same problem, this works fine on osx
15:07:05demi-yeah, i'm familiar with the implementation details of the dynamic linker works on OS X, but not on ubuntu or arch-linux (if they use such a system)
15:07:42demi-but it seems like you need to specify search paths that the binary would use to load such a library at launch-time
15:08:12zachcarteryeah
15:08:27zachcarterhere’s something interesting : if I hardcode the library name in the bindings file
15:08:30zachcarterwith the path
15:09:37demi-your alternative would be to drop the library search path and specify the full path to the location -- however this is sometimes a problem when working with wrappers because the path may live at another location -- and forces the consumer of the library wrapper to reimplement or modify the existing package to work (which is very much not desirable)
15:09:44zachcarterI get this error :
15:10:02zachcarterhrm clipboard seems to be broken
15:10:22zachcarteryeah that definitely isn't
15:10:36zachcartereven if I specify the full path I get a very strange error : /usr/local/lib/libSoloudDynamic.so: undefined symbol: _ZN6SoLoud6SoloudD1Ev
15:12:23FromGitter<evacchi> araq: well you could temporarily *drop* some features for 1.0 :P
15:12:27*Ven quit (Ping timeout: 258 seconds)
15:12:39demi-ah i see
15:12:46demi-is this library written in C++?
15:12:54Araqevacchi: we kind of do this, move features under .experimental :P
15:13:03FromGitter<evacchi> :P
15:13:24zachcarteryeah but it has a C API I’m binding to
15:13:35zachcarterI think it makes sense why I get that last error
15:13:44zachcarterbecause that’s not actually the name of the library
15:13:48demi-because it cannot resolve the mangled symbol name
15:15:12zachcarterhmm
15:16:31demi-zachcarter: i believe this means that you are defining a symbol that doesn't exist in the main library
15:16:47zachcarterI wonder why this works on osx then
15:17:07demi-different version of the library, different symbols would be exposed
15:17:10Araqdifferent symbol mangling rules for osx?
15:17:12zachcarteryeah
15:17:14zachcarterperhaps
15:17:25zachcarterI’ll go look at the C API header and see if that’s indeed the case
15:17:29demi-Araq: no, C++ name mangling is universal
15:17:52Araqhardly, it was compiler specific the last time I checked
15:18:39zachcarterhttps://github.com/jarikomppa/soloud/blob/master/include/soloud.h
15:18:51zachcarternot much in there that would differ based on OS :/
15:19:44demi-hmm, that doesn't look like a valid C++ mangled name tho
15:19:58demi-it is missing the leading underscore
15:20:12zachcarter_ZN6SoLoud6SoloudD1Ev ?
15:20:32demi-yeah
15:20:41zachcarterwell that’s the error I get when I do
15:20:43demi-otherwise it would be `SoLoud::Soloud::~Soloud()`
15:20:53zachcarterah
15:21:05zachcarterwell that’s the error I get when I specify the full library path in the bindings
15:21:08zachcarterwhich I don’t think is correct
15:21:16*Ven joined #nim
15:21:55zachcarterI believe the dynlib pragma wants the name of the library
15:21:58zachcarternot the name and its filepath
15:22:06zachcarterbut if I just specify the library name
15:22:24demi-that is most likely
15:22:53zachcarterlibSoloudDynamic.so: cannot open shared object file: No such file or directory
15:22:53zachcartercould not load: libSoloudDynamic.so
15:23:05zachcarterwhich makes it sound like the path needs to be specified lol!
15:23:32zachcarterand to hell with linker search paths! because that doesn’t seem to have an effect on anything lol
15:23:51zachcarterthis whole thing is quite confusing
15:26:14demi-so on OS X we have a dynamic linker, which is responsible for loading up the executable at runtime, then examines some data embedded within the binary to locate the runtime search paths to load dynamic libraries into the address space of the application you are running, so OS X solves this by having these paths embedded to look up the library in, does linux have a similar concept, and if so can you look at the
15:26:16demi-binary you produce to see if they are missing?
15:27:04zachcarterI can try
15:27:39*Ven quit (Ping timeout: 256 seconds)
15:29:39*nsf joined #nim
15:41:33*Ven joined #nim
15:43:08*rosshadden joined #nim
15:43:12*rosshadden quit (Client Quit)
15:48:55zachcarterdemi-: when you suggested examining the binary, did you mean the shared library I produced?
15:49:30demi-yeah or the test app or whatever you are attempting to get working, if it can build and link but fails at runtime
15:49:48zachcarterah no the test app won’t build or link
15:49:54zachcarternot on linux anyway
15:50:00*smt quit (Read error: Connection reset by peer)
15:51:47*smt joined #nim
15:52:42zachcarterwell here ar ethe symbols the library contains : https://gist.github.com/zacharycarter/ca3f8ae91f36133b61d29c25c0b2d971
15:53:24zachcarterI see that _ZN6SoLoud6SoloudD1Ev symbol there...
15:55:23*arnetheduck quit (Ping timeout: 268 seconds)
15:57:57*Ven quit (Ping timeout: 240 seconds)
16:00:48*fold4 joined #nim
16:01:08*libman joined #nim
16:02:30*Ven joined #nim
16:03:33*couven92 quit (Read error: Connection reset by peer)
16:05:30federico3demi-: there's a similar mechanism. Are you sure the lib is installed and the soname is correct?
16:07:23zachcarterthe library is in my /usr/local/lib folder and the soname is correct
16:09:23zachcarterfederico3: the soname in the bindings should match the filename correct?
16:11:09federico3yes
16:11:17*Ven quit (Ping timeout: 256 seconds)
16:11:45zachcarterokay I think installing it into /usr/lib instead of /usr/local/lib got me a little further
16:12:14zachcarterbut now I’m running into : /usr/local/lib/libSoloudDynamic.so: undefined symbol: _ZN6SoLoud6SoloudD1Ev again
16:16:09zachcarterif I do an nm -g on the shared library I see that symbol
16:21:27*Jesin quit (Quit: Leaving)
16:22:23Araqzachcarter: link statically to the library instead. I now consider dynamic link libraries non-existent on Unix
16:23:08zachcarterAraq: alright can I conditionally link dynamically on osx / windows and statically on linux?
16:23:29Araqyes, via a custrom .pragma pragma
16:23:37Araqor with --dynlibOverride
16:23:47cheatfateAraq, i think its the same problem we got in BSDs
16:24:21zachcarterthank you Araq
16:25:10cheatfateits because system loader looking for shared objects only at specific locations
16:25:28*Jesin joined #nim
16:25:40cheatfateon latest linux distros
16:25:42demi-:(
16:25:48demi-static linking is gross
16:26:05federico3yep
16:26:44cheatfatenope, you just need to modify binary with linker option -Wl,r
16:28:23cheatfate-Wl,-rpath=
16:28:26cheatfateto be exactly
16:28:58cheatfateso system loader will looks for shared object in specific locations
16:29:02demi-ah so it is the same system then
16:29:37demi-you do that for OS X as well, but on linking it will generate those commands for you automatically
16:30:29federico3zachcarter: how's the shared lib installed? this is not a Nim specific issue: other applications might fail to load the shared obj
16:30:49zachcarterI just copied it to /usr/lib after building it
16:30:56cheatfatei have made such changes for `nim.cfg`
16:31:12cheatfatezachcarter, u said you your library inside of /usr/local/lib
16:31:18zachcarterit was
16:31:18cheatfateand now you are saying it in /usr/lib
16:31:22zachcarterI moved it to /usr/lib
16:46:40zachcarterAraq: I think the dynlibOverride thing is working for me now, but I’m facing still yet another issue. The symbol names in my static library are mangled and the importc pragmas I have don’t matched the mangled names. What’s the propper way to resolve this?
16:47:15Araqzachcarter use nim devel and importcpp instead of importc ?
16:47:28zachcarterthanks
16:47:48Araqor the other way round: importc adds an extern "C" declaration in 'nim cpp' mode
16:48:03Araqdepends on what you need.
16:48:18zachcartergotcha
17:00:04*Matthias247 joined #nim
17:01:16*smt_ joined #nim
17:03:22zachcartercheatfate: can you give me an example of a nimcfg with -Wl,-rpath= ?
17:03:42cheatfatezachcarter, try to search nim.cfg for this string...
17:03:52zachcarterwhich nim.cfg though?
17:03:57*smt quit (Ping timeout: 240 seconds)
17:04:33cheatfateconfig/nim.cfg
17:06:56zachcarterthanks
17:28:42*vlad1777d joined #nim
17:58:26*Vladar quit (Remote host closed the connection)
18:22:51*elrood joined #nim
18:22:53*PMunch joined #nim
18:36:00zachcarterI’m trying to build nimble from source using nim devel on ubnutu and nimble is failing to compile, is that to be expected or?
18:42:17raussIt's not expected
18:42:52raussWorks fine for me on Arch. I would think it would be even more likely to work on Ubuntu.
18:51:28dom96zachcarter: Most common reason for that is that you've installed Nim into /usr/bin
18:51:48zachcarteryup dom96
18:51:52dom96but without seeing the error it's hard to say what the real problem is
18:52:35zachcarterthank you
18:52:43zachcarterthat’s the problem
18:56:16*ibk quit (Quit: Connection closed for inactivity)
19:01:08*wicast joined #nim
19:06:31*bjz joined #nim
19:06:59*chemist69 quit (Ping timeout: 264 seconds)
19:08:14*zachcarter_ joined #nim
19:08:47*wicast quit (Quit: Hermes - Material IRC Client - https://numixproject.org/)
19:08:59*chemist69 joined #nim
19:11:29*zachcarter quit (Ping timeout: 268 seconds)
19:11:30*zachcarter_ is now known as zachcarter
19:18:18*gk-- joined #nim
19:20:49*gk-- quit (K-Lined)
19:26:52raussdom96: What's wrong with installing nim into /usr/bin? That's what I did
19:27:08raussOr are you just saying if you do that, you need to configure nimble accordingly?
19:28:36dom96rauss: there is nothing wrong
19:28:51dom96But there is a higher probability that compiling Nimble will fail for you
19:29:04raussOkay
19:29:39dom96I still consider that a Nim bug, but I don't think Araq agrees.
19:33:56AraqI don't see any bugs. nim works in /usr/bin and nimble does too
19:36:03Araqif you cannot *compile* Nimble then maybe you should compile it as our instructions recommend.
19:56:18*rauss quit (Quit: WeeChat 1.7)
20:05:44*nsf quit (Quit: WeeChat 1.7)
20:08:40*Ven joined #nim
20:12:13*rokups quit (Quit: Connection closed for inactivity)
20:17:42*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
20:23:54*deavmi joined #nim
20:29:09*StarBrilliant quit (Quit: ZNC - http://znc.in)
20:41:03*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:44:58*cheatfate quit (Ping timeout: 240 seconds)
20:59:37*deavmi quit (Quit: deavmi)
21:04:39*Jesin quit (Quit: Leaving)
21:07:38*Ven joined #nim
21:07:52*Ven quit (Client Quit)
21:09:33*Ven joined #nim
21:10:02*roygbiv joined #nim
21:12:26*synshroud joined #nim
21:25:01*synshroud quit (Quit: ZNC 1.6.4 - http://znc.in)
21:28:19*smt__ joined #nim
21:30:28*SusWombat_ joined #nim
21:30:42*SusWombat quit (Read error: Connection reset by peer)
21:32:04*smt_ quit (Ping timeout: 260 seconds)
21:33:35*elrood quit (Quit: Leaving)
21:35:08*Jesin joined #nim
21:44:30*bjz joined #nim
21:46:13*SusWombat_ quit (Ping timeout: 260 seconds)
21:50:22*SusWombat joined #nim
22:30:20*BlaXpirit quit (Quit: Bye)
22:31:04*BlaXpirit joined #nim
22:31:12*Guest45612 joined #nim
22:35:00*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:37:11*abeaumont quit (Remote host closed the connection)
22:38:03*abeaumont joined #nim
22:39:16*Guest45612 quit (Remote host closed the connection)
22:42:10*cheatfate joined #nim
22:42:40*butchster_ joined #nim
22:44:49*rauce quit (Read error: Connection reset by peer)
22:44:51*butchster quit (Ping timeout: 268 seconds)
22:58:11*rauce joined #nim
22:58:23*Trustable quit (Remote host closed the connection)
23:11:22*rauce quit (Read error: Connection reset by peer)
23:13:07*Nobabs27 joined #nim
23:14:57*rauce joined #nim
23:16:17*chemist69 quit (Ping timeout: 260 seconds)
23:18:23*chemist69 joined #nim
23:32:38*Nobabs27 quit (Quit: Leaving)
23:37:02*bjz joined #nim
23:54:26*shashlick quit (Ping timeout: 240 seconds)
23:54:52*shashlick joined #nim