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:45 | zachcarter | Does 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:21 | ldlework | When using nimlang/nim:alpine I can't execute Nimble |
06:42:59 | * | chemist69 quit (Ping timeout: 264 seconds) |
06:43:17 | Araq | ldlework: what is nimlang/nim:alphine ? |
06:43:55 | ldlework | Araq, apparently the official Docker image for Nimlang |
06:44:19 | ldlework | I think it didn't install the libcrypto apk |
06:44:31 | ldlework | Neat reading their Nim-based build system |
06:44:39 | ldlework | https://github.com/moigagoo/nimage/blob/master/build.nim |
06:44:53 | ldlework | Also, hi Araq hope you're well |
06:45:20 | * | chemist69 joined #nim |
06:46:27 | ldlework | Araq: I want to build a package manager using Nim and Docker |
06:46:48 | Araq | hey, thanks, I'm fine |
06:54:16 | Araq | Nim+Docker, nice. is this a package manager for an OS or for programmers? |
06:57:20 | ldlework | Araq: my laptop recently crashed. luckily I had all my dotfiles. however, I discovered this is really only half the story |
06:57:29 | ldlework | I had to remember what software I even used for these dotfiles |
06:57:52 | ldlework | so I want to take things to the next level, and store dockerfile + dotfile + volume-managed state (logs, plugins, etc) |
06:58:13 | ldlework | So all my tools like nim, go, python, emacs, git, tig, jq, httpie, and so on and on |
06:58:45 | ldlework | will all be little alpine based images that are invoked via small scripts installed in /usr/local/bin that start containers invisbily |
06:59:40 | ldlework | They 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:45 | ldlework | like edit your weechat config or whatever |
07:00:12 | ldlework | then 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:47 | ldlework | when 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:38 | Araq | ha, I know it brings bad luck to say this. but I never lost data due to a hard disk crash :-) |
07:02:11 | ldlework | Araq: hehe, shamefully, I let my laptop's power die during an Ubuntu dist upgrade v_v' |
07:02:13 | ldlework | lol |
07:02:49 | ldlework | But sometimes you just want to buy a new computer too :) |
07:09:38 | Araq | https://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:17 | ldlework | I love C# |
07:19:23 | ldlework | I've been writing tons of it |
07:19:27 | ldlework | For Unity |
07:19:51 | ldlework | Its in superposition with python as my favorite language |
07:19:59 | ldlework | then nim is #2 |
07:28:26 | Araq | glad to hear it. |
07:29:30 | Araq | can anybody confirm https://github.com/nim-lang/nimsuggest/issues/55 ? |
07:30:23 | Araq | we 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:38 | ldlework | Can anyone remind me how to do string interpolation? |
07:43:26 | ldlework | oh right % |
07:48:40 | ldlework | Is there a nice declarative argument parsing thingie? |
07:51:37 | rokups | ldlework: |
07:51:44 | rokups | opss. anyway look on nimble |
07:52:00 | rokups | nim itself uses very basic arg parsing so i doubt there is anything cool in stdlib |
08:00:15 | rokups | any 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:39 | Araq | speaking of build systems. |
08:02:10 | Araq | I'd like to patch the compiler so that 'nim c -r foo' is smart and only recompiles 'foo' if necessary |
08:02:27 | Araq | for the compiler that's very simple to do, it knows the dependencies precisely |
08:02:59 | * | sdw joined #nim |
08:03:13 | Araq | but (a) this change affects compatibility, so maybe it should be 'nim c -x foo' |
08:04:15 | Araq | and (b) I wonder if it should only check foo's direct dependencies and e.g. skip checking if the stdlib changed |
08:04:22 | rokups | guess answer to my question is a 'no' then :) |
08:05:10 | Araq | rokups: you can 'include' the other config file, but in general |
08:05:41 | Araq | use pragmas in the module that requires them instead of options in your config |
08:05:58 | Araq | because pragmas are "collected", options are not |
08:06:38 | rokups | no idea what that means, but some stuff does not make sense to be as pragma in modules. like --nimcache or --lineDirs etc |
08:06:52 | rokups | can nim script read env variables at least? |
08:07:24 | rokups | oh yeah it can. great |
08:07:40 | rokups | i think i can do what i want with some includes and Makefile ;) |
08:08:01 | * | nsf joined #nim |
08:10:33 | Araq | if you use 'make', you're doing it wrong :P |
08:10:46 | Araq | at least use 'tup' or something |
08:15:16 | Araq | but what do you use 'make' for? I think nimscript only needs a hasChanged builtin |
08:16:36 | * | xmonader joined #nim |
08:20:29 | rokups | i 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:09 | ldlework | Has anyone here got nim completion working in emacs |
08:33:49 | Araq | ldlework: krux02 has, reactormonk wrote it :-) |
08:34:00 | Araq | maybe 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:30 | reactormonk | ldlework, I haven't touched it in ages :-( |
09:00:00 | * | Trustable joined #nim |
09:00:01 | rokups | Araq: i looked at tup. it surprises me you suggested it because it seems bigger clusterfuck of madness than Makefiles |
09:01:22 | Araq | rokups: alright, well I could have suggested https://github.com/SimonAlfie/fabricate too |
09:02:17 | rokups | ill just write a bash shellscript because its more or less same thing anyway |
09:03:39 | Araq | why not write a nimscript instead? :P |
09:03:51 | Araq | what feature is missing? |
09:05:35 | rokups | gues 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:05 | cheatfate | ^ +1, nimscript a little bit ugly |
09:07:57 | Araq | nimscript is just Nim with a tiny stdlib |
09:08:06 | Araq | how can it be "ugly"? |
09:09:39 | cheatfate | Araq, it has some kind of strict structure, so you dont have such freedom as you have in Nim itself... |
09:10:29 | Araq | you need to elaborate |
09:12:04 | cheatfate | you 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:34 | cheatfate | so i can only whine about that |
09:12:54 | cheatfate | as for me nimscript must be equal to nim |
09:13:18 | cheatfate | all specific flags must be passed as pragmas |
09:13:32 | cheatfate | so everybody knows nim understand what is pragma |
09:15:41 | cheatfate | and now every tool which uses nimscript uses its own scheme... |
09:17:10 | cheatfate | for example `mode = ScriptMode.Verbose` |
09:17:12 | rokups | in all honesty we could benefit from cmake support. im not writing that though :p |
09:17:40 | cheatfate | why not `{.scriptmode:"verbose".}`? |
09:19:21 | cheatfate | also i'm very interesting how i can enhance nimscript with own functions? |
09:19:33 | cheatfate | is it easy? |
09:19:41 | Araq | depends on what you're after |
09:19:58 | cheatfate | or i need to modify compiler/stdlib to implement my own function for nimscript? |
09:20:07 | Araq | when you use nimscript in your own program, aka import the compiler as a library, it is easy |
09:20:22 | Araq | nimscript is Nim. |
09:20:34 | Araq | proc foo(...) = # works in your nimscript file |
09:20:50 | Araq | you don't need to modify the compiler/stdlib for that |
09:20:57 | * | gokr joined #nim |
09:21:04 | Araq | mode = ScriptMode.Verbose # that's valid Nim code |
09:21:12 | Araq | 'mode' is a global variable |
09:21:16 | * | IRCFrEAK joined #nim |
09:21:23 | Araq | you assign the enum value ScriptMode.Verbose to it |
09:21:34 | cheatfate | Araq, i understand your logic |
09:21:57 | cheatfate | but 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:26 | cheatfate | also i see here https://nim-lang.org/0.11.3/nimscript.html |
09:25:37 | cheatfate | there many variables that are nimble specific |
09:25:37 | * | Ven quit (Ping timeout: 260 seconds) |
09:25:49 | cheatfate | can i use it? |
09:25:54 | cheatfate | in pure nimscript file? |
09:26:35 | rokups | there are uglier things though |
09:26:42 | ldlework | const module = instantiationInfo().filename[0..⁵] |
09:26:50 | ldlework | lib/system.nim(3681, 8) Error: no surrounding array access context for '^' |
09:26:52 | ldlework | wat |
09:26:53 | rokups | for example exec taking single string instead of multiple strings meaning individual elements. |
09:27:23 | rokups | i knew ^ operator was not a good idea, i knew it! |
09:27:42 | ldlework | ...? |
09:27:50 | * | Ven joined #nim |
09:27:58 | rokups | ignore me :) |
09:29:43 | rokups | Araq: 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:26 | Araq | ldlework: interesting error |
09:35:29 | Araq | cheatfate: https://github.com/nim-lang/Nim/blob/devel/lib/system/nimscript.nim#L166 |
09:36:03 | Araq | why 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:39 | Araq | the nimble specific parts could be removed again, I think |
09:37:03 | Araq | nimble now uses its own implementation for these |
09:37:51 | ldlework | Araq, will Nim ever have first-class interpolation like in C#? |
09:38:21 | ldlework | Where I can just access locals straight from inside strings |
09:38:55 | Araq | rokups: CurDir doesn't do anything different from the one in os.nim. the docs do not claim anything like "get absolute path" |
09:39:13 | ldlework | this https://msdn.microsoft.com/en-us/library/dn961160.aspx |
09:39:26 | ldlework | Oh I guess that's a trivial macro...? |
09:39:33 | Araq | I know what string interpolation is ffs |
09:39:34 | cheatfate | Araq, 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:38 | ldlework | Araq: haha <3 |
09:39:44 | ldlework | XD |
09:40:06 | * | Ven quit (Ping timeout: 240 seconds) |
09:40:22 | Araq | ldlework: 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:48 | Araq | package nimfmt or something |
09:40:48 | rokups | well 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:33 | Araq | rokups: os.nim tried to abstract away file system differences in a *consistent* way |
09:41:47 | Araq | now 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:20 | rokups | consistency? 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:44 | Araq | what if I write my own OS that uses _ instead of . ? :P |
09:42:59 | Araq | then os.nim is already prepared to handle it |
09:43:06 | rokups | everyone will make fun of you and noone will use your os :p |
09:43:17 | Araq | now that sounds familiar. |
09:43:24 | rokups | i mean heck, look at GNU Hurd - and they didnt even make this fatal mistake! ;)) |
09:45:02 | Araq | incidentically I'd like to change file paths, they are wrong ... :P it should be foo@subdir@dir instead of dir/subdir/foo |
09:45:15 | Araq | important stuff must come first, not last. |
09:45:19 | Araq | but that's offtopic. |
09:45:50 | rokups | just reading that might give me diarrhea ^_^ |
09:46:16 | Araq | replace @ with something more to your liking then. |
09:46:28 | * | shashlick quit (Ping timeout: 240 seconds) |
09:46:57 | rokups | now we are talking - pluggable path separators. everyone uses separators they like |
09:47:12 | Araq | it's not about the separator, it's about the order |
09:47:23 | Araq | and about autocompletion |
09:47:37 | sdw | https://nim-lang.org/docs/ospaths.html so is getCurrentWorkingDirectory missing? |
09:47:42 | rokups | need to pitch these ideas to that TempleOS guy, he might make it happen |
09:47:47 | * | shashlick joined #nim |
09:48:26 | rokups | sdw: same sdw from l2j? |
09:48:40 | sdw | no |
09:49:22 | ldlework | Is there a way to do something like `import os.joinPath as join` ? |
09:49:43 | ldlework | (I'm sorry I lost all my Nimskills) |
09:50:14 | ldlework | ah |
09:50:16 | Araq | ldlework: nah, but you should use / operator anyway |
09:51:22 | Arrrr | https://nim-lang.org/docs/os.html#getCurrentDir, |
09:51:25 | ldlework | Araq: in what sense? |
09:51:25 | Arrrr | Unless you actually need it for nimscript |
09:52:47 | ldlework | let |
09:52:48 | ldlework | home_dir = os.getHomeDir() |
09:52:54 | ldlework | dmt.nim(13, 32) Error: attempting to call undeclared routine: 'home_dir' |
09:52:56 | ldlework | wat |
09:53:52 | ldlework | that's 2 in an in hour ;P |
09:54:19 | ldlework | oh I see |
09:56:46 | * | Matthias247 joined #nim |
09:57:25 | ldlework | I need a clever name for my package manager |
10:01:38 | Araq | ldlework: nocker. knocks you out. |
10:04:20 | ldlework | Araq: its gotta be 3 letters |
10:05:10 | ldlework | Currently using 'dmt' |
10:05:17 | Araq | what? why 3 letters? |
10:06:31 | ldlework | Araq: all the best tools are |
10:06:44 | ldlework | lol |
10:06:57 | Araq | start with 'nocker' and remove a letter for every major release then |
10:07:12 | Araq | nocker, nocke, nock, noc <--- finally reached perfection |
10:07:39 | ldlework | dmt: docker managed tooling |
10:07:39 | Araq | nox, noctis the night. |
10:07:54 | ldlework | dbt - docker backed tools |
10:07:58 | ldlework | something like that |
10:07:58 | Araq | yeah use 'nox', it sounds interesting. |
10:08:05 | ldlework | its probably taken |
10:08:20 | Araq | 'Nim + dOcker on uniX' |
10:08:29 | ldlework | lol |
10:09:35 | Araq | https://nox-app-player.en.softonic.com/mac |
10:09:37 | Araq | yup, taken |
10:10:08 | ldlework | I like DMT :) |
10:11:14 | cheatfate | all abbreviations are from cold war time... be modern use something natural :) |
10:13:25 | rokups | whats the usecase for nim on docker? |
10:14:00 | cheatfate | rokups, CI? |
10:14:22 | rokups | oh indeed |
10:15:23 | ldlework | How do I define a field on a tuple type that is a two-string tuple? |
10:15:48 | ldlework | hmm |
10:16:19 | ldlework | hmm what's nim's dictionary type? |
10:16:40 | rokups | tables |
10:17:10 | ldlework | ah |
10:17:26 | rokups | smells of lua i know |
10:18:49 | ldlework | Nim has always had an abusive relationship with its stdlib |
10:19:49 | * | sdw left #nim (#nim) |
10:20:21 | rokups | i 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:01 | Araq | rokups: aha, did you just submit a proposal that actually doesn't involve a language change? |
10:24:20 | Araq | and only a slight change in the stdlib's convention? |
10:24:21 | rokups | weird right? i must be loosing my form |
10:24:24 | Araq | if so, congrats. |
10:24:40 | * | Vladar quit (Remote host closed the connection) |
10:24:45 | rokups | Araq: but seriously what do you think of it? |
10:25:21 | Araq | well I'm not sure Table[int, string].init() would work out of the box. but then why wouldn't it. |
10:25:52 | rokups | it 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:21 | rokups | proc 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:05 | rokups | basically 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:39 | Araq | meh. |
10:31:25 | rokups | cant quite tell what that reaction means. gimme hand out here..? |
10:35:16 | Araq | it means. you made it sexier to use, but harder to write constructors |
10:36:04 | Araq | in some sense, the C++ mistake. "classes are always used, never written by mortals" |
10:37:43 | rokups | that 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:22 | rokups | actually 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:47 | rokups | as 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:35 | rokups | Araq: i made it easy to use: https://www.jdoodle.com/a/2tp |
11:11:11 | * | Ven quit (Ping timeout: 264 seconds) |
11:12:10 | rokups | ideally it should also validate proc result, make sure if its a ref type or not. is that possible? |
11:12:38 | Araq | I wouldn't bother. the newT convention is not checked either |
11:13:17 | Araq | now 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:53 | Araq | and new users need to understand 'typedesc' |
11:14:06 | rokups | cant we patch doc tool? |
11:14:36 | * | Matthias247 quit (Read error: Connection reset by peer) |
11:14:48 | Araq | and what about nimsuggest integration? |
11:15:48 | Araq | you only create more complexity. and for what? Table.new is not even shorter than newTable. |
11:16:18 | rokups | this 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:24 | rokups | it gives more clarity to code though |
11:17:33 | Araq | no, it's anything but clear. it looks sexy though. |
11:18:19 | Araq | the _: typedesc is not "clarity" otherwise we wouldn't consider to hide it. |
11:18:36 | rokups | i mean on surface :p |
11:19:06 | Araq | Nim needs to get back to my original vision. |
11:19:38 | Araq | a simple procedural language that leverages meta-programming to get what other languages need to have builtin. |
11:20:14 | rokups | well this is more about ugly stdlib, not about language lacking :p |
11:20:53 | Araq | so 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:27 | Araq | I 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:20 | Araq | unfortunately 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:54 | rokups | who would have thought... :D |
11:27:59 | * | tankfeeder joined #nim |
11:28:41 | rokups | on 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:27 | dom96 | the newT/initT convention is pretty well accepted nowadays |
11:48:09 | dom96 | And its in my book as well |
11:54:22 | * | Vladar joined #nim |
11:56:07 | * | Ven quit (Ping timeout: 268 seconds) |
11:59:58 | FromGitter | <rsirres> Hi guys |
12:01:07 | FromGitter | <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:42 | Araq | rsirres: strtabs supports case insensitive keys but apart from that you should use tables |
12:07:57 | FromGitter | <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:02 | FromGitter | <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:55 | zachcarter | Varriount: 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:55 | rokups | cute: Error: cannot instantiate Table / got: (A, B) / but expected: (A, B) |
13:32:55 | rokups | this is clearly a bug. see this: https://jdoodle.com/a/2tt |
13:32:56 | * | PMunch joined #nim |
13:33:13 | PMunch | Is there anything like pyudev for Nim |
13:33:24 | rokups | AST is same in both cases, however proc that is modified by macro causes this error. how do i even name bug report.. |
13:34:14 | rokups | PMunch: nimble has no packages with "udev" in the name so my guess is not |
13:34:55 | PMunch | Hmm, saw that as well |
13:38:21 | PMunch | But there are some packages which are not on Nimble |
13:41:51 | * | Ven joined #nim |
13:45:04 | rokups | bug 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:11 | zachcarter | how do I link to a shared library on linux with nimc? |
14:45:32 | zachcarter | I’m trying combinations of passL:-L/usr/local/lib passL:-llibnamehere |
14:45:34 | zachcarter | but that’s not working for me |
14:47:10 | zachcarter | nevermind I think I’m doing something stupid... |
14:49:35 | * | gokr quit (Ping timeout: 264 seconds) |
14:49:48 | zachcarter | actually nevemrind, still not getting how this works on linux |
14:50:35 | demi- | that is how that works |
14:51:25 | zachcarter | alright thanks |
14:51:44 | demi- | can you show what you are doing? that might help uncover the problem |
14:52:33 | zachcarter | Sure |
14:52:41 | zachcarter | let 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:00 | zachcarter | demo-: |
14:59:04 | zachcarter | demi-: sorry |
14:59:05 | zachcarter | https://gist.github.com/anonymous/6c2ed2d8c1ad1d5de1aeb26f99433fd8 |
14:59:08 | zachcarter | sorry that took so long |
15:00:11 | demi- | no worries, let me take a look |
15:00:24 | zachcarter | thanks |
15:01:19 | * | Ven joined #nim |
15:01:35 | demi- | zachcarter: you need to pass `-lSoloudDynamic`, the `lib` part of the name is inferred |
15:01:41 | zachcarter | ahhh thank you |
15:02:26 | zachcarter | that resolves that error, but then I’m back to my original error which is : |
15:02:45 | zachcarter | could not load: libSoLoudDynamic.so |
15:03:30 | * | couven92 joined #nim |
15:05:24 | zachcarter | it’s almost like the linker wants me to specify /usr/local/lib/ |
15:05:33 | zachcarter | before the lib name or something |
15:05:52 | demi- | this is on linux right? |
15:05:57 | zachcarter | yeah ubuntu |
15:06:19 | zachcarter | although 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:05 | demi- | 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:42 | demi- | 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:12 | zachcarter | yeah |
15:08:27 | zachcarter | here’s something interesting : if I hardcode the library name in the bindings file |
15:08:30 | zachcarter | with the path |
15:09:37 | demi- | 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:44 | zachcarter | I get this error : |
15:10:02 | zachcarter | hrm clipboard seems to be broken |
15:10:22 | zachcarter | yeah that definitely isn't |
15:10:36 | zachcarter | even if I specify the full path I get a very strange error : /usr/local/lib/libSoloudDynamic.so: undefined symbol: _ZN6SoLoud6SoloudD1Ev |
15:12:23 | FromGitter | <evacchi> araq: well you could temporarily *drop* some features for 1.0 :P |
15:12:27 | * | Ven quit (Ping timeout: 258 seconds) |
15:12:39 | demi- | ah i see |
15:12:46 | demi- | is this library written in C++? |
15:12:54 | Araq | evacchi: we kind of do this, move features under .experimental :P |
15:13:03 | FromGitter | <evacchi> :P |
15:13:24 | zachcarter | yeah but it has a C API I’m binding to |
15:13:35 | zachcarter | I think it makes sense why I get that last error |
15:13:44 | zachcarter | because that’s not actually the name of the library |
15:13:48 | demi- | because it cannot resolve the mangled symbol name |
15:15:12 | zachcarter | hmm |
15:16:31 | demi- | zachcarter: i believe this means that you are defining a symbol that doesn't exist in the main library |
15:16:47 | zachcarter | I wonder why this works on osx then |
15:17:07 | demi- | different version of the library, different symbols would be exposed |
15:17:10 | Araq | different symbol mangling rules for osx? |
15:17:12 | zachcarter | yeah |
15:17:14 | zachcarter | perhaps |
15:17:25 | zachcarter | I’ll go look at the C API header and see if that’s indeed the case |
15:17:29 | demi- | Araq: no, C++ name mangling is universal |
15:17:52 | Araq | hardly, it was compiler specific the last time I checked |
15:18:39 | zachcarter | https://github.com/jarikomppa/soloud/blob/master/include/soloud.h |
15:18:51 | zachcarter | not much in there that would differ based on OS :/ |
15:19:44 | demi- | hmm, that doesn't look like a valid C++ mangled name tho |
15:19:58 | demi- | it is missing the leading underscore |
15:20:12 | zachcarter | _ZN6SoLoud6SoloudD1Ev ? |
15:20:32 | demi- | yeah |
15:20:41 | zachcarter | well that’s the error I get when I do |
15:20:43 | demi- | otherwise it would be `SoLoud::Soloud::~Soloud()` |
15:20:53 | zachcarter | ah |
15:21:05 | zachcarter | well that’s the error I get when I specify the full library path in the bindings |
15:21:08 | zachcarter | which I don’t think is correct |
15:21:16 | * | Ven joined #nim |
15:21:55 | zachcarter | I believe the dynlib pragma wants the name of the library |
15:21:58 | zachcarter | not the name and its filepath |
15:22:06 | zachcarter | but if I just specify the library name |
15:22:24 | demi- | that is most likely |
15:22:53 | zachcarter | libSoloudDynamic.so: cannot open shared object file: No such file or directory |
15:22:53 | zachcarter | could not load: libSoloudDynamic.so |
15:23:05 | zachcarter | which makes it sound like the path needs to be specified lol! |
15:23:32 | zachcarter | and to hell with linker search paths! because that doesn’t seem to have an effect on anything lol |
15:23:51 | zachcarter | this whole thing is quite confusing |
15:26:14 | demi- | 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:16 | demi- | binary you produce to see if they are missing? |
15:27:04 | zachcarter | I 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:55 | zachcarter | demi-: when you suggested examining the binary, did you mean the shared library I produced? |
15:49:30 | demi- | 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:48 | zachcarter | ah no the test app won’t build or link |
15:49:54 | zachcarter | not on linux anyway |
15:50:00 | * | smt quit (Read error: Connection reset by peer) |
15:51:47 | * | smt joined #nim |
15:52:42 | zachcarter | well here ar ethe symbols the library contains : https://gist.github.com/zacharycarter/ca3f8ae91f36133b61d29c25c0b2d971 |
15:53:24 | zachcarter | I 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:30 | federico3 | demi-: there's a similar mechanism. Are you sure the lib is installed and the soname is correct? |
16:07:23 | zachcarter | the library is in my /usr/local/lib folder and the soname is correct |
16:09:23 | zachcarter | federico3: the soname in the bindings should match the filename correct? |
16:11:09 | federico3 | yes |
16:11:17 | * | Ven quit (Ping timeout: 256 seconds) |
16:11:45 | zachcarter | okay I think installing it into /usr/lib instead of /usr/local/lib got me a little further |
16:12:14 | zachcarter | but now I’m running into : /usr/local/lib/libSoloudDynamic.so: undefined symbol: _ZN6SoLoud6SoloudD1Ev again |
16:16:09 | zachcarter | if I do an nm -g on the shared library I see that symbol |
16:21:27 | * | Jesin quit (Quit: Leaving) |
16:22:23 | Araq | zachcarter: link statically to the library instead. I now consider dynamic link libraries non-existent on Unix |
16:23:08 | zachcarter | Araq: alright can I conditionally link dynamically on osx / windows and statically on linux? |
16:23:29 | Araq | yes, via a custrom .pragma pragma |
16:23:37 | Araq | or with --dynlibOverride |
16:23:47 | cheatfate | Araq, i think its the same problem we got in BSDs |
16:24:21 | zachcarter | thank you Araq |
16:25:10 | cheatfate | its because system loader looking for shared objects only at specific locations |
16:25:28 | * | Jesin joined #nim |
16:25:40 | cheatfate | on latest linux distros |
16:25:42 | demi- | :( |
16:25:48 | demi- | static linking is gross |
16:26:05 | federico3 | yep |
16:26:44 | cheatfate | nope, you just need to modify binary with linker option -Wl,r |
16:28:23 | cheatfate | -Wl,-rpath= |
16:28:26 | cheatfate | to be exactly |
16:28:58 | cheatfate | so system loader will looks for shared object in specific locations |
16:29:02 | demi- | ah so it is the same system then |
16:29:37 | demi- | you do that for OS X as well, but on linking it will generate those commands for you automatically |
16:30:29 | federico3 | zachcarter: how's the shared lib installed? this is not a Nim specific issue: other applications might fail to load the shared obj |
16:30:49 | zachcarter | I just copied it to /usr/lib after building it |
16:30:56 | cheatfate | i have made such changes for `nim.cfg` |
16:31:12 | cheatfate | zachcarter, u said you your library inside of /usr/local/lib |
16:31:18 | zachcarter | it was |
16:31:18 | cheatfate | and now you are saying it in /usr/lib |
16:31:22 | zachcarter | I moved it to /usr/lib |
16:46:40 | zachcarter | Araq: 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:15 | Araq | zachcarter use nim devel and importcpp instead of importc ? |
16:47:28 | zachcarter | thanks |
16:47:48 | Araq | or the other way round: importc adds an extern "C" declaration in 'nim cpp' mode |
16:48:03 | Araq | depends on what you need. |
16:48:18 | zachcarter | gotcha |
17:00:04 | * | Matthias247 joined #nim |
17:01:16 | * | smt_ joined #nim |
17:03:22 | zachcarter | cheatfate: can you give me an example of a nimcfg with -Wl,-rpath= ? |
17:03:42 | cheatfate | zachcarter, try to search nim.cfg for this string... |
17:03:52 | zachcarter | which nim.cfg though? |
17:03:57 | * | smt quit (Ping timeout: 240 seconds) |
17:04:33 | cheatfate | config/nim.cfg |
17:06:56 | zachcarter | thanks |
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:00 | zachcarter | I’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:17 | rauss | It's not expected |
18:42:52 | rauss | Works fine for me on Arch. I would think it would be even more likely to work on Ubuntu. |
18:51:28 | dom96 | zachcarter: Most common reason for that is that you've installed Nim into /usr/bin |
18:51:48 | zachcarter | yup dom96 |
18:51:52 | dom96 | but without seeing the error it's hard to say what the real problem is |
18:52:35 | zachcarter | thank you |
18:52:43 | zachcarter | that’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:52 | rauss | dom96: What's wrong with installing nim into /usr/bin? That's what I did |
19:27:08 | rauss | Or are you just saying if you do that, you need to configure nimble accordingly? |
19:28:36 | dom96 | rauss: there is nothing wrong |
19:28:51 | dom96 | But there is a higher probability that compiling Nimble will fail for you |
19:29:04 | rauss | Okay |
19:29:39 | dom96 | I still consider that a Nim bug, but I don't think Araq agrees. |
19:33:56 | Araq | I don't see any bugs. nim works in /usr/bin and nimble does too |
19:36:03 | Araq | if 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 |