00:39:21 | * | rockcavera joined #nim |
00:42:05 | * | xet7 joined #nim |
01:04:44 | * | chemist69_ joined #nim |
01:07:28 | * | chemist69 quit (Ping timeout: 246 seconds) |
01:41:57 | ldlework | Anyone here use "shell" library? It seems it's variable interpolation is broken for shellAssign? |
01:52:23 | FromDiscord | <Elegant Beef> How are you using it |
02:01:32 | FromDiscord | <Varriount> https://news.ycombinator.com/item?id=23452170 |
02:01:54 | * | Tlongir joined #nim |
02:06:37 | ldlework | leorize[m]: I'm using argparse, but when I try to access `opts` from a run: block i get, Error: undeclared identifier: 'opts' |
02:07:27 | FromDiscord | <Elegant Beef> That qualified identifier conversation is weird |
02:10:03 | * | endragor joined #nim |
02:12:34 | FromDiscord | <Rika> its the price paid for UFCS to work |
02:12:38 | FromGitter | <ynfle> What does `genSym` do? In what way is it unique |
02:12:42 | leorize[m] | it's just python people being python people |
02:13:07 | leorize[m] | @ynfle it generates a symbol that can only be accessed when you have the node |
02:13:09 | leorize[m] | that's why it's unique |
02:13:35 | leorize[m] | the actual symbol generated will be `theNameYouUsed`genSym<randomNumberHere>` |
02:13:36 | FromGitter | <ynfle> I don't understand |
02:13:43 | leorize[m] | * the actual symbol generated will be ```theNameYouUsed`genSym<randomNumberHere>``` |
02:14:03 | FromGitter | <ynfle> OK |
02:14:29 | leorize[m] | since it's impossible to write a symbol like that, it's 100% unique :P |
02:14:36 | FromGitter | <ynfle> I didnt see that for `echo treeRepe` |
02:14:44 | FromGitter | <ynfle> *Repr |
02:14:56 | leorize[m] | it's an implementation detail |
02:14:59 | FromDiscord | <Rika> i mean i guess i kinda understand why, i've had uh, one incident where unqualified procs bit me in the ass |
02:15:20 | FromDiscord | <Rika> though it was just one incident |
02:15:28 | leorize[m] | well in python land they don't have types to save them :P |
02:15:45 | FromDiscord | <Rika> and usually if you cant find where the proc's from, then its the issue of the proc's name |
02:15:46 | FromDiscord | <Rika> imo |
02:16:59 | leorize[m] | in python you can find proc as long as it's not in a class :) |
02:17:24 | * | adnan338 joined #nim |
02:17:55 | FromDiscord | <Elegant Beef> `a.x` in all our editors will limit to only procs that take in A or fields of A, so there goes 99% of the issue |
02:18:06 | leorize[m] | once OOP do the OOP thing of inheritance you lost all track of where procs came from |
02:18:08 | * | muffindrake quit (Ping timeout: 260 seconds) |
02:18:16 | FromDiscord | <Rika> thats true |
02:18:32 | FromDiscord | <Rika> you should prolly post that too 😛 |
02:18:35 | FromDiscord | <Rika> in the thread |
02:18:46 | leorize[m] | it's kinda moot arguing with python people :P |
02:18:57 | leorize[m] | just post that blog narimiran wrote regarding imports |
02:19:20 | leorize[m] | https://narimiran.github.io/2019/07/01/nim-import.html |
02:19:58 | * | muffindrake joined #nim |
02:22:13 | * | endragor quit (Remote host closed the connection) |
02:23:29 | FromDiscord | <Rika> kinda dont wanna, ive hit my "argumenting" quota for this week\ |
02:23:38 | FromDiscord | <Rika> ah, its monday, maybe i will |
02:23:43 | * | endragor joined #nim |
02:23:46 | * | endragor quit (Remote host closed the connection) |
02:23:53 | * | endragor joined #nim |
02:25:49 | FromDiscord | <Elegant Beef> Im a little disappointed that article doesnt mention that if you like qualified types why dont you do `system.int` |
02:27:05 | leorize[m] | because system is that magical module where all builtins are |
02:27:23 | leorize[m] | it's the same story on python, only non-builtin need qualifying |
02:28:14 | leorize[m] | if there's any regret about Nim using Python-like syntax, is that it causes Python people to think that Nim is Python :P |
02:28:35 | FromDiscord | <Elegant Beef> Wait it's not |
02:28:53 | FromDiscord | <Elegant Beef> *I've only been writting on the NimVM for that authentic python speped* |
02:28:56 | FromDiscord | <Elegant Beef> (edit) 'speped*' => 'speed*' |
02:29:17 | leorize[m] | fun fact, as slow as Nim VM is, it's actually faster than python |
02:29:30 | FromDiscord | <Rika> what |
02:29:31 | FromDiscord | <Elegant Beef> lol |
02:29:33 | FromDiscord | <Rika> lmao |
02:29:35 | leorize[m] | though the benchmark result is old and I'm not sure if that's still the case |
02:29:59 | FromDiscord | <Elegant Beef> If that's still true, that's comical |
02:30:03 | * | kenran joined #nim |
02:31:42 | FromDiscord | <Rika> Well the nim vm is still more limited than the python vm isn't it |
02:32:00 | leorize[m] | yea it can't do FFI by default |
02:34:48 | * | kenran quit (Ping timeout: 256 seconds) |
02:37:26 | ldlework | Well the warnings on nimsuggest-mode were not kidding. It locks up emacs. :( |
02:40:37 | disruptek | ldlework: nimph has lockfiles, if you really want them. you don't. |
02:40:50 | ldlework | lol |
02:55:28 | shashlick | Idlework: you can always download your deps in any way you prefer - either put them in a nimble compatible directory structure and use --nimblePath or just --path for each dep |
02:55:33 | shashlick | Use a cfg file |
02:55:49 | shashlick | Submodules |
03:01:01 | leorize[m] | ldlework: go to the dark side, use neovim, we got better plugins here |
03:02:19 | sendell | https://play.nim-lang.org/#ix=2oAa isn't this a bit inconsistent ? would never have predicted this it |
03:02:27 | ldlework | shashlick: if nim doesn't grow a lockfile for its package manager it will probably never get proper support in nix/guix |
03:03:16 | sendell | (btw just discovered nim playground, it's great <3) |
03:03:21 | FromDiscord | <Rika> sendell what's not consistent? |
03:03:42 | sendell | destructor insertions |
03:03:50 | shashlick | perhaps, I dabbled with it a bit but am not motivated to work on it |
03:04:32 | sendell | i don't get why c2 is destructed twice at the end for example |
03:04:51 | sendell | and i guess the " is gone" is because of a move somewhere |
03:06:07 | sendell | <sendell "i don't get why c2 is destructed"> any idea about that ? |
03:06:14 | leorize[m] | it's simple |
03:06:45 | leorize[m] | https://play.nim-lang.org/#ix=2oAc |
03:06:51 | leorize[m] | works better when you give them proper names |
03:07:32 | sendell | haha yeah nice idea |
03:08:06 | sendell | hmm yeah now i get it |
03:08:35 | FromDiscord | <Rika> It's the gc |
03:08:38 | sendell | what i wasnt aware of is that a variable inside the for loop is not reset between each iteration |
03:08:48 | FromDiscord | <Rika> Arc isn't default yet |
03:09:06 | leorize[m] | well why do you need to reset it when the next iteration will replace it? :) |
03:09:14 | leorize[m] | also reset is simply `=destroy` it |
03:09:41 | leorize[m] | so instead of `=destroy` happening early it happens when the variable value is replaced |
03:09:56 | leorize[m] | @Rika destructors is independant of ARc |
03:09:57 | leorize[m] | ARC* |
03:10:17 | sendell | yeah makes sense, but it's different from how cpp works for example |
03:10:21 | FromDiscord | <Rika> Leorize: I'm trying to explain the order |
03:10:57 | leorize[m] | sendell: yea we do it a bit lazier |
03:11:09 | sendell | with arc it's the same |
03:11:23 | leorize[m] | on the grounds that it might be more beneficial to expand the lifetime by a bit |
03:11:38 | leorize[m] | however we might end up using local destructions again due to performance reasons |
03:12:08 | sendell | the huge difference it makes is that the user cannot rely on construction/destruction pairs for logic |
03:12:15 | leorize[m] | @Rika huh? |
03:12:30 | leorize[m] | this is a stack object, not a ref |
03:12:41 | FromDiscord | <Rika> Forgot about that |
03:12:44 | sendell | yeah so no GC |
03:12:46 | sendell | makes sense |
03:13:26 | leorize[m] | sendell: if you abuse construction/destruction for logic it's a bit concerning :P |
03:13:39 | sendell | like in CPP i could do a Chrono object (explaining the name in the example hehe) that would take a timestamp when constructed, and another one when destructed, and report it to some performance logger |
03:13:53 | sendell | and that's a simple way to benchmark code sections |
03:14:04 | leorize[m] | in here you just take a template to do that :P |
03:14:28 | sendell | yeah I guess ^^ |
03:14:43 | sendell | then here destuctors is a bit "under the hood" for the user |
03:15:23 | leorize[m] | yea, it's more about resource management |
03:15:25 | disruptek | feature. |
03:15:30 | leorize[m] | we do have `defer` if you like scopes |
03:15:38 | disruptek | please no. |
03:15:42 | sendell | true, forgot about that |
03:16:09 | sendell | actually i'm just playing with the destructor, moves, etc |
03:16:19 | sendell | to get a feel of what it does |
03:16:20 | * | rockcavera quit (Remote host closed the connection) |
03:33:29 | sendell | <leorize[m] "in here you just take a template"> is there already a lib for quick scope profiling like that ? :) |
03:33:49 | leorize[m] | ping disruptek |
03:34:06 | disruptek | https://github.com/disruptek/criterion |
03:34:36 | sendell | ty |
03:35:44 | sendell | oh yeah i think I tried it already and it doesnt work because this machine is windows, and choosenim installs only 32bit nim on windows, which is not supported -_- |
03:36:05 | disruptek | too bad it's so hard to compile nim on windows. |
03:36:56 | sendell | i should get a look into WSL someday |
03:36:58 | * | junland quit (Quit: %ZNC Disconnected%) |
03:37:46 | * | junland joined #nim |
03:50:09 | FromDiscord | <InventorMatt> WSL is actually pretty good. especially with some of the recent upates |
04:06:02 | * | supakeen quit (Quit: WeeChat 2.8) |
04:06:38 | * | supakeen joined #nim |
04:15:14 | * | arty quit (Read error: Connection reset by peer) |
04:19:17 | * | Guest4954 quit (Ping timeout: 265 seconds) |
04:21:20 | FromDiscord | <Zed> would nim work on windows with the linux subsystem? |
04:21:31 | FromDiscord | <Zed> use the linux version? |
04:22:21 | sendell | just tried it, seems to work very nice |
04:22:50 | sendell | installed ubuntu into wsl, choosenim, nim, vscode pluggin for wsl |
04:22:53 | sendell | and it just works |
04:23:03 | sendell | i now have 64bit linux nim on my windows :D |
04:23:09 | FromDiscord | <Zed> yay |
04:23:25 | FromDiscord | <Zed> We should probably put that in the installation guide somewhere |
04:23:29 | sendell | next step replace ubuntu with manjaro (if possible) |
04:24:11 | sendell | <sendell "installed ubuntu into wsl, choos"> oh gcc also, using apt |
04:24:37 | sendell | <FromDiscord "<Zed> We should probably put tha"> yeah nice idea |
04:33:33 | * | aeverr quit (Ping timeout: 246 seconds) |
04:35:28 | * | aeverr joined #nim |
04:53:24 | * | B4s1l3 joined #nim |
04:53:31 | leorize[m] | you can use nim on windows as usual |
04:53:31 | * | B4s1l3 is now known as opDispatch |
04:53:34 | leorize[m] | like it's a supported config... |
04:54:17 | leorize[m] | disruptek: you might want to make criterion uses `std / monotimes` |
05:02:55 | * | lritter joined #nim |
05:03:07 | sendell | for some reason my windows builds are a lot faster than the WSL ones, and my test shouldnt be IO-bound |
05:03:20 | * | opDispatch quit (Quit: Konversation terminated!) |
05:12:07 | bung | how to do `true_w[0] * features[_,0] + true_w[1] * features[_,1] +. true_b ` with arraymancer , a one layer network |
05:12:11 | sendell | nevermind it was windows power management not giving as much power to WSL than it does to its native processes. If i switch my cpu to "speedshift-mode" instead of old "Pstates-modes" (so basically taking the power management out of the hands of windows and giving it to the CPU itself) i get the same performances which is pretty cool :) |
05:12:39 | * | endragor quit (Remote host closed the connection) |
05:13:02 | bung | I dont know where to put weights,and bais |
05:34:51 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
05:38:06 | * | narimiran joined #nim |
05:48:59 | * | kenran joined #nim |
05:52:30 | * | solitudesf- joined #nim |
06:10:43 | * | endragor joined #nim |
06:18:30 | * | aeverr quit (Remote host closed the connection) |
06:18:58 | * | aeverr joined #nim |
06:53:42 | * | PMunch joined #nim |
07:07:46 | * | dddddd quit (Ping timeout: 260 seconds) |
07:08:05 | * | narimiran quit (Read error: Connection reset by peer) |
07:08:12 | * | narimiran_ joined #nim |
07:14:48 | * | narimiran_ is now known as narimiran |
07:16:03 | bung | can compiler move my inner variable to outter scope in a loop ? |
07:19:59 | * | aeverr quit (Remote host closed the connection) |
07:20:08 | PMunch | Not quite sure what you mean bung |
07:20:22 | narimiran | bung: no. define it outside |
07:20:24 | * | aeverr joined #nim |
07:20:44 | narimiran | PMunch: `for i in 0..n: ...`, and then use `i` after the loop |
07:20:55 | bung | eg I have iterator define many varibale call in loop |
07:21:41 | bung | I dont wanna move outside for maintance. so I wonder if compiler can do it for me |
07:22:28 | PMunch | narimiran, that just gives me ActionScript PTSD flashbacks.. |
07:23:29 | * | fredrikhr joined #nim |
07:25:36 | bung | ok,I got it. |
07:25:50 | supakeen | PMunch: It does 'kind of' make sense if you want to see how far along you got before exiting the loop :) |
07:26:21 | PMunch | Yes, but it should be explicit.. In ActionScript every iteration variable is in the main scope |
07:26:50 | supakeen | Of course, I thought bung meant to ask how to do that :) |
07:27:03 | supakeen | But I also see it was answered -> more coffee. |
07:27:17 | PMunch | Yeah that is something that's a bit annoying isn't possible |
07:27:32 | narimiran | `var i = 0; while i < n: ....; echo i` |
07:27:46 | PMunch | Yeah, but that's a full refactor |
07:28:34 | PMunch | `for i in 0..10: <block>` becomes `var i = 0; while i <= 10: <block>; inc i` |
07:36:05 | * | B4s1l3 joined #nim |
07:36:56 | * | B4s1l3 is now known as opDispatch |
07:42:10 | * | Vladar joined #nim |
08:01:23 | * | adnan338 quit (Ping timeout: 272 seconds) |
08:30:40 | * | abm joined #nim |
08:37:22 | Araq | bung, simple for loop variables are optimized into oblivion, don't worry |
08:39:50 | bung | it's a iterator calls inside of for loop, I may just move it to global scope , make it simpler. |
08:43:05 | * | letto quit (Quit: Konversation terminated!) |
08:45:32 | * | letto joined #nim |
08:58:52 | * | adnan338 joined #nim |
09:08:42 | * | NimBot joined #nim |
09:19:22 | * | abm quit (Ping timeout: 260 seconds) |
09:19:28 | * | robotme joined #nim |
09:21:04 | * | opal quit (Remote host closed the connection) |
09:22:50 | * | opal joined #nim |
09:26:34 | * | robotme quit (Quit: robotme) |
09:27:02 | * | robotme joined #nim |
09:37:05 | * | Tongir joined #nim |
09:37:59 | * | Senny joined #nim |
09:39:49 | * | Tlongir quit (Ping timeout: 264 seconds) |
09:40:49 | * | chemist69_ quit (Ping timeout: 272 seconds) |
09:41:12 | * | chemist69 joined #nim |
09:49:50 | Zevv | hmz, I can have different AST representations of the same code which mean and do the same thing |
09:50:04 | Zevv | but it's hard to write unit tests if I want to say "I got this macro, I throw in this and expect that" |
09:50:12 | Zevv | is there some way to "normalize" NimNode AST? |
09:51:30 | Zevv | even if I compare the 'repr' there might be difference like additional newlines |
09:52:09 | Zevv | for example, I now got http://ix.io/2oB1 vs http://ix.io/2oB2 |
09:52:13 | PMunch | Hmm, that is a good question and something I have been wondering myself.. |
09:52:54 | Araq | a pointless nnkStmtList isn't well |
09:52:55 | PMunch | Uhm B1 is invalid isn't it? |
09:53:23 | Araq | it doesn't matter all that much but there is no notion of a "canon" AST |
09:53:34 | Araq | see also '(x)' vs 'x' |
09:53:35 | Zevv | no, but it is a PITA for testing |
09:54:07 | Araq | why? either the test case has the stmtlist or it lacks it |
09:56:21 | Zevv | I have this little macro, taking two blocks. On of some Nim going in, and the other some Nim I expect to come out |
09:56:30 | Zevv | The Nim coming out is not "wrong", but it is slightly different |
09:56:39 | Zevv | so no I have to jump through hoops to make it exactly the same |
10:09:29 | PMunch | Exactly, if you compare against another block then you have to make sure your macro outputs the exact same as Nim macros read in as blocks. |
10:18:15 | Araq | we could offer a macros.closeEnough(a, b) for tests |
10:24:58 | Zevv | haha |
10:25:09 | Zevv | and then a closeEnough factor, float 0.0..1.0 |
10:26:28 | bung | `execCmdEx` can I get output with styled ? or should I use another proc |
10:27:59 | PMunch | bung, define styled |
10:28:05 | PMunch | Like with colour codes and such? |
10:28:33 | PMunch | Many programs will strip those when it detects that the output is not a human-observed terminal, but typically have a switch to force it back on. |
10:29:00 | PMunch | E.g. the Nim `--colors:on` switch |
10:29:56 | bung | let (output,exitCode) = execCmdEx("nim " & "check " & file) |
10:29:59 | bung | stdout.write(output) |
10:30:03 | Yardanico | yes |
10:30:09 | Yardanico | nim won't output colors in this case |
10:30:18 | Yardanico | i think |
10:31:04 | bung | there's two problem, one I need styled output, two, I need turn hint:off |
10:31:17 | Yardanico | then just pass --hints:off |
10:31:21 | * | oddp joined #nim |
10:31:27 | Yardanico | and for colored as PMunch said just add "--colors:on" |
10:32:53 | bung | wow , works, pretty well , thanks! |
10:36:36 | * | neceve_ joined #nim |
10:37:15 | PMunch | Same trick I used in nimcr and the playground |
10:37:31 | PMunch | Neither of those would show coloured output without --colors:on |
10:39:43 | bung | it detect istty ? |
10:45:49 | * | Trustable joined #nim |
10:52:45 | PMunch | Something like that at east |
10:52:47 | PMunch | lesat* |
11:08:41 | Yardanico | :D |
11:14:06 | FromDiscord | <Synth> Does someone know how to use a dll file compiled from nim via: `nim c --app:lib file-name.nim` and use it in my main nim file? |
11:14:16 | FromDiscord | <Synth> Please ping me when someone is able to assist me |
11:14:31 | Yardanico | yes |
11:14:34 | Yardanico | you need to use FFI |
11:14:45 | FromDiscord | <Synth> FFI? |
11:14:50 | Yardanico | well you can actually use normal nim types if you're 100% sure the versions will match |
11:15:01 | Yardanico | just define your procedures and {.exportc, dynlib.} in the library |
11:15:18 | Yardanico | and then in the main file define same proc headers with {.importc, dynlib: mydynlibName.} |
11:15:26 | Yardanico | also you might want to use nimrtl |
11:16:04 | FromDiscord | <Synth> sent a code paste, see http://ix.io/2oBp |
11:16:23 | Yardanico | {.exportc, dynlib.} in the lib |
11:16:29 | Yardanico | for the proc definition |
11:16:33 | FromDiscord | <Synth> sent a code paste, see http://ix.io/2oBq |
11:16:55 | Yardanico | and then in your main file |
11:16:55 | Yardanico | "proc test {.importc, dynlib: "mylib.so".}" |
11:16:56 | FromDiscord | <Zed> other side i think |
11:17:04 | Yardanico | @Zed nah |
11:17:15 | FromDiscord | <Synth> Oh okay, thank you! |
11:18:33 | FromDiscord | <Zed> Thanks for correcting me Yardinco |
11:19:28 | FromDiscord | <Zed> quick question |
11:19:33 | FromDiscord | <Synth> I couldn't load `libtest.so` |
11:19:35 | FromDiscord | <Synth> Hmm... |
11:19:50 | Yardanico | in linux lib search path doesn't include current folder by default |
11:19:58 | FromDiscord | <Synth> Ahh okay |
11:19:59 | Yardanico | also how did you compile? |
11:20:11 | FromDiscord | <Synth> I did: `nim c --app:lib test.nim` |
11:20:47 | FromDiscord | <Zed> if i have a function that i seperate into multiple threads and have an array outside of said threads can i still access the values in that array? |
11:21:00 | Yardanico | with arc - yes, but you would need locks anyway |
11:21:09 | Yardanico | with default GC - no, you can pass raw pointers though |
11:21:25 | Yardanico | and need to use locks anyway |
11:22:13 | FromDiscord | <Zed> if each thread edits a different section of the array(all within bounds) im not going to get any sort of corruption am i? |
11:22:39 | Yardanico | you might try using expiremntal "parallel" then |
11:22:40 | FromDiscord | <Synth> sent a code paste, see http://ix.io/2oBs |
11:22:50 | Yardanico | @Synth what OS are you on? |
11:22:54 | FromDiscord | <Synth> Arch |
11:23:08 | FromDiscord | <Zed> `i use arch btw` |
11:23:12 | FromDiscord | <Synth> *facepam* |
11:23:16 | FromDiscord | <Zed> lol |
11:23:16 | FromDiscord | <Synth> (edit) '*facepam*' => '*facepalm*' |
11:23:42 | * | xet7 quit (Quit: Leaving) |
11:25:01 | * | xet7 joined #nim |
11:26:23 | FromDiscord | <Yardanico> sent a code paste, see http://ix.io/2oBu |
11:26:25 | FromDiscord | <Synth> I fixed it! |
11:26:34 | FromDiscord | <Yardanico> sent a code paste, see http://ix.io/2oBv |
11:26:49 | FromDiscord | <Synth> I had to change this: `proc test() {.importc, dynlib: "libtest.so".}`↵Into: `proc test() {.importc, dynlib: "./libtest.so".}` |
11:26:51 | FromDiscord | <Yardanico> for more complex things (assuming you don't need threads) it would be good to also use nimrtl |
11:27:25 | FromDiscord | <Yardanico> and for GC'd types you would still need to GC_ref and GC_unref in the library |
11:27:31 | FromDiscord | <Yardanico> and call destroy or something like that from the main file |
11:27:43 | FromDiscord | <Yardanico> since GC's in the library and in the main file will be separated |
11:27:46 | FromDiscord | <Yardanico> (edit) 'separated' => 'separate' |
11:30:08 | FromDiscord | <Synth> Thank you! |
11:32:13 | * | rockcavera joined #nim |
11:40:50 | * | robotme quit (Quit: robotme) |
11:47:26 | * | sacredfrog joined #nim |
11:50:39 | * | Senny quit (Ping timeout: 272 seconds) |
11:56:50 | bung | how can I write multilines string to a file in .nimble ? |
11:57:35 | bung | I tried using shell package not worked out |
11:58:54 | Yardanico | ?? |
11:59:03 | Yardanico | just either add \n\n or use multiline strings |
11:59:08 | Yardanico | I mean \n for newline |
11:59:11 | Yardanico | \n\n is two newlines for example |
11:59:28 | bung | dont know why it writes nothing |
11:59:39 | bung | let me try just exec |
11:59:44 | Yardanico | exec? |
12:01:02 | bung | yeah I change to `cat << EOT >> .git/hooks/pre-commit` |
12:01:34 | * | Vladar quit (Quit: Leaving) |
12:01:43 | Yardanico | ehm |
12:02:18 | Yardanico | why not just use writeFIle ? |
12:02:21 | Yardanico | wrilteFile * |
12:02:33 | Yardanico | it works in the VM (=> works in nimscript) |
12:03:18 | livcd | mratsim: are you really building a desktop client in QT and Nim? |
12:03:58 | bung | I cant find it from docs |
12:04:25 | bung | https://nim-lang.org/docs/nims.html |
12:04:31 | Yardanico | what docs? |
12:04:34 | Yardanico | it's in the system module |
12:04:35 | bung | or https://nim-lang.org/docs/nimscript.html |
12:04:41 | Yardanico | almost all procs from the system module are available in the VM |
12:05:02 | Yardanico | https://nim-lang.org/docs/io.html#writeFile%2Cstring%2Cstring |
12:05:09 | Yardanico | (io is imported from system module) |
12:05:33 | bung | ok , I should notive first line of io module `This is a part of system.nim, you should not manually import it.` |
12:05:38 | Yardanico | yes |
12:06:01 | * | supakeen quit (Quit: WeeChat 2.8) |
12:06:22 | narimiran | new (guest) blogpost is out: https://nim-lang.org/blog/2020/06/08/static-analysis.html |
12:06:42 | * | supakeen joined #nim |
12:14:21 | FromDiscord | <exelotl> Hey I don't think the first example is correct, you can't assign to `i` because its a `let` variable |
12:17:44 | narimiran | that should be a pseudocode, but you're right, i'll change it |
12:18:06 | narimiran | it looks too close to nim ;) :) |
12:18:22 | FromDiscord | <exelotl> (I statically analyzed the program with my cranium) |
12:18:28 | narimiran | i guess `func someSieve(const num: uint64): bool` should be changed too |
12:33:08 | bung | I wrote a simple tool work with git hooks https://github.com/bung87/stage/blob/master/src/stage.nim |
12:38:03 | alehander92 | i think |
12:38:25 | FromDiscord | <Zed> Yardinco, did you ever get the nim colour pr changed on github? |
12:38:26 | alehander92 | that moerm's post is pretty god |
12:38:37 | alehander92 | that moerm's post is pretty good |
12:39:04 | alehander92 | but usually maybe such strict validation works best in libs |
12:39:31 | alehander92 | because its harder to motivate someone to do all this effort for a lot of the end app code |
12:39:55 | alehander92 | on the other hand lib code is supposed to be very robust and used by many people, so it seems easier to accept some more work |
12:40:07 | Araq | on the contrary, it's mostly application specific |
12:40:28 | alehander92 | yeah, i get what you mean |
12:40:36 | Araq | there are domains where verification is required by law. |
12:40:38 | * | silvernode quit (Ping timeout: 256 seconds) |
12:40:40 | Yardanico | @Zed it got merged and then reverted because another language (Dafny) got a very similar colour before us, and then some people said that they're too used to the current green so idk, see http://forum.nim-lang.org/t/6350 |
12:41:05 | alehander92 | but i am talking about normal apps/projects |
12:41:23 | alehander92 | mainstream stuff like cli tools etc, not really airplanes |
12:41:52 | Araq | yeah I wonder why. it's almost somebody out there understands cost-benefit analysis |
12:41:55 | alehander92 | e.g. i expect the nim stdlib or some useful libs to easily add require/ensure |
12:42:17 | alehander92 | but the whole point is that if the cost for z3-like stuff decreases |
12:42:36 | alehander92 | the analysis changes |
12:42:46 | * | abm joined #nim |
12:43:48 | alehander92 | anyway, that's ok, my point was that i expect libs to be the obvious example of more "ergonomic" usage or even inferrence of invariant properties |
12:44:54 | FromDiscord | <Zed> Yardinco: That's a bummer, Personally i think we should go for a bright colour(purple, cyan) make the language standout |
12:45:32 | Araq | alehander92, drnim's development is paused though, too many arc bugs left to fix |
12:45:51 | alehander92 | but i think require inference and stuff like this |
12:45:58 | FromDiscord | <Zed> > Definition of Nimrod. 1 : a descendant of Ham represented in Genesis as a mighty hunter and a king of Shinar |
12:46:05 | FromDiscord | <Zed> i gues we could have a ham colour |
12:46:09 | FromDiscord | <Zed> *guess |
12:46:11 | Araq | in theory drnim would help us with arc bugs too ofc. in practice I have no clue how to write the invariants |
12:46:29 | Araq | and once I can do that, Z3's separation logic might not be up for the task :P |
12:46:35 | alehander92 | would be cool: some cases can be at least hinted and left to the user to refine |
12:46:54 | alehander92 | ah, maybe |
12:56:41 | * | kungtotte quit (Read error: Connection reset by peer) |
12:56:46 | PMunch | @Zed, what colour even is "Ham colour" |
12:57:35 | * | solitudesf- quit (Remote host closed the connection) |
12:57:39 | * | kungtotte joined #nim |
12:58:01 | * | solitudesf- joined #nim |
13:09:11 | Yardanico | @Zed ^ :P |
13:09:49 | Araq | rose, what else |
13:12:38 | * | Vladar joined #nim |
13:13:01 | * | dddddd joined #nim |
13:26:05 | * | solitudesf- quit (Remote host closed the connection) |
13:26:30 | * | solitudesf- joined #nim |
13:30:26 | federico3 | https://news.ycombinator.com/item?id=23452170 |
13:31:09 | FromDiscord | <Zed> The colour of ham. |
13:34:03 | PMunch | @Zed, yes, but which of them: https://www.123rf.com/photo_17217277_a-background-of-sliced-parma-ham-colour-palette-with-complimentary-colour-swatches.html |
13:34:23 | * | opal quit (Ping timeout: 240 seconds) |
13:34:32 | Yardanico | federico3: nothing changes, people complaining about unqualified imports again :P |
13:35:06 | Yardanico | also all-caps NIM again |
13:35:07 | FromDiscord | <Zed> The 3rd or 4th swatch |
13:35:34 | FromDiscord | <Zed> PMunch:^ |
13:38:51 | adnan338 | When I create a type which is a ref object, if I pass an instance of that type, is this not a ref already? If so, why can't I use isNil() on it? |
13:38:57 | federico3 | Yardanico: the thread is missing the usual uninformed whining on style insensivity |
13:39:08 | Yardanico | adnan338: it is a ref |
13:39:12 | Yardanico | show the code :) |
13:40:07 | PMunch | federico3, that is true |
13:40:46 | adnan338 | Yardanico https://play.nim-lang.org/#ix=2oCh |
13:41:02 | Yardanico | adnan338: why do you have "ref Tree[Node]" as left and right? |
13:41:08 | Yardanico | do you really want a double reference? |
13:42:07 | adnan338 | no, sorry. I think I got confused by the errors |
13:42:11 | Yardanico | https://play.nim-lang.org/#ix=2oCi strip the unneccesary `ref` attributes but this code is a bit incorrect |
13:42:21 | Yardanico | you need to add checks to check if left/right are nil |
13:46:21 | adnan338 | Yardanico thank you. Just another question, do I need to construct the tree with new(tree) there? |
13:47:43 | Yardanico | adnan338: no |
13:47:53 | Yardanico | object construction syntax automatically creates a new instance if it's a ref type |
13:48:07 | * | drewr quit (Quit: brb) |
13:48:18 | * | opal joined #nim |
13:49:08 | * | drewr joined #nim |
13:52:39 | FromDiscord | <willyboar> You make me hungry with all this ham |
14:00:27 | disruptek | zevv: just run both pieces of ast through the same washing machine; parse statement or something. |
14:01:59 | disruptek | leorize[m]: criterion monotimes? i don't care. prs accepted. |
14:15:38 | FromDiscord | <Technisha Circuit> Is it possible to use a Golang library in Nim? Just curious |
14:15:48 | Yardanico | well, first of all - Go has FFI |
14:15:56 | Yardanico | so you can export C functions from Go and use them in nim |
14:16:00 | Yardanico | second alternative - try using gccgo |
14:16:05 | FromDiscord | <Technisha Circuit> Oh? |
14:16:10 | Yardanico | nim also has go gc support from that, but idk how it works rn |
14:16:18 | FromDiscord | <Technisha Circuit> Oh nice |
14:16:43 | Yardanico | why do you ask though? :D you ask about nodejs, then go :P |
14:16:58 | FromDiscord | <Rika> hes multilingual |
14:20:31 | FromDiscord | <Technisha Circuit> ^^ |
14:20:46 | FromDiscord | <Technisha Circuit> I tried learning a bit of Go before Nim |
14:20:57 | Yardanico | what's there to learn |
14:21:01 | Yardanico | it's too simple :P |
14:21:05 | FromDiscord | <Technisha Circuit> And besides Python, Nim is pretty much the only language that I've stuck with |
14:21:18 | FromDiscord | <Technisha Circuit> I hate the syntax of go 😅 |
14:22:29 | FromDiscord | <Rika> but it has braces! |
14:22:47 | FromDiscord | <Technisha Circuit> That's the only thing i like about it |
14:22:55 | FromDiscord | <Rika> holy shit lmao |
14:23:06 | FromDiscord | <Technisha Circuit> I'm going to figure out a way to use braces in Nim anyway so eh |
14:23:09 | bung | I dislike language using too much punctuations |
14:23:23 | FromDiscord | <Technisha Circuit> :p |
14:23:51 | FromDiscord | <Technisha Circuit> :GWowoHehe: |
14:27:18 | FromDiscord | <Technisha Circuit> What language has the "best" gc, "best" being your definition of best |
14:27:40 | FromDiscord | <Rika> :nim: xd |
14:27:59 | FromDiscord | <Technisha Circuit> Lmao |
14:28:02 | Yardanico | nim |
14:28:13 | FromDiscord | <Technisha Circuit> Why is that? |
14:28:22 | Yardanico | why do i have to answer? |
14:28:28 | Yardanico | you said "being your definition of best" |
14:28:35 | Yardanico | in my definition of "best" nim is the best |
14:28:39 | Yardanico | in that regard |
14:31:30 | FromDiscord | <Technisha Circuit> You don't have to answer, I'm just curious :P |
14:31:56 | FromDiscord | <willyboar> Please vote: https://github.com/FedericoCeratto/nim-package-directory/pull/28 |
14:31:57 | disbot | ➥ Unfinished Business |
14:36:29 | * | endragor quit (Remote host closed the connection) |
14:36:56 | * | endragor joined #nim |
14:40:45 | * | endragor quit (Remote host closed the connection) |
14:40:55 | * | endragor joined #nim |
14:45:29 | FromDiscord | <Kiloneie> Unix timestamps are the ones used on Linux distros ? |
14:48:41 | FromDiscord | <Technisha Circuit> I think it's used everywhere for alot of things, not just Linux or Unix based OSes |
14:49:40 | FromDiscord | <Rika> theyre used in many places |
14:52:24 | * | abm quit (Quit: Leaving) |
15:02:46 | * | Senny joined #nim |
15:03:01 | * | salewski joined #nim |
15:04:57 | * | waleee-cl joined #nim |
15:04:58 | salewski | I have still no idea what happened with the len() proc in https://github.com/nim-lang/Nim/issues/14605 |
15:05:01 | disbot | ➥ Macro getImpl() issue for not unique symbols ; snippet at 12https://play.nim-lang.org/#ix=2oCN |
15:05:41 | salewski | It may be related with symbol binding, but is there no chance to get the impl of the local len proc? |
15:06:32 | salewski | For the sin() procs echo p[0].getImpl().toStrLit seems to work at least. |
15:07:03 | Araq | you macro needs to handle nkSymChoice |
15:07:09 | salewski | But len() seems to be bound by system module already. |
15:08:03 | salewski | Is there an example for nkSymChoice somewhere? |
15:09:42 | Araq | never mind, it's a bug |
15:09:54 | Araq | cannot get it to produce a sym choice either |
15:10:07 | salewski | OK, fine. |
15:10:16 | * | kenran quit (Ping timeout: 246 seconds) |
15:10:39 | salewski | Bye. |
15:10:42 | * | salewski quit (Quit: WeeChat 2.7.1) |
15:13:18 | * | nsf joined #nim |
15:25:08 | FromDiscord | <Firefell> > Please vote: https://github.com/FedericoCeratto/nim-package-directory/pull/28↵@willyboar Great job. 👍 |
15:25:09 | disbot | ➥ Unfinished Business |
15:36:26 | FromDiscord | <él liquido> is there any way to inject an identifier to a doc comment generated from a template? |
15:37:08 | disruptek | doubtful. |
15:37:10 | * | bung quit (Quit: Lost terminal) |
15:42:47 | FromDiscord | <Shucks> any way to cast an `array[0..2, int]` to an `array[0..2, float]` for example? |
15:44:10 | disruptek | sure. |
15:44:47 | * | PMunch quit (Quit: leaving) |
15:46:12 | * | Senny quit (Ping timeout: 256 seconds) |
15:50:19 | * | tane joined #nim |
15:51:53 | * | robotme joined #nim |
15:52:24 | FromDiscord | <Rika> more of a convert than a cast |
16:06:40 | shashlick | the person who took over Nim docset generation deleted all my work |
16:06:51 | shashlick | now their repo that does the generation is also 404 |
16:07:34 | shashlick | I don't know if 404 = deleted or private account - https://github.com/schmidh |
16:13:52 | disruptek | wait, what? |
16:14:34 | shashlick | he took over docset gen = good then deleted his script = bad |
16:14:41 | FromDiscord | <willyboar> It would be nice to have a tool where you put repos of your interest and forks it everyday automaticaly. In a mirror account. |
16:15:33 | disruptek | why don't you have the work? |
16:16:05 | shashlick | its in git history |
16:16:15 | shashlick | https://github.com/Kapeli/Dash-User-Contributions/commit/1c81b9ceff3c87aa6771857ceafb41d654d4344b |
16:16:21 | shashlick | his commit was to delete all the stuff I did |
16:16:31 | shashlick | anyway, that's not important |
16:16:55 | disruptek | that's the first thing i do when i fork your projects. |
16:17:11 | shashlick | i'm just debating whether I care enough to continue generating these or ignore |
16:17:26 | disruptek | are we talking about `nim doc` output? |
16:17:54 | disruptek | oh, we're talking about `dash` assets? |
16:18:00 | disruptek | for the osx doc reader? |
16:18:04 | shashlick | ya |
16:18:10 | shashlick | zeal for windows also works for it |
16:18:13 | shashlick | many other readers |
16:18:17 | disruptek | sorry, i was super confused. |
16:19:10 | shashlick | http://devdocs.io still shows 0.19.0 - brilliant man |
16:19:49 | FromDiscord | <Kiloneie> Does anyone have any ideas for part 2 of my module Times video ? My current first part video only uses a single procedure from the Times module... i thought the little, time it took/benchmark program would be a good example, but i ended showing almost nothing of the module... What do you wanna see ? |
16:20:17 | shashlick | @kaushalmodi tried PRing 1.2.0 - https://github.com/freeCodeCamp/devdocs/pull/1218 |
16:20:18 | disbot | ➥ Update Nim docs to v1.2.0 |
16:36:31 | * | aenesidemus joined #nim |
16:43:49 | FromDiscord | <djazz> @Kiloneie maybe something that shows current date and time, or something that shows for much time has passed since a timestamp |
16:44:00 | FromDiscord | <djazz> how much time* |
16:44:36 | FromDiscord | <djazz> like how long ago was X file modified in minutes/hours/days |
16:44:47 | FromDiscord | <djazz> maybe to advanced for your series, idk |
16:44:53 | FromDiscord | <djazz> too* |
16:45:09 | disruptek | interval versus duration, datetime versus time. |
16:45:22 | FromDiscord | <djazz> yeah |
16:45:28 | disruptek | epochTime versus cpuTime |
16:45:29 | FromDiscord | <Technisha Circuit> Is it faster if i compile the json module into a .so file then use dynlib to import it, is it faster? |
16:45:29 | FromDiscord | <djazz> datetime and time difference |
16:45:30 | FromDiscord | <Kiloneie> hmm, that is a good one actually, i will try to do it tomorrow, i switched to Iterators topic for today because i got lost in Times module |
16:45:43 | FromDiscord | <Rika> @Technisha Circuit faster to WHAT |
16:46:09 | FromDiscord | <Technisha Circuit> Compile time |
16:46:23 | FromDiscord | <Technisha Circuit> Probably would be a good idea to mention that 😅 |
16:46:28 | FromDiscord | <Rika> youll be sacrificing runtime i assume |
16:46:30 | disruptek | who gives a shit? |
16:46:35 | FromDiscord | <Technisha Circuit> Hm |
16:48:36 | FromDiscord | <Kiloneie> When is compile time speed even important ? |
16:48:56 | FromDiscord | <Rika> when its as bad as rusts |
16:49:41 | FromDiscord | <Kiloneie> How bad is Rust's compile time ? |
16:49:53 | FromDiscord | <Kiloneie> compared to Nim's let's say |
16:49:57 | FromDiscord | <Rika> pretty damn bad afaik |
16:50:11 | FromDiscord | <Kiloneie> got an example ? |
16:50:11 | FromDiscord | <Rika> rivals c++ i hear |
16:50:16 | FromDiscord | <Rika> but i dont know |
16:50:30 | disruptek | just try to build the rust compiler. |
16:50:53 | FromDiscord | <Kiloneie> xD, Nim da king 😛 |
16:51:04 | FromDiscord | <Rika> well nim doesnt do checks like rust does |
16:51:14 | FromDiscord | <Rika> then again, nim also doesnt use llvm like rust does |
16:53:33 | FromDiscord | <Kiloneie> I do wonder when Nim's popularity will finally take off. It's going up, but umm not exactly at the speed anyone here likes. |
16:53:58 | aenesidemus | anyone have the discord link? i just joined the irc and prefer discord |
16:54:04 | FromDiscord | <Rika> when a large corporate backer comes |
16:54:24 | FromDiscord | <Rika> just copied one, ill send it in privms |
16:54:38 | livcd | Well using wNim will definitely increase your compile times and it's noticeable |
16:56:10 | FromDiscord | <Kiloneie> Hmm yes, i believe if i were to make a very nice and interesting video series in making games/small engine??? it could spike it. Who doesn't love games ? |
16:56:29 | shashlick | meh, cannot update old forum posts |
16:56:31 | shashlick | archived |
16:56:35 | FromDiscord | <Isomorpheus> what are yall using to mirror from irc <-> discord? ive never seen a server actually do this successfully |
16:56:46 | FromDiscord | <Rika> Yardanico's bot |
16:57:06 | FromDiscord | <Rika> it was made to improve on the old bridge |
16:57:13 | FromDiscord | <Rika> also uses nim lol |
16:57:22 | FromDiscord | <Rika> also weeb detected |
16:57:30 | FromDiscord | <Isomorpheus> no im a poser |
16:57:39 | FromDiscord | <Isomorpheus> also what shows up if you use unsupported irc content |
16:57:43 | FromDiscord | <Rika> like? |
16:57:51 | FromDiscord | <Rika> i can try sending it lol |
16:57:53 | FromDiscord | <Isomorpheus> test https://media.discordapp.net/attachments/371759389889003532/719596060775022662/Nim-logo.png |
16:57:58 | aeverr | it shows a link |
16:58:00 | FromDiscord | <Isomorpheus> oh just the ilnk |
16:58:03 | FromDiscord | <Rika> yeah |
16:58:20 | aeverr | ACTIONs arent handled too well tho |
16:58:33 | * | aeverr is testing out an action |
16:58:52 | aeverr | oh lmao yardanico you just naiively strip out "ACTION" from the message? |
16:59:43 | aeverr | afaik irc uses \x01ACTION (the message)\x01 to indicate that its an action so maybe just do that instead of removing the word itself |
17:04:26 | FromDiscord | <djazz> what is the best way to check if a string has contents in an if-statement? `if len(mystring) != 0:` gets a bit much if i have to do it a lot |
17:04:35 | FromDiscord | <Rika> imo its that |
17:04:46 | FromDiscord | <Rika> youu can always do mystring.len instead |
17:04:59 | FromDiscord | <Rika> faster to type since you dont need to move back to the start of the word |
17:05:08 | FromDiscord | <djazz> hm |
17:07:12 | * | kenran joined #nim |
17:14:16 | * | kenran quit (Ping timeout: 256 seconds) |
17:26:59 | disruptek | irc has a special message type for actions. |
17:29:21 | * | leaveabug joined #nim |
17:31:09 | leaveabug | when I try to install package strfmt I get an Error: 'hg' not in path. What can I do |
17:31:43 | FromDiscord | <Synth> sent a code paste, see http://ix.io/2oE1 |
17:33:44 | Yardanico | leaveabug: install mercurial |
17:33:52 | Yardanico | strfmt is on bitbucket |
17:33:56 | Yardanico | and why would you want it anywY? |
17:33:58 | Yardanico | *anyway |
17:34:01 | Yardanico | strformat is better |
17:34:33 | FromDiscord | <Rika> @Synth strm.writeLine($room) |
17:34:47 | FromDiscord | <Rika> i assume |
17:34:54 | Yardanico | @Synth I think in this case you have to create a JsonNode yourself |
17:35:06 | Yardanico | I don't think " %* { guild_id: { channel_id: room_number }}" will do what you want |
17:35:27 | leaveabug | trying to build an old project that seems to use it. |
17:35:29 | Yardanico | or wait |
17:35:40 | Yardanico | @Synth can you show the JSON you want to get? |
17:35:43 | FromDiscord | <Rika> im not sure anymore why that doesnt work |
17:36:10 | Yardanico | aaaaaaaaaaaa yet another c compiler error with same inline iterators with regex and glob |
17:36:16 | Yardanico | will try to minimize again |
17:36:55 | Yardanico | https://github.com/nim-lang/Nim/issues/14251 was my attempt at reproducing (it didn't compile too), it got fixed but the issue with glob + regex is still there :D |
17:36:57 | disbot | ➥ [ARC] Undeclared variable in C with inline pragma and iterators ; snippet at 12https://play.nim-lang.org/#ix=2l7S |
17:40:01 | FromDiscord | <Synth> > @Synth strm.writeLine($room)↵@Rika That didn't work |
17:40:13 | FromDiscord | <Rika> yeah |
17:40:16 | FromDiscord | <Rika> i quickly realized |
17:40:26 | FromDiscord | <Rika> so uh can we see more cod |
17:40:27 | FromDiscord | <Rika> e |
17:40:40 | FromDiscord | <Rika> like how you are calling this proc |
17:40:50 | FromDiscord | <Synth> > @Synth can you show the JSON you want to get?↵@Yardanico[IRC]#0000 I want to get: `{ "guild_id": { "channel_id": 1 }}` |
17:40:59 | Yardanico | umm |
17:41:05 | FromDiscord | <Synth> (edit) 'get?↵@Yardanico[IRC]#0000 I' => 'get?↵I' |
17:41:12 | FromDiscord | <Rika> can we see the value of guild_id |
17:41:15 | FromDiscord | <Synth> (edit) '1' => '"1"' |
17:41:21 | FromDiscord | <Rika> like, what the type is and what you pass into it |
17:41:25 | * | leaveabug quit (Remote host closed the connection) |
17:41:36 | FromDiscord | <Synth> @Rika: https://discordapp.com/channels/371759389889003530/371759389889003532/719604575740625037 |
17:41:46 | FromDiscord | <Rika> you dont show what you pass into |
17:41:49 | FromDiscord | <Synth> Yes I did |
17:41:54 | FromDiscord | <Yardanico> @Synth I don't understand |
17:41:55 | FromDiscord | <Rika> ah |
17:41:56 | FromDiscord | <Synth> > chatWrite("guild_id", "channel_id", 1) results in: |
17:42:00 | FromDiscord | <Yardanico> do you really want a json with "guild_id" verbatim? |
17:42:04 | FromDiscord | <Yardanico> ah anyway |
17:42:21 | FromDiscord | <Synth> Just for example yes, other strings will be passed into it after it works |
17:42:25 | FromDiscord | <Rika> its just example |
17:42:30 | FromDiscord | <Synth> Yup |
17:43:59 | FromDiscord | <Yardanico> sent a code paste, see http://ix.io/2oE8 |
17:44:02 | FromDiscord | <Yardanico> I just don't understand why would you need code like that |
17:44:10 | FromDiscord | <Synth> Oh, thank you |
17:44:18 | FromDiscord | <Synth> I just got it from the json nim docs example |
17:44:33 | FromDiscord | <Yardanico> %* assumes keys are already strings verbatim |
17:44:37 | FromDiscord | <Synth> Ahh okay |
17:44:40 | FromDiscord | <Synth> That makes sense |
17:44:41 | FromDiscord | <Rika> sent a code paste, see http://ix.io/2oE9 |
17:44:51 | FromDiscord | <Rika> (edit) 'http://ix.io/2oE9' => 'https://discordapp.com/channels/371759389889003530/371759389889003532/719607839001280552' |
17:45:03 | FromDiscord | <Rika> ah is that so? |
17:45:04 | FromDiscord | <Synth> Oh? |
17:45:15 | FromDiscord | <Yardanico> I just didn't understand what @Synth wanted |
17:45:25 | FromDiscord | <Yardanico> because guild_id was passed on runtime |
17:45:30 | FromDiscord | <Yardanico> so I assumed it might change |
17:46:05 | FromDiscord | <Rika> sent a code paste, see http://ix.io/2oEa |
17:46:15 | FromDiscord | <Rika> im not sure what you mean |
17:46:28 | FromDiscord | <Yardanico> @Rika yeah but in @Synth'f example they passed key names at runtime |
17:46:37 | FromDiscord | <Yardanico> so I assumed they need to change or something |
17:46:40 | FromDiscord | <Rika> is `let` not on runtime |
17:46:47 | FromDiscord | <Yardanico> you don't understand me :/ |
17:46:59 | FromDiscord | <Yardanico> in their example they passed RUNTIME variables to %* for keys |
17:47:01 | * | lritter quit (Quit: Leaving) |
17:47:03 | FromDiscord | <Yardanico> not string constants |
17:47:25 | FromDiscord | <Yardanico> so I assumed it was because that function would be called with different values or something |
17:47:36 | FromDiscord | <Yardanico> of course if you know the keys (as strings) at compile time you can just use %* |
17:47:58 | FromDiscord | <Synth> sent a code paste, see http://ix.io/2oEb |
17:48:04 | FromDiscord | <Yardanico> Show your code |
17:48:16 | FromDiscord | <Yardanico> I get `{"guild_id":{"channel_id":"5"}}` |
17:48:18 | FromDiscord | <Synth> sent a code paste, see http://ix.io/2oEc |
17:48:22 | FromDiscord | <Yardanico> @Synth that's not correct |
17:48:25 | FromDiscord | <Synth> Oh? |
17:48:31 | FromDiscord | <Yardanico> strm.writeLine($data) |
17:48:38 | FromDiscord | <Synth> Ohh I'm sorry |
17:48:40 | FromDiscord | <Synth> I'm so dumb |
17:48:42 | FromDiscord | <Rika> sent a code paste, see http://ix.io/2oEd |
17:49:05 | FromDiscord | <Yardanico> @Rika yeah it's my fault 😛 |
17:49:16 | FromDiscord | <Yardanico> i thought it failed because %* didn't support keys as variables, not because of stream |
17:49:30 | FromDiscord | <Rika> so i was right... |
17:49:55 | FromDiscord | <Synth> Still exact same output |
17:50:12 | FromDiscord | <Yardanico> hrm |
17:50:17 | FromDiscord | <Kiloneie> Are these inline iterators ? https://nim-lang.org/docs/iterators.html Where are the closure ones ? |
17:50:19 | FromDiscord | <Synth> One second... |
17:50:21 | FromDiscord | <Synth> Let me test something |
17:50:28 | FromDiscord | <Yardanico> @Kiloneie all iterators are inline ones by default |
17:50:39 | FromDiscord | <Yardanico> the closure ones have `{.closure.}` pragma |
17:50:48 | FromDiscord | <Kiloneie> ahh okay, thank you |
17:51:09 | FromDiscord | <Synth> Ahh my strings were being passed in wrong |
17:51:11 | FromDiscord | <Yardanico> so when you write `for x in mySeq:` the items for seq is inlined |
17:51:14 | FromDiscord | <Synth> No wonder it didn't work |
17:51:24 | FromDiscord | <Synth> My apologies for distrubing you guys... |
17:51:25 | FromDiscord | <Yardanico> `items` as in `items` iterator for `seq` |
17:51:47 | FromDiscord | <Yardanico> so iterators are fast and good 😛 |
17:51:55 | FromDiscord | <Kiloneie> nice |
17:52:11 | FromDiscord | <Kiloneie> iterator video xD, i didn't really use them much yet. |
17:52:34 | FromDiscord | <Yardanico> oh right it's you who's been doing these youtube vids, I forgot 😛 |
17:52:55 | FromDiscord | <Yardanico> i am subscribed btw (but I didn't watch them really, sorry :P) |
17:53:15 | FromDiscord | <Yardanico> but yeah they would've been helpful when I was a newbie in nim |
17:53:50 | FromDiscord | <Rika> videos are too slow for me to follow (maybe thats why i also dont watch anime anymore |
17:53:58 | FromDiscord | <Kiloneie> Yeah, i am trying to pump a lot of them out, sadly it does take time. |
17:54:06 | FromDiscord | <Yardanico> @Rika well yeah that is true for me nowadays too |
17:54:11 | FromDiscord | <Kiloneie> Gotta compress and dumb down as much as possible |
17:54:16 | FromDiscord | <Yardanico> I really don't watch tutorial vids |
17:55:02 | FromDiscord | <Yardanico> like yesterday I was setting up linux + freebsd dual boot on a single ZFS pool and had to google for quite a while, read different resources, stuff, also had to ask on #freebsd IRC (on freenode), and the person here helped me find the solution |
17:55:03 | FromDiscord | <Kiloneie> I don't either, especially since Nim has nothing but my own xD...(theres another guy but he started a week after me and quit also a week after my first pause lol, doesn't count) |
17:55:26 | FromDiscord | <Kiloneie> videos can help a ton |
17:55:49 | FromDiscord | <Kiloneie> like, 5 min video to quickly do something, as opposed to reading like a maniac for an hour on a topic you know nothing about |
17:56:14 | FromDiscord | <Kiloneie> doesn't apply to most people here. |
17:58:11 | Yardanico | well with more time spent in the internet and tech stuff I find less and less resources about things I want to know about :P |
17:58:25 | Yardanico | so i have to read the actual documentation more often XD |
17:58:38 | * | robotme quit (Quit: robotme) |
18:01:22 | FromDiscord | <Kiloneie> Yeah, Nim is the first and only language i had to read the docs extensively. It does help the docs are structured very well and aren't all over the place, if i were to start with c++ again i wouldn't know where to start. |
18:01:58 | Yardanico | well, the big advantage is that I actually understand the underlying stuff when reading real docs and manuals :P |
18:02:11 | Yardanico | so it's not always specific to the problem I'm solving |
18:02:37 | livcd | Kilonie: John's videos are nice and concise. |
18:03:13 | FromDiscord | <Kiloneie> about Nim ? Whos John... ? |
18:03:18 | livcd | I hate that he does not use syntax highlighting but beggars cant be choosers |
18:03:42 | livcd | "needless process" on YT |
18:03:51 | Yardanico | @Kiloneie https://www.youtube.com/channel/UCRPaa1MejOaSUo8viposRLw |
18:04:18 | FromDiscord | <Kiloneie> oh yeah i've watched 2 of his |
18:04:19 | Yardanico | he does use syntax highlighting though |
18:04:46 | FromDiscord | <Kiloneie> he is focused in a completely different direction with a way different style |
18:05:45 | livcd | not in every video |
18:17:50 | disruptek | with more time with nim i understand it less and less. |
18:18:59 | FromDiscord | <Kiloneie> Why ? Because it's complicated under the hood ? |
18:22:29 | disruptek | when you keep finding monsters in the bathroom, at some point you start shitting in the kitchen. |
18:22:57 | * | Vladar quit (Quit: Leaving) |
18:23:03 | FromDiscord | <djazz> xD |
18:23:09 | FromDiscord | <Kiloneie> xD, happens with pretty much everything when you know too much |
18:24:39 | FromDiscord | <Kiloneie> like when i started with Game Maker, man was it amazing, but then... man it's a piece of garbage under the hood actually D:... the difference in speed from the version i used to what it is now is about 20 times+ difference. And all kinds of weird shit. |
18:30:14 | Araq | er, there is a weird bug on my mic |
18:30:36 | Araq | irk |
18:31:31 | Araq | planet earth has one species less |
18:32:07 | Araq | natural selection at work. bug species who don't touch my mic survive |
18:32:07 | * | kenran joined #nim |
18:35:48 | FromDiscord | <Kiloneie> lol, bug phobic |
18:35:55 | Yardanico | i dont like insects either |
18:36:01 | FromDiscord | <KingDarBoja> Lol |
18:36:13 | Araq | all bugs must die |
18:36:24 | FromDiscord | <Kiloneie> i hate spiders |
18:36:25 | FromDiscord | <KingDarBoja> Where I live there are several of them, but nothing like Australian ones lol |
18:36:54 | FromDiscord | <KingDarBoja> I hate spiders too but I don't kill the ones on the rooftop |
18:36:57 | FromDiscord | <Kiloneie> and annoying flies that keep flying onto your skin and ears... |
18:37:02 | FromDiscord | <KingDarBoja> Cuz those are actually harmless |
18:38:07 | * | endragor quit (Ping timeout: 260 seconds) |
18:48:36 | ldlework | I forgot, does nim have partial application? |
18:48:51 | FromDiscord | <Rika> ? |
18:49:08 | FromDiscord | <exelotl> like currying? |
18:49:19 | Araq | you can do currying via macros |
18:49:40 | disruptek | so many elixir jobs now. |
18:49:43 | ldlework | proc add(a: int, b: int) = a + b |
18:49:49 | ldlework | let add5 = add 5 |
18:49:52 | ldlework | something like that |
18:50:12 | disruptek | there's a curry module. |
18:50:15 | disruptek | !repo curry |
18:50:16 | disbot | https://github.com/t8m8/currying -- 9currying: 11Currying Library for Nim 15 34⭐ 4🍴 7& 1 more... |
18:50:31 | FromDiscord | <exelotl> I wish I had a curry right now |
18:50:42 | FromDiscord | <Rika> stop making me hungry |
18:50:47 | Yardanico | ham colour |
18:51:16 | ldlework | Araq: that'll never be a language feature right |
18:51:32 | disruptek | it's already supported. |
18:51:41 | disruptek | i just wish you could do type currying more easily. |
18:52:41 | ldlework | I said in another channel "Nim is pretty ML like" but I guess I was mostly thinking of it's expression-based control structures |
18:52:53 | disruptek | it's nice. |
18:55:13 | ldlework | I miss the pipeline operator too. |
18:56:28 | FromDiscord | <exelotl> Have I run into a bug? I have `var soundbankBin* {.importc:"soundbank_bin", extern:"soundbank_bin", codegenDecl:"const $# $#".}: cstring` |
18:56:39 | FromDiscord | <exelotl> and it generates the following C code: `const NCSTRING soundbank_bin;` |
18:56:43 | FromDiscord | <exelotl> but only on linux |
18:58:10 | FromDiscord | <exelotl> oh wait, I'm wrong, it generates that on windows too... |
18:58:24 | FromDiscord | <exelotl> but for some reason I don't get multiple definition warnings on windows |
18:58:45 | FromDiscord | <exelotl> (edit) 'warnings' => 'errors' |
19:01:07 | leorize[m] | exelotl: what are you trying to do? |
19:01:26 | disruptek | he's playing a game called `stump the chumps`. |
19:03:29 | disruptek | ix us the code at least. |
19:03:41 | FromDiscord | <exelotl> i have some const data in an external C file. I add it to the build using `{.compile:"../../data/soundbank.c".}` then I want to access it from nim and have it marked as extern in Nim's generated C code |
19:04:00 | disruptek | does that magically link it in? |
19:05:13 | FromDiscord | <exelotl> yeah, it worked fine on windows and mac but apparently adding the `extern` pragma doesn't automatically add the `extern` annotation in C |
19:05:26 | FromDiscord | <exelotl> which makes me wonder how it ever worked at all, and why it only fails on linux |
19:05:41 | disruptek | maybe your codegendecl is overriding it? |
19:05:52 | FromDiscord | <exelotl> hm yeah might be |
19:06:00 | shashlick | back in the docset business - https://github.com/genotrance/nim-docset |
19:06:09 | disruptek | i'm just curious if it actually works on windows. |
19:06:25 | disruptek | maybe one platform isn't correctly overriding the decl and the other is. |
19:07:26 | FromDiscord | <exelotl> It's generated as `const NCSTRING soundbank_bin;` on both platforms. Also using the same compiler toolchain (devkitARM) on both platforms |
19:07:58 | FromDiscord | <exelotl> maybe they changed a compiler setting in the latest devkitARM? |
19:08:32 | disruptek | so it works on windows? |
19:08:49 | disruptek | like, you successfully access the symbol at runtime? |
19:10:10 | * | kenran quit (Ping timeout: 260 seconds) |
19:10:44 | FromDiscord | <exelotl> yeah, I've been using this in my code since around christmas |
19:12:55 | disruptek | christmas of which year? |
19:13:06 | disruptek | it's like an annual thing, right? |
19:14:42 | disruptek | did you mention which nim this is? |
19:16:03 | FromDiscord | <exelotl> 1.2.0 but I don't think it's a nim version thing, I think it's just my C compiler being lenient for some reason |
19:16:36 | FromDiscord | <exelotl> also, y'know, *the* christmas |
19:16:49 | FromDiscord | <exelotl> the one where the messiah was born |
19:17:12 | ldlework | nimsuggest-mode's nimsuggest-show-doc doesn't work |
19:18:36 | ldlework | other suggestions and stuff are working though |
19:18:54 | sendell | (WSL + nim-vscode + vscode remote for WSL) makes nimsugest run crazy (100% of a core). I had this problem on windows before, but just can't remember what fixed it... -_- any leads ? |
19:20:16 | ldlework | Ah OK, it works, but only on some stdlib functions |
19:20:33 | ldlework | worked on getEnv but not ansiForegroundColorCode |
19:20:49 | ldlework | wait now it works |
19:20:51 | ldlework | wtf |
19:21:17 | * | ldlework shrugs. |
19:27:14 | ldlework | I have: |
19:27:16 | ldlework | color = if ok: green else: red |
19:27:18 | ldlework | resultLabel = color($ok) |
19:27:20 | ldlework | where green and red are procs |
19:27:32 | ldlework | when i try to call color, I get, attempting to call routine: 'color' |
19:27:35 | ldlework | found 'color' of kind 'let' |
19:27:47 | ldlework | are procs not first-class? |
19:28:56 | FromDiscord | <Rika> use when |
19:29:35 | ldlework | how do you mean |
19:30:18 | ldlework | Error: cannot evaluate at compile time: ok |
19:35:32 | * | tdc joined #nim |
19:36:21 | ldlework | ? |
19:45:48 | * | nsf quit (Quit: WeeChat 2.8) |
19:47:12 | FromDiscord | <Rika> actually wait for someone less busy than me to answer |
19:49:22 | FromDiscord | <Rika> does nim have a `yield from` like python? |
19:50:13 | shashlick | nim version in devel is clearly 1.3.5 but docs get generated in web/upload/1.3.1 - what gives? |
19:50:16 | * | Senny joined #nim |
19:50:43 | shashlick | i used koch docs |
19:53:57 | shashlick | meh koch was out of date |
19:56:20 | * | tdc quit (Ping timeout: 256 seconds) |
20:04:37 | alehander92 | exelotl :) good note on Christmas |
20:04:41 | alehander92 | did you resolve your issue |
20:05:04 | alehander92 | hm, time to look at my nim projects |
20:05:10 | * | neceve_ quit (Ping timeout: 265 seconds) |
20:09:21 | FromDiscord | <willyboar> Time to start the framework :p |
20:15:25 | alehander92 | well guys did you plan something there |
20:22:34 | * | aenesidemus quit (Ping timeout: 265 seconds) |
20:29:11 | FromDiscord | <willyboar> Just some ideas |
20:36:25 | * | krux02 joined #nim |
20:37:45 | * | aenesidemus joined #nim |
20:41:56 | * | PMunch joined #nim |
20:44:18 | alehander92 | ok, but its best to collect them |
20:47:58 | PMunch | Is there a way to get a unique identifier of a closure iterator? |
20:49:24 | alehander92 | hmm, inside it? |
20:49:37 | PMunch | No outside it |
20:50:34 | FromDiscord | <willyboar> alehander92 PMunch keep notes |
20:51:22 | PMunch | I tried to just use `addr`, but adding it to a linked list and then use `value.addr` on the node yielded a different one that the one I added, example: http://ix.io/2oF9 |
20:51:57 | PMunch | https://play.nim-lang.org/#ix=2oF9 |
20:52:20 | PMunch | As you can see both the iterator in the node and the one in the variable are finished, so it is the same one |
20:53:38 | PMunch | Those two pointers looks to be so far apart that I think one might be on the stack and the other is on the heap |
20:57:18 | * | bung joined #nim |
20:57:54 | leorize[m] | that might just be the value of it's container |
20:58:29 | leorize[m] | what about the address of the inside of that closure iterator? |
20:59:41 | PMunch | leorize[m], what do you mean? |
21:00:59 | leorize[m] | the variables inside that closure iterator might be allocated on the heap |
21:03:05 | PMunch | What? |
21:03:15 | PMunch | I can't get the pointer to something inside the iterator.. |
21:03:28 | PMunch | At least not without calling it and hooking it somehow |
21:09:28 | * | matti quit () |
21:10:23 | * | matti joined #nim |
21:12:01 | * | Trustable quit (Remote host closed the connection) |
21:16:57 | alehander92 | PMunch i dont get why do you use lists |
21:17:01 | FromGitter | <ynfle> Is there a way to have 2 procs that call each other? |
21:17:05 | alehander92 | `it` itself has the same pointer |
21:17:20 | alehander92 | it probably gets copied as return value |
21:17:26 | FromDiscord | <Rika> @ynfle forward declare one of them |
21:17:35 | * | arend joined #nim |
21:18:01 | FromGitter | <ynfle> Could figure out the syntax |
21:18:20 | alehander92 | it uses asgnRef |
21:18:46 | PMunch | None of these pointers are the same alehander92: https://play.nim-lang.org/#ix=2oFi |
21:20:03 | alehander92 | https://play.nim-lang.org/#ix=2oFj |
21:20:04 | alehander92 | huh |
21:20:56 | * | solitudesf- quit (Ping timeout: 246 seconds) |
21:20:56 | alehander92 | eh now you changed to return |
21:21:42 | * | arend quit (Remote host closed the connection) |
21:21:55 | PMunch | Well yes |
21:22:12 | PMunch | The result addr and the it addr is probably the same place on the stack |
21:24:03 | alehander92 | i mean the link stuff copies |
21:24:10 | alehander92 | the lists |
21:24:14 | alehander92 | probably |
21:25:02 | PMunch | Well it doesn't copy, because both iterators are marked as finished |
21:25:05 | PMunch | So it's the same iterator |
21:25:22 | FromGitter | <ynfle> Are there any caveats for forward declarations? |
21:26:44 | leorize[m] | PMunch: https://play.nim-lang.org/#ix=2oFn |
21:26:53 | leorize[m] | you can do it like this if you want it to copy |
21:27:16 | PMunch | The thing is I don't want to copy it |
21:27:31 | leorize[m] | @ynfle other than you have to ensure that the two declarations are the same, no |
21:30:00 | PMunch | Hmm, I have to look more into this tomorrow.. |
21:30:36 | PMunch | It would be nice to be able to get the "identity" of a closure iterator so I can hash it and use them as keys in a table. |
21:30:47 | PMunch | That's my end goal with this |
21:31:06 | * | PMunch quit (Quit: leaving) |
21:32:28 | FromDiscord | <Shucks> Does someone know whats wrong here? Just build it but dllmain doesn't gets called like this guy already said. https://forum.nim-lang.org/t/3190 |
21:34:50 | * | narimiran quit (Ping timeout: 260 seconds) |
21:36:21 | FromDiscord | <Isomorpheus> I need a streaming machine learning library. There are a couple for Python: creme and scikit-multiflow. I've found them to be too slow for my needs. I'm considering rewriting the best performing models (for my problem) in a faster language: Julia or Nim seem suitable. |
21:36:31 | FromDiscord | <Isomorpheus> can someone give me a couple reasons I *shouldn't* use nim |
21:39:24 | FromGitter | <ynfle> Solved, one of the parameter names was spelled differently |
21:39:31 | FromGitter | <ynfle> Didn't realize that would make a difference |
21:39:41 | FromGitter | <ynfle> It makes sense in retrospect |
21:40:53 | FromDiscord | <Rika> @Isomorpheus harder to prototype with than julia since you can omit types completely in every case for julia (dynamic-ish language), and only sometimes in nim |
21:41:46 | FromDiscord | <Isomorpheus> i generally prefer static languages |
21:41:50 | FromDiscord | <Isomorpheus> here are my current thoughts |
21:42:26 | FromDiscord | <Isomorpheus> streaming machine learning is pretty different from reg machine learning so the library issue isn't as big a deal |
21:42:34 | FromDiscord | <Isomorpheus> since even in Python itself the ecosystem is poor |
21:42:48 | FromDiscord | <Isomorpheus> in particular, well-developed linear algebra libraries arent even necessary (afaict) |
21:42:59 | FromDiscord | <Isomorpheus> only thing that could matter a little is like plotting libraries |
21:43:27 | FromDiscord | <Isomorpheus> nim: no repl, no jupyter integration, no plotting libraries?, types are nullable by default? |
21:43:49 | FromGitter | <bung87> go check arraymancer |
21:43:54 | FromDiscord | <Isomorpheus> julia: no AOT standalone binaries, http servers are poorly developed, dynamically typed |
21:44:00 | FromGitter | <bung87> !repo arraymancer |
21:44:01 | disbot | https://github.com/mratsim/Arraymancer -- 9Arraymancer: 11A fast, ergonomic and portable tensor library in Nim with a deep learning focus for CPU, GPU and embedded devices via OpenMP, Cuda and OpenCL backends 15 671⭐ 60🍴 7& 7 more... |
21:44:15 | FromDiscord | <Rika> there are plotting libraries |
21:44:24 | FromDiscord | <Rika> not all types are nullable by default |
21:44:27 | FromDiscord | <Rika> only ref types are |
21:44:55 | FromDiscord | <Rika> (string and seq are "kinda ref" types in where they are pointers but cannot be nulled) |
21:44:59 | leorize[m] | !repo ggplotnim |
21:45:00 | disbot | https://github.com/Vindaar/ggplotnim -- 9ggplotnim: 11A port of ggplot2 for Nim 15 63⭐ 7🍴 |
21:45:29 | FromDiscord | <Rika> so now the only issues are the repl and the jupyter integration |
21:45:31 | FromDiscord | <Isomorpheus> btw I saw the arraymancer library but I don't think it helps much with streaming ML |
21:45:42 | FromDiscord | <Isomorpheus> you receive data one by one so you don't even really need dataframes etc |
21:45:47 | FromDiscord | <Rika> dom96: are you here? how would i go about implementing rate limiting in jester |
21:45:48 | leorize[m] | @Shucks it's not `{.exportc.}-ed` |
21:46:06 | leorize[m] | also you need `{.dynlib.}` so that it's exported |
21:46:38 | FromDiscord | <Isomorpheus> @Rika idk what ref types are because i havent learned Nim yet. is that a catch-all for non-primitives? |
21:46:44 | leorize[m] | @Isomorpheus nullable only applies to `ref` |
21:46:49 | FromDiscord | <Rika> @Isomorpheus no it is not |
21:47:08 | FromDiscord | <Rika> there are non-ref non-primitives |
21:47:15 | leorize[m] | `ref` types are basically types with reference semantics |
21:48:05 | leorize[m] | ~memory |
21:48:06 | disbot | memory: 11The Nim memory model: https://zevv.nl/nim-memory/ |
21:48:38 | leorize[m] | hmm I can't connect to this |
21:48:42 | FromDiscord | <Isomorpheus> same |
21:48:53 | leorize[m] | @Zevv did you take the server down? |
21:48:55 | FromDiscord | <Rika> zevv: your servers dead it seems lol |
21:49:02 | FromDiscord | <Isomorpheus> ok id have to look more into ref types to evaluate how much of a negative that is imo but anyway |
21:49:17 | FromDiscord | <Rika> @Isomorpheus theyre basically objects in the heap |
21:49:39 | FromDiscord | <Isomorpheus> nim: no repl, no jupyter, plotting libraries immature↵julia: dynamic, http ecosystem immature |
21:49:54 | FromDiscord | <Rika> that is a good evaluation |
21:50:00 | leorize[m] | yep that's seem to be correct |
21:50:04 | FromDiscord | <Isomorpheus> hmm |
21:50:18 | FromDiscord | <Isomorpheus> anyone have any other suggestions for languages to look at |
21:50:28 | FromGitter | <ynfle> What about `nim secret` or `inim`? |
21:50:30 | FromDiscord | <Isomorpheus> I considered Rust but it would probably be a nightmare. |
21:51:09 | leorize[m] | @ynfle nim secret is limited to the Nim VM and is buggy in general |
21:51:22 | leorize[m] | inim is a pseudo-repl, not a true repl afaict |
21:51:34 | FromGitter | <ynfle> Yes |
21:52:04 | FromGitter | <ynfle> They are both a pain to deal with but can sometimes be useful |
21:52:59 | FromGitter | <kaushalmodi> Rika: https://web.archive.org/web/20200424040715/https://zevv.nl/nim-memory/ |
21:53:38 | FromGitter | <kaushalmodi> Isomorpheus: ⏎ ⏎ > plotting libraries immature ⏎ ⏎ ggplotnim is awesome. Have you tried that? [https://gitter.im/nim-lang/Nim?at=5edeb3614c9b0f060d51e0ee] |
21:54:12 | FromDiscord | <Isomorpheus> kaushalmodi, no I haven't written a single line of julia or nim and I've barely looked at the syntax |
21:54:17 | FromDiscord | <Isomorpheus> im researching the languages |
21:54:33 | FromDiscord | <Rika> try writing in both first |
21:54:57 | FromDiscord | <Rika> any simple program like making a http client or something and getting a webpage |
21:55:01 | FromGitter | <kaushalmodi> Isomorpheus: Ok, see https://github.com/Vindaar/ggplotnim/blob/master/recipes.org |
21:55:05 | FromDiscord | <Rika> or making a calculator in cli |
21:55:09 | FromGitter | <kaushalmodi> to see all the beauty ggplotnim can create |
21:55:17 | FromDiscord | <Isomorpheus> ill check it out ty kaushal |
21:55:22 | FromDiscord | <Shucks> > @Shucks it's not `{.exportc.}-ed`↵thanks, gonna try it |
21:55:46 | FromDiscord | <Isomorpheus> and im not really a strongly opinionated person about syntax so reading about the language features seems fine to me |
21:55:51 | FromDiscord | <Isomorpheus> maybe ill make a lil http server in each |
21:56:08 | leorize[m] | @Shucks also compile with `--noMain` |
21:57:46 | FromDiscord | <Isomorpheus> i considered swift for this since tensorflow seems to be investing in it. but, the windows support sucks and im meh on apple overall |
22:00:01 | FromDiscord | <Rika> who was that lad making the image manipulation library again |
22:00:07 | FromDiscord | <Rika> what was the name of the library |
22:00:30 | leorize[m] | !repo inumon |
22:00:31 | disbot | https://github.com/dizzyliam/inumon -- 9inumon: 11A high-level image I/O and manipulation library for Nim 15 2⭐ 0🍴 |
22:01:05 | FromDiscord | <Rika> thanks |
22:01:14 | FromDiscord | <Rika> damn theyve already got an icon |
22:03:13 | * | tane quit (Quit: Leaving) |
22:03:24 | FromDiscord | <Isomorpheus> lol |
22:03:28 | FromDiscord | <Isomorpheus> shit they mean business |
22:07:45 | FromDiscord | <Isomorpheus> https://github.com/nim-lang/needed-libraries/issues/77 |
22:07:46 | disbot | ➥ [Meta] Are we scientists yet? |
22:07:48 | FromDiscord | <Isomorpheus> found this |
22:26:00 | * | fredrikhr quit (Ping timeout: 256 seconds) |
22:27:37 | * | krux02_ joined #nim |
22:29:54 | * | sknebel quit (Ping timeout: 240 seconds) |
22:30:14 | * | krux02 quit (Ping timeout: 256 seconds) |
22:30:14 | * | muffindrake quit (Ping timeout: 256 seconds) |
22:31:21 | * | theelous3 joined #nim |
22:32:17 | * | sknebel joined #nim |
22:32:26 | * | muffindrake joined #nim |
22:39:04 | FromDiscord | <Shucks> sent a code paste, see http://ix.io/2oFE |
22:40:04 | FromDiscord | <Shucks> If I change the main nim.cfg like this it seems like it still uses the 64 one with the --cpu:i386 flag. If i add it manually to my project nim.cfg it works |
22:41:19 | leorize[m] | @Shucks if i386 is a thing? :p |
22:41:39 | leorize[m] | @Isomorpheus we have a nim sci gitter chat room iirc |
22:41:42 | leorize[m] | @mratsim can tell you where it is |
22:42:42 | FromDiscord | <Shucks> huh? |
22:44:46 | leorize[m] | I just didn't know that you can use `if` to check for the cpu :P |
22:47:42 | FromDiscord | <Shucks> Thats atleast what all these other checks do in the cfg ;o |
22:48:06 | FromDiscord | <Shucks> well i just gonna define the gcc path in my project cfg then |
22:50:04 | FromDiscord | <mamiysr> Hi, is it possible to use CURL_INTERFACE like config with Nim httpclient? |
22:51:47 | leorize[m] | can you describe? |
22:52:20 | leorize[m] | searching CURL_INTERFACE only get me CURLOPT_INTERFACE, and I'm not sure if that's what you're looking for |
22:53:29 | FromDiscord | <mamiysr> well, i want to use my server ip address other than default one for http requests |
22:53:59 | leorize[m] | ah, so you really asked about CURLOPT_INTERFACE |
22:54:00 | leorize[m] | no, we don't have that here |
22:54:43 | leorize[m] | we do have a curl wrapper which you can use instead |
22:56:39 | FromDiscord | <mamiysr> can i get a documentation link please? |
22:59:35 | leorize[m] | our libcurl wrapper seems to be really old: https://github.com/Araq/libcurl |
23:01:01 | FromDiscord | <djazz> phew, I just finished converting parts of a JS lib to Nim, for my web framework's router. My conversion: https://github.com/daniel-j/koan/blob/master/src/koan/path_to_regexp.nim here is the js lib: https://github.com/pillarjs/path-to-regexp |
23:01:30 | FromDiscord | <djazz> regular expressions in nim kinda sucks, coming from JS world |
23:02:07 | FromDiscord | <djazz> re module was unable to get the capture groups, nre was better but it has a strange api |
23:02:13 | FromDiscord | <mamiysr> oh yes, it looks like pretty old 🙂 but thanks |
23:02:37 | leorize[m] | @mamiysr if you want the feature you can open an issue on our github tracker: https://github.com/nim-lang/Nim |
23:03:00 | leorize[m] | I think I might know how to implement this, no promises though |
23:04:09 | * | krux02__ joined #nim |
23:04:42 | * | opal quit (Remote host closed the connection) |
23:04:50 | leorize[m] | @djazz you should use nim-regex, which according to its user is better than `nre` or `re` |
23:05:06 | leorize[m] | !repo regex |
23:05:06 | disbot | https://github.com/nitely/nim-regex -- 9nim-regex: 11Pure Nim regex engine with linear time match 15 85⭐ 10🍴 7& 7 more... |
23:05:53 | leorize[m] | also npeg is a cool project if you want to write parsers |
23:05:53 | leorize[m] | !repo npeg |
23:05:54 | disbot | https://github.com/zevv/npeg -- 9npeg: 11PEGs for Nim, another take 15 98⭐ 6🍴 |
23:06:00 | * | opal joined #nim |
23:07:02 | * | krux02_ quit (Ping timeout: 260 seconds) |
23:12:57 | FromDiscord | <djazz> Thanks |
23:21:24 | * | krux02__ quit (Remote host closed the connection) |
23:29:43 | FromDiscord | <Rika> does the nim redis module have docs anywhere? |
23:32:32 | * | NimBot joined #nim |
23:34:00 | leorize[m] | you can build them yourself |
23:34:15 | leorize[m] | just `nim doc --project --outdir:htmldocs <path/to/file.nim>` |
23:34:25 | FromDiscord | <Rika> i am lazy, i shall read the code instead |
23:34:26 | FromDiscord | <Rika> lmao |
23:57:02 | FromDiscord | <exelotl> Lol I was gonna say someone should make a thin wrapper around JS regex for Nim and call it jreg |
23:58:01 | FromDiscord | <exelotl> Then I remembered jreg is an edgy 1000 layers-of-irony satire youtuber |
23:59:02 | FromDiscord | <Technisha Circuit> Is there a way to use C# libraries in Nim? :GWchinaSakuraThinking: |
23:59:05 | FromDiscord | <Technisha Circuit> I'm just curious |
23:59:31 | FromDiscord | <Elegant Beef> At the moment probably not, but it'd be simillar to the java support |
23:59:40 | FromDiscord | <Technisha Circuit> Oh okay |