00:00:55 | * | NimBot joined #nim |
00:31:05 | * | xet7 quit (Quit: Leaving) |
00:41:18 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
01:16:08 | * | MJCaley quit (Quit: MJCaley) |
01:18:10 | * | MJCaley joined #nim |
01:28:44 | * | MJCaley quit (Quit: MJCaley) |
01:51:44 | * | zmzm_ joined #nim |
01:51:59 | * | zmzm_ left #nim (#nim) |
02:01:57 | * | S1tiSchu joined #nim |
02:05:19 | * | SitiSchu quit (Ping timeout: 252 seconds) |
02:51:56 | * | cspar joined #nim |
02:52:01 | * | cspar_ quit (Ping timeout: 246 seconds) |
02:59:21 | * | cspar quit (Read error: Connection reset by peer) |
02:59:29 | * | S1t1Schu joined #nim |
03:00:57 | * | vlad1777d quit (Ping timeout: 264 seconds) |
03:03:24 | * | S1tiSchu quit (Ping timeout: 260 seconds) |
03:10:25 | * | cspar joined #nim |
03:17:53 | * | cspar quit (Ping timeout: 240 seconds) |
03:18:11 | * | cspar joined #nim |
03:20:05 | * | endragor joined #nim |
03:35:28 | * | cspar_ joined #nim |
03:39:34 | * | cspar quit (Ping timeout: 260 seconds) |
03:58:51 | * | dddddd quit (Remote host closed the connection) |
04:52:50 | * | r3d9u11 joined #nim |
05:09:31 | * | DarkArctic quit (Ping timeout: 256 seconds) |
05:41:39 | * | r3d9u11 quit (Remote host closed the connection) |
06:09:22 | * | c0ntribut0r quit (Ping timeout: 265 seconds) |
06:10:37 | * | nsf joined #nim |
06:11:34 | * | c0ntribut0r joined #nim |
06:19:28 | * | gokr joined #nim |
06:20:13 | * | c0ntribut0r quit (Ping timeout: 240 seconds) |
06:20:28 | * | c0ntribut0r joined #nim |
06:32:40 | * | cspar joined #nim |
06:33:37 | * | cspar_ quit (Ping timeout: 248 seconds) |
06:35:39 | * | cspar_ joined #nim |
06:37:27 | * | cspar quit (Ping timeout: 240 seconds) |
06:47:15 | * | user11101 joined #nim |
07:16:02 | * | rockcavera quit (Ping timeout: 276 seconds) |
07:16:48 | * | xkapastel quit (Quit: Connection closed for inactivity) |
07:20:02 | * | allan0 quit (Quit: no) |
07:20:47 | * | allan0 joined #nim |
07:35:38 | * | fredrik92 joined #nim |
07:37:33 | * | c0ntribut0r quit (Ping timeout: 264 seconds) |
07:37:57 | * | c0ntribut0r joined #nim |
07:46:46 | * | vlad1777d joined #nim |
07:54:21 | * | c0ntribut0r quit (Ping timeout: 264 seconds) |
07:54:59 | * | jaco60 joined #nim |
07:55:40 | * | c0ntribut0r joined #nim |
08:02:17 | * | rokups joined #nim |
08:17:09 | * | rockcavera joined #nim |
08:22:47 | * | JustASlacker joined #nim |
08:28:49 | * | c0ntribut0r quit (Quit: Quit) |
08:33:26 | * | c0ntribut0r joined #nim |
08:43:35 | * | c0ntribut0r quit (Read error: No route to host) |
08:46:54 | * | jaco60 quit (Quit: Textual IRC Client: www.textualapp.com) |
08:50:13 | * | c0ntribut0r joined #nim |
08:54:31 | * | sendell joined #nim |
09:06:49 | * | PMunch joined #nim |
09:21:04 | * | jaco60 joined #nim |
09:52:09 | * | dddddd joined #nim |
10:35:41 | * | c0ntribut0r quit (Quit: Quit) |
10:51:33 | * | jaco60 quit (Ping timeout: 240 seconds) |
11:03:35 | * | fredrik92 quit (Read error: Connection reset by peer) |
11:11:38 | * | gokr left #nim (#nim) |
11:27:30 | * | xet7 joined #nim |
11:33:56 | * | athenot joined #nim |
11:37:18 | FromGitter | <dandevelo> Anyone knows how to get choosenim to use mingw64? |
11:40:57 | dom96 | Not supported right now I'm afraid |
11:42:49 | livcd | 3 |
11:42:53 | livcd | oops |
11:42:56 | FromGitter | <dandevelo> @dom96 I see that choosenim puts gcc.exe in .nimble\bin on Windows which is also added to the path. Doesn't seem to play well with apps wanting to use another gcc (32 vs 64) |
11:43:04 | * | athenot_ joined #nim |
11:44:22 | * | athenot quit (Ping timeout: 245 seconds) |
11:45:22 | FromGitter | <dandevelo> putting gcc in .nimble\bin and having it in the PATH shadows other gcc for all the apps installed |
11:45:48 | dom96 | true, but it only does that if there is no other gcc in the path |
11:49:26 | FromGitter | <dandevelo> The reason why I am asking these is because I am trying to create a dev environment on Windows where I can build both 32bit and 64bit apps |
11:54:45 | Yardanico | you can always download mingw-w64 and compile nim yourself |
11:54:53 | Yardanico | a bit more work, but you'll be able to compile both 32/64bit apps |
11:59:59 | FromGitter | <krux02> I was just reading the documentation of strformat. And I was a bit puzzled. What is the difference between f and F |
12:00:12 | FromGitter | <krux02> f is fixed point |
12:00:28 | FromGitter | <krux02> which is already a weird expression, because it is printing a floating point number |
12:01:04 | FromGitter | <krux02> but I assume it means to print the floating point number in non-exponent notation, which is fine |
12:01:13 | FromGitter | <krux02> but then what does F mean? |
12:01:34 | FromGitter | <krux02> it converts the number (that does not contain letters at all) to upper case? |
12:01:43 | PMunch | According to the strformat docs it converts it to upper-case |
12:01:54 | PMunch | Hmm |
12:02:53 | FromGitter | <krux02> yea exactly |
12:02:58 | FromGitter | <krux02> I think the documentation is wrong |
12:03:27 | FromGitter | <krux02> either F is just an alias for f or f does somthing else |
12:03:38 | PMunch | Probably just a copy-paste thing |
12:03:58 | PMunch | Upper-case letters are upper-case output. But 'f' just happens to have no letters |
12:04:18 | FromGitter | <krux02> well when it is the same as the format specifiers in C, then f is not fixed point output |
12:06:35 | PMunch | Yeah, according to the code it uses 'f' or 'F' to set the mode to ffDecimal, then when the formatter is done it checks if the input is in the set A..Z to see if it shall convert it to upper-case |
12:08:30 | FromGitter | <krux02> I just looked at that same code, too |
12:08:42 | FromGitter | <krux02> my guess was that it just forwards to sprintf |
12:09:02 | FromGitter | <krux02> if it does, I would make a pull request to just copy paste the documentation of printf |
12:09:28 | PMunch | Isn't strformat pure? |
12:10:23 | PMunch | Yup, so definitely not using sprintf |
12:10:27 | FromGitter | <krux02> well I worked on the default implementation of floating point number formating |
12:10:36 | FromGitter | <krux02> and that alone already calls sprintf |
12:11:43 | * | jalbo joined #nim |
12:12:07 | PMunch | Ah, it uses formatBiggestFloat |
12:12:10 | Araq | F means to produce an 'E' instead of 'e' |
12:12:17 | PMunch | Which on native uses sprintf |
12:12:22 | Araq | tough mayb I overlooked to implement that |
12:12:32 | PMunch | Araq, but fixed point doesn't use E does it? |
12:12:38 | FromGitter | <krux02> https://github.com/nim-lang/Nim/blob/67fd7a7f865e7e725dfcd4c2ec2c5840f3457f60/lib/pure/strutils.nim#L2033 |
12:12:43 | FromGitter | <krux02> nope, not pure |
12:13:09 | PMunch | If you format with e or E you get exponential mode. But with f or F it uses fixed-point notation so it shouldn't have an 'E' in it |
12:13:14 | PMunch | Hence nothing to upper-case |
12:13:37 | Araq | whatever then |
12:13:46 | FromGitter | <krux02> well, %f in printf does produce exponential representation |
12:13:48 | PMunch | krux02, but it can call JS format functions as well |
12:14:04 | FromGitter | <krux02> yea it has branching based on the platform |
12:14:20 | FromGitter | <krux02> and i think it is good to rely on the javascript backend |
12:14:36 | PMunch | Yeah, but strformats 'f' doesn't convert to printfs 'f' |
12:14:40 | FromGitter | <krux02> because you would not want a printf implementation ported over to a web application |
12:15:32 | FromGitter | <krux02> PMunch: yes it does: https://github.com/nim-lang/Nim/blob/67fd7a7f865e7e725dfcd4c2ec2c5840f3457f60/lib/pure/strutils.nim#L2013 |
12:23:15 | * | jalbo quit (Ping timeout: 260 seconds) |
12:27:57 | PMunch | Huh, so it does |
12:29:37 | PMunch | But according to the C++ docs f doesn't produce exponential representation |
12:30:12 | PMunch | http://en.cppreference.com/w/cpp/io/c/fprintf |
12:31:15 | Araq | yeah it was my bad |
12:41:09 | * | vlad1777d quit (Ping timeout: 264 seconds) |
12:47:04 | * | dddddd quit (Remote host closed the connection) |
12:51:47 | * | jaco60 joined #nim |
12:55:47 | Yardanico | wait, we can't have directories inside of src/<package name> folder? Nimble complains about that. My structure is: srcDir = "src", src/myproject.nim is the main file and src/myproject/modules is a directory where I have some modules |
12:57:49 | Yardanico | ok, it worked with `myprojectpkg` instead of `myproject` |
12:57:52 | * | DarkArctic joined #nim |
13:06:02 | * | BitPuffin joined #nim |
13:08:23 | PMunch | Yeah, you can't have both the main file and a directory with the same name as the main file in src |
13:08:27 | PMunch | Or something like that |
13:19:23 | FromGitter | <dandevelo> Can nim 32bit be used to build 64 bit apps or it doesn't matter which nim version I use (32-vs-64) because they both generate C code? |
13:27:43 | Yardanico | Yeah, you can use nim compiled for arm64 to compile for i386 (if you have such C cross-compilers) |
13:27:54 | Yardanico | (it's just an example) |
13:33:39 | * | endragor quit (Remote host closed the connection) |
13:34:55 | PMunch | Uhm, is this a bug? http://ix.io/WwZ/ |
13:36:06 | * | qleda joined #nim |
13:36:29 | * | Vladar joined #nim |
13:38:02 | PMunch | Channel: stable, Version: #devel |
13:38:06 | PMunch | A stable devel? |
13:46:59 | FromGitter | <survivorm> maybe it means that devel tag is at the same commit as a stable? |
13:49:34 | dom96 | PMunch: You selected channel 'stable' and then '#devel'? |
13:49:44 | dom96 | That's indeed misleading |
13:49:48 | dom96 | report it |
13:50:35 | PMunch | Not really sure what I did, I probably have installed stable at some point, but is currently using #devel |
13:55:20 | FromGitter | <survivorm> Does they differ in realty? |
13:55:24 | PMunch | Done: https://github.com/dom96/choosenim/issues/54 |
13:55:33 | PMunch | survivorm, devel and stable? |
13:55:34 | * | endragor joined #nim |
13:55:37 | * | endragor quit (Remote host closed the connection) |
13:55:39 | FromGitter | <survivorm> yeah |
13:55:51 | PMunch | devel is just whatever is on the devel branch of the Nim repo when you pull it |
13:56:04 | PMunch | Stable is the last tagged release on the master branch |
13:56:05 | PMunch | IIRC |
13:56:14 | * | endragor joined #nim |
13:56:15 | FromGitter | <survivorm> I mean, thay may be the same commit at this time |
13:56:43 | FromGitter | <survivorm> not very big chances, but still |
13:57:13 | PMunch | Nah, there's been a number of commits since 0.18.0 |
13:57:36 | FromGitter | <survivorm> which you've updated with choosenim? |
13:57:48 | dom96 | https://github.com/dom96/choosenim/blob/master/src/choosenim/channel.nim#L12 |
13:58:00 | dom96 | That's how the channels are defined |
13:59:07 | dom96 | What do you get if you curl that? "0.18.0" |
14:01:41 | PMunch | Hmm: http://ix.io/Wxm/ |
14:01:51 | dom96 | -L |
14:01:55 | dom96 | follow redirects |
14:02:37 | PMunch | 0.18.0 |
14:02:53 | PMunch | Hmm, what's the difference betwen devel and #devel? |
14:03:29 | dom96 | no difference |
14:03:55 | dom96 | but 'devel' is a channel, and '#devel' is a version |
14:05:14 | * | endragor quit (Remote host closed the connection) |
14:05:50 | dom96 | all channels have a version associated with them |
14:05:55 | PMunch | Ah |
14:05:57 | dom96 | in 'devel's case, that is always '#devel' |
14:06:09 | PMunch | So I should just use devel instead of #devel |
14:06:12 | dom96 | yeah |
14:06:45 | PMunch | Maybe selecting #devel when not on the devel channel should be an error |
14:06:54 | PMunch | As it's not a valid version for other channels? |
14:07:16 | dom96 | nah |
14:07:23 | dom96 | We know what the user wants to do |
14:09:12 | PMunch | Fair enough, but then it should switch to the devel channel automatically :P |
14:11:26 | dom96 | sure |
14:24:33 | * | Vladar quit (Remote host closed the connection) |
14:31:41 | * | PMunch quit (Remote host closed the connection) |
14:31:59 | * | PMunch joined #nim |
14:36:04 | * | nsf quit (Quit: WeeChat 2.0.1) |
14:44:28 | * | Vladar joined #nim |
14:50:15 | * | MJCaley joined #nim |
14:58:43 | * | Vladar quit (Remote host closed the connection) |
14:59:28 | * | dddddd joined #nim |
14:59:39 | * | Snircle joined #nim |
15:06:12 | * | r3d9u11 joined #nim |
15:28:13 | * | JustASlacker quit (Ping timeout: 240 seconds) |
15:43:18 | FromGitter | <krux02> Is there a way to generate C header files from a Nim module? |
15:43:56 | FromGitter | <krux02> only exported function of course |
15:44:30 | PMunch | --header |
15:45:02 | PMunch | According to "nim --advanced": "--header:FILE the compiler should produce a .h file (FILE is optional)" |
15:46:23 | FromGitter | <krux02> cool |
15:46:52 | * | endragor joined #nim |
15:49:35 | * | athenot_ quit (Ping timeout: 252 seconds) |
15:50:21 | FromGitter | <krux02> PMunch, hmm it doesn't work |
15:50:23 | * | athenot joined #nim |
15:50:35 | FromGitter | <krux02> wait |
15:50:39 | FromGitter | <krux02> maybe it's my fault |
16:04:04 | PMunch | Did you figure it out? |
16:05:06 | FromGitter | <krux02> yes I just forgot export C |
16:05:14 | FromGitter | <krux02> I thought for some reason * is enough |
16:06:31 | FromGitter | <krux02> hmm, how do I export a struct/object? |
16:08:26 | PMunch | https://forum.nim-lang.org/t/96 |
16:08:34 | PMunch | Old topic, but maybe applicable |
16:08:40 | * | natrys joined #nim |
16:13:03 | * | yglukhov quit (Ping timeout: 265 seconds) |
16:14:41 | * | yglukhov joined #nim |
16:18:45 | * | floppydh quit (Ping timeout: 268 seconds) |
16:25:39 | * | gokr joined #nim |
16:25:50 | FromGitter | <krux02> well I found out that structs are exported lazyliy and the export pragama is ignored |
16:26:23 | FromGitter | <krux02> the exported struct will have this fancy mangled name, yay. |
16:26:41 | shashlick | dom96: did you have any feedback on handling https://github.com/nim-lang/nimble/pull/464#issuecomment-372187378 |
16:27:17 | shashlick | one more option is to excl() after running a pre or postHook |
16:27:49 | PMunch | krux02, did you try to exportc it with a name? |
16:28:17 | dom96 | shashlick: I'd like to postpone it until I'm working on the next release and look at in more detail then |
16:28:58 | shashlick | okay cool |
16:32:09 | * | yglukhov quit (Ping timeout: 264 seconds) |
16:33:44 | PMunch | krux02, I just did some testing and for me it doesn't mangle it |
16:43:17 | * | gokr quit (Read error: Connection reset by peer) |
16:49:40 | Araq | --header is not really supported |
16:54:48 | * | Trustable joined #nim |
16:55:58 | FromGitter | <mratsim> Did an Elm dev join Nim? ;) ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aa8029e01a2b40f382dc16a] |
16:56:36 | dom96 | What's that from? |
16:57:59 | shashlick | how come I can incl() a string in a HashSet but excl() complains? |
16:58:24 | shashlick | Error: type mismatch: got <HashSet[system.string], string> |
16:59:01 | * | PMunch quit (Quit: Leaving) |
16:59:18 | FromGitter | <mratsim> @dom96: from having a int has an input to a uint32 range type: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aa803657685a046389c913e] |
17:01:28 | dom96 | mratsim: ok, but where did you get that code from? |
17:01:48 | FromGitter | <mratsim> I’m writing it |
17:02:56 | FromGitter | <mratsim> I’m implementing pbkdf2 in Nim: https://en.wikipedia.org/wiki/PBKDF2#Key_derivation_process see the “F” function |
17:12:49 | * | sendell quit (Remote host closed the connection) |
17:14:52 | * | JustASlacker joined #nim |
17:15:37 | * | MJCaley quit (Quit: MJCaley) |
17:19:40 | * | xkapastel joined #nim |
17:22:34 | * | nsf joined #nim |
17:23:58 | * | ieatnerds joined #nim |
17:26:47 | dom96 | This is cool http://bit.ly/2pbVpNR |
17:28:15 | ieatnerds | that's pretty neat! |
17:29:45 | * | JustASlacker quit (Ping timeout: 264 seconds) |
17:32:14 | * | yglukhov joined #nim |
17:34:50 | * | jjido joined #nim |
17:36:03 | * | jalbo joined #nim |
17:38:34 | * | yglukhov quit (Ping timeout: 246 seconds) |
17:41:24 | dom96 | hey jalbo. Freenode WebChat is muted right now, but you can join via Gitter as well if you want a web interface: https://gitter.im/nim-lang/Nim |
17:50:36 | * | endragor quit (Remote host closed the connection) |
17:55:32 | * | miran joined #nim |
18:02:21 | * | fvs joined #nim |
18:06:13 | fvs | best practice? c2nim wraps into cint, cdouble, cstring, etc. Leave as is or change to int, double, string. |
18:13:23 | * | gokr joined #nim |
18:13:58 | * | jalbo quit (Quit: Page closed) |
18:15:53 | dom96 | leave as is |
18:15:59 | dom96 | cstring != string |
18:16:07 | dom96 | there is a reason the C variants are used |
18:20:56 | fvs | ok - just relaized i can always add helper func(a:int, b:double) = cfunc(a.cint, b.cdouble) |
18:21:03 | fvs | *realized |
18:21:29 | dom96 | Yes, the best practice is to create a wrapper in one module |
18:21:35 | dom96 | and then create another module that builds on top of that wrapper |
18:51:08 | * | icebattl1 is now known as icebattle |
19:14:40 | FromGitter | <alehander42> hm |
19:16:20 | dom96 | 🤔 |
19:22:57 | * | Ven`` joined #nim |
19:29:19 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:31:45 | * | Ven`` joined #nim |
19:33:00 | * | Ven`` quit (Client Quit) |
19:35:05 | * | JustASlacker joined #nim |
19:45:48 | * | PMunch joined #nim |
19:49:06 | * | yglukhov joined #nim |
19:49:12 | * | nsf quit (Quit: WeeChat 2.0.1) |
19:51:15 | * | Jesin joined #nim |
20:06:21 | * | athenot quit (Read error: Connection reset by peer) |
20:07:50 | * | athenot joined #nim |
20:12:45 | * | fvs left #nim ("ERC (IRC client for Emacs 25.3.1)") |
20:16:04 | * | r3d9u11 quit (Remote host closed the connection) |
20:16:58 | * | Jesin quit (Quit: Leaving) |
20:17:41 | * | JustASlacker quit (Ping timeout: 256 seconds) |
20:37:33 | Araq | alehander42: any feedback on 'knete'? |
20:45:57 | * | natrys quit (Ping timeout: 264 seconds) |
20:52:13 | * | athenot quit (Ping timeout: 240 seconds) |
20:58:44 | * | rokups quit (Quit: Connection closed for inactivity) |
20:59:31 | * | natrys joined #nim |
21:00:12 | * | BitPuffin quit (Remote host closed the connection) |
21:00:23 | * | miran quit (Quit: Konversation terminated!) |
21:01:51 | * | noonien quit (Quit: Connection closed for inactivity) |
21:03:18 | Araq | mratsim: eventually I figured Nim's overloading is irrelevant for the error reporting. only took me one year or something. :P |
21:03:46 | Araq | well it could merge duplicated information for the overloads |
21:04:27 | Araq | got the idea on FOSDEM |
21:05:08 | Araq | it's the best improvement in 0.18 and the changelog doesn't even mention it :-) |
21:05:31 | * | nsf joined #nim |
21:05:57 | Araq | well no. the best improvement is the better times module that I can now use without having to worry :P |
21:07:19 | FromGitter | <alehander42> yeah, merging duplicate info will be sublime |
21:07:29 | * | ipjk joined #nim |
21:07:36 | FromGitter | <alehander42> Araq: sorry, I was travelling these days, only got a glance :( |
21:08:35 | FromGitter | <alehander42> seems nice, I still have some doubts in some cases, e.g. if several render functions depend on the same values, how easy would it be to react to changes in it this way |
21:10:05 | dom96 | alehander42: can you fix this? https://github.com/nim-lang/packages/pull/663 |
21:10:16 | Araq | well "redraw the world" is always easy enough to do |
21:10:24 | * | natrys quit (Quit: natrys) |
21:10:44 | Araq | I have been wondering if we should have a (really simple) diff algorithm for this then though |
21:10:51 | Araq | so that input fields keep their state |
21:11:23 | Araq | but it reintroduces some problems too |
21:11:31 | * | qleda quit (Ping timeout: 256 seconds) |
21:11:49 | Araq | so the diff algorithm would operate on the real DOMs, not virtual DOMs |
21:12:56 | * | JustASlacker joined #nim |
21:13:28 | FromGitter | <alehander42> @dom96 I think the last version doesn't have this additional life |
21:14:00 | FromGitter | <alehander42> @Araq yeah, that's true too, but sometimes redraw the whole world is too slow to happen often |
21:14:16 | dom96 | ahh yes, #head is good |
21:14:30 | dom96 | I should really write a bot to merge these packages PRs |
21:14:54 | Araq | in my reactive experiments I used the diff algorithm for partial DOMs |
21:14:57 | FromGitter | <alehander42> what would it produce then? real nodes instead of vnode? |
21:16:55 | Araq | that's what 'knete' does, yes |
21:19:37 | dom96 | what is this 'knete'? |
21:21:35 | Araq | German for Plasticine |
21:22:24 | Araq | it's an experiment; "karax without DOM diffing" |
21:22:48 | * | MJCaley joined #nim |
21:24:36 | Araq | probably DOM diffing is here to stay though |
21:25:36 | dom96 | How complete is Karax nowadays? |
21:25:40 | dom96 | is it missing any big features? |
21:26:05 | Araq | routing got useful only recently |
21:26:14 | * | yglukhov quit (Remote host closed the connection) |
21:26:32 | dom96 | interesting. Routing in react has come in rather late IIRC |
21:26:47 | * | yglukhov joined #nim |
21:26:50 | Araq | and the performance requirements of the diff'ing algorithm made it really complex |
21:26:51 | dom96 | You should definitely start marketing it properly |
21:31:02 | * | Jesin joined #nim |
21:34:25 | * | arecacea1 quit (Ping timeout: 248 seconds) |
21:34:27 | Araq | maybe. something is still missing though and I have some ideas what that is |
21:36:12 | * | arecacea1 joined #nim |
21:38:37 | * | Trustable quit (Remote host closed the connection) |
21:40:17 | Araq | !eval var seqOfStrings: seq[int] = @[int] |
21:40:18 | NimBot | Compile failed: in.nim(1, 32) Error: internal error: expr(skType); unknown symbol |
21:40:34 | Araq | lovely |
21:41:28 | Araq | !eval type MyTuple = tuple(a: int, b: int) |
21:41:30 | NimBot | Compile failed: in.nim(1, 21) Error: invalid indentation |
21:42:24 | Araq | fair enough, 'tuple' is also a type class and (a: int, b: int) an expression following it |
21:42:48 | Araq | !eval var myTuple: MyTuple = [a: 10, b: 10] |
21:42:49 | NimBot | Compile failed: in.nim(1, 14) Error: undeclared identifier: 'MyTuple' |
21:43:14 | Araq | !eval var myTuple: tuple[a, b: int] = [a: 10, b: 10] |
21:43:16 | NimBot | Compile failed: in.nim(1, 34) Error: undeclared identifier: 'a' |
21:44:42 | Araq | "Quiz 2: Now, imagine that you are a nim newbie. Try to fix the errors with the help of nim manual and compiler error messages." so ... copy the syntax from working examples instead of guessing the syntax? |
21:44:50 | Araq | I think that could work out. |
21:46:37 | shashlick | i'm still stuck - why does Nim think system.string is different from string |
21:47:05 | shashlick | Error: type mismatch: got <HashSet[system.string], string> |
21:47:49 | Araq | imported gtk3? |
21:49:25 | Araq | shashlick: you have some 'string' declared somewhere? |
21:50:20 | shashlick | https://pastebin.com/xZahjUSk |
21:51:06 | shashlick | this is in nimble code - preHooks is defined as HashSet[string] |
21:51:24 | * | nsf quit (Quit: WeeChat 2.0.1) |
21:53:53 | * | rockcavera quit (Remote host closed the connection) |
21:55:24 | Araq | expression: excl(pkgInfo.preHooks, cast[system.string](normalize(actionName))) |
21:55:41 | Araq | where does this 'cast' come from? |
21:56:17 | Araq | smells like a wrong macro transformation |
21:57:55 | * | JustASlacker quit (Ping timeout: 246 seconds) |
22:01:02 | * | rockcavera joined #nim |
22:07:28 | shashlick | sorry, even if I remove the cast, it complains the same, that was me trying stuff out |
22:08:17 | shashlick | even if it just says excl(pkgInfo.preHooks, normalize(actionName)), it fails |
22:08:57 | shashlick | or pkgInfo.preHooks.excl(actionName.normalize) for that matter |
22:09:22 | shashlick | but if I create a simple nim file with a HashSet, incl() and excl() work as expected with strings |
22:10:29 | shashlick | funny thing is that just a few lines earlier, actionName.normalize in pkgInfo.preHooks works fine |
22:11:01 | shashlick | if before: actionName.normalize in pkgInfo.preHooks |
22:11:07 | shashlick | https://github.com/nim-lang/nimble/blob/75b7a215e83903219d69c86af64fe5f5f495cf95/src/nimblepkg/nimscriptexecutor.nim#L26 |
22:11:47 | * | jaco60 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:17:00 | Araq | maybe pkgInfo.preHooks is immutable and for some reason the compiler is silent about it |
22:22:45 | * | vlad1777d joined #nim |
22:24:14 | * | PMunch quit (Quit: leaving) |
22:27:27 | Araq | let pkgInfo = getPkgInfoFromFile(nimbleFile, options) |
22:27:32 | Araq | ^ it's 'let' |
22:28:05 | Araq | usually the compiler does a good job of pointing that out. not sure why it fails here |
22:32:07 | * | ipjk quit (Quit: Leaving) |
22:32:28 | shashlick | I see - I was looking for it |
22:36:20 | FromGitter | <zacharycarter> Rust / Nim got brought up at work today :/ |
22:38:18 | * | molus_mh joined #nim |
22:38:54 | * | molus_mh left #nim (#nim) |
22:40:32 | FromGitter | <zacharycarter> I've apparently become the anti-rust person at work |
22:41:03 | FromGitter | <zacharycarter> even though I don't have any real problems with the language - beyond how much it reminds me of C++ |
22:42:58 | FromGitter | <zacharycarter> there wasn't too much commentary on Nim - one person said they didn't like style / case insensitivity and another person mentioned something about dynamic arrays and openArray but they were just confused. |
22:43:14 | shashlick | araq: should I open an issue? |
22:44:35 | * | MJCaley quit (Quit: MJCaley) |
22:48:08 | shashlick | araq: https://gist.github.com/anonymous/5ca5421d6f2c3190edbed54f7d03b341 |
22:48:16 | dom96 | zacharycarter: what sort of things does your company develop? |
22:48:45 | FromGitter | <zacharycarter> dom96: mostly web applications |
22:49:12 | dom96 | So Rust isn't appropriate for that anyway :) |
22:49:19 | FromGitter | <zacharycarter> hopefully in the future we'll be doing more machine learning and predictive analytics on our data |
22:49:54 | shashlick | for me, rust vs nim is like ruby vs python, i just couldn't get into ruby's syntax and preferred python |
22:49:58 | FromGitter | <zacharycarter> yeah but I mean we have a lot of RESTful APIs and we're starting to ramp up graphql services |
22:50:24 | FromGitter | <zacharycarter> also - a lot of people are writing lambda jobs now and making certain portions of their solutions serverless |
22:50:45 | FromGitter | <zacharycarter> we're doing that - and we're writing it in Go as opposed to Nim, because Nim is funky to get working w/ lambda |
22:50:53 | shashlick | forget any technical analysis, just the feel of the language |
22:51:09 | Araq | shashlick: sure, it's a regression I think. caused by the otherwise improved error messages :-) |
22:51:26 | FromGitter | <zacharycarter> I could talk to my boss about writing it in Nim |
22:51:29 | shashlick | it's almost like vim vs emacs or keyboard vs mouse for trackers, if anyone remembers those days |
22:51:34 | FromGitter | <zacharycarter> but I'm not sure he'd go for it when Go is available |
22:52:02 | FromGitter | <ZarsBranchkin> hehe, vim and emacs both were too great, ended up using both combined |
22:52:55 | FromGitter | <zacharycarter> also - I wouldn't be able to carry out the function of the lambda unless the AWS Nim stuff works - because I need to talk to a dynamodb instance |
22:54:20 | FromGitter | <zacharycarter> so I might as well ask, does anyone know the status of this lib - https://github.com/aidansteele/aws_sdk.nim |
22:54:54 | FromGitter | <zacharycarter> does - https://github.com/aidansteele/aws_sdk.nim/blob/master/aws_sdk/dynamodb.nim - work for instance? |
22:55:08 | FromGitter | <zacharycarter> if so it definitely helps cases for using Nim in the enterprise |
22:55:55 | FromGitter | <cabhishek> How do you argue about maintenance? Say, if you are building a critical system who will maintain it after few nimmers are no longer working for the company? |
22:56:20 | FromGitter | <zacharycarter> that's an argument I'll have to win - the fact that my team is only two people atm helps |
22:57:24 | FromGitter | <zacharycarter> I expect I'll be met with a few questions right off the bat - why use a language that hasn't reached 1.0 yet, and why use a language no one else knows |
23:00:25 | dom96 | Honestly, if you're using aws lambda at work then play around with it at home in Nim |
23:00:48 | dom96 | Rewrite the aws package if you must. You will gain a hell of a lot of knowledge about the inner working of lambda by doing so. |
23:00:55 | dom96 | Even if you never end up using it |
23:01:01 | FromGitter | <zacharycarter> dom96: I already wrote a lambda job in Nim |
23:01:31 | FromGitter | <zacharycarter> but it used https://github.com/jboy/nim-pymod |
23:02:00 | FromGitter | <zacharycarter> I think though you could do what they did with golang and use RPC |
23:02:50 | FromGitter | <zacharycarter> I think there are benefits to trying out a language like Nim in production - I'll just have to explain them to my manager |
23:03:07 | dom96 | Do let us know how it goes :) |
23:03:30 | FromGitter | <zacharycarter> well if I get Nim in production - I definitely will |
23:04:10 | FromGitter | <zacharycarter> That's why I'm working on this graphql library |
23:04:31 | dom96 | even if it doesn't work out, do let us know what the hang ups were |
23:04:40 | FromGitter | <zacharycarter> okay I will |
23:06:35 | * | jjido quit (Ping timeout: 240 seconds) |
23:07:40 | shashlick | https://github.com/genotrance/nimbigwig |
23:07:46 | * | vlad1777d quit (Remote host closed the connection) |
23:09:07 | * | vlad1777d joined #nim |
23:10:22 | FromGitter | <zacharycarter> I have no idea what libbigwig is |
23:12:25 | * | vlad1777d quit (Remote host closed the connection) |
23:12:59 | * | vlad1777d joined #nim |
23:32:09 | FromGitter | <zacharycarter> There's a C++ SDK for AWS - https://github.com/aws/aws-sdk-cpp - I just have no idea how to bind to C++ w/ Nim 😕 staring at the source of UrhoNim has never enlightened me |
23:32:23 | shashlick | Something qleda wanted, genome related stuff |
23:33:33 | FromGitter | <zacharycarter> gotcha |
23:33:51 | FromGitter | <zacharycarter> shashlick: are you genotrance on github? |
23:35:51 | Araq | zacharycarter: don't start with the AWS C++ SDK. start with their C++ examples. |
23:36:15 | Araq | and translate them to Nim. this way you see the parts you actually need to wrap. |
23:37:01 | Araq | wrapping C++ is like wrapping C except you need to learn the "importcpp" pattern language. or you use c2nim to produce it |
23:37:49 | * | MJCaley joined #nim |
23:38:14 | FromGitter | <zacharycarter> okay I'll give this a shot - thank you Araq :) |
23:42:52 | Araq | I don't know how to wrap e.g. https://github.com/aws/aws-sdk-cpp/blob/master/aws-cpp-sdk-budgets/include/aws/budgets/BudgetsRequest.h either. |
23:47:23 | FromGitter | <zacharycarter> yeah - I'm going to start with the aws-cpp-sdk-core tests and see what I can come up with... I don't know - I think @Varriount has probably been here and done this but I know he's also busy so ¯\_(ツ)_/¯ |
23:50:30 | shashlick | @zacharycarter: yep same |
23:51:10 | FromGitter | <zacharycarter> shashlick: thank you for nimgen :D that's how I made the gql query parser bindings so quickly |
23:52:06 | FromGitter | <zacharycarter> once I figured out how it worked I loved it! |
23:52:36 | shashlick | oh that's cool, I tried graphql as well but didn't go too far |
23:52:45 | shashlick | got stuck with the C++ API, the C API was easier but limited |
23:53:11 | shashlick | i've just been wrapping anything people ask for so that nimgen can be improved |
23:53:46 | shashlick | but need to write NIm APIs to these wrapped libs so that the C interop is abstracted |