00:11:09 | FromGitter | <gogolxdong> How to compile windows version from devel? |
00:24:24 | * | dddddd quit (Remote host closed the connection) |
00:35:34 | * | mitai42 quit (Remote host closed the connection) |
00:49:42 | * | fjvallarino quit (Remote host closed the connection) |
00:50:09 | * | fjvallarino joined #nim |
00:54:16 | * | mitai joined #nim |
00:54:51 | FromDiscord | <2vg> 32bit ? |
00:54:55 | * | fjvallarino quit (Ping timeout: 260 seconds) |
00:55:46 | FromDiscord | <2vg> * gogolxdong: |
01:02:19 | * | Organism quit (Quit: Lost terminal) |
01:02:49 | * | find0x90 joined #nim |
01:06:07 | FromGitter | <gogolxdong> how?and is it possible to build 64bit? |
01:06:57 | FromGitter | <gogolxdong> lib/pure/httpClient.nim(1, 2) Error: module names need to be unique per Nimble package; module clashes with /mnt/d/Nim/lib/pure/httpclient.nim |
01:07:42 | FromGitter | <gogolxdong> got this before but forget how it was solved. |
01:07:42 | FromGitter | <gogolxdong> got this before but forget how it was solved. |
01:08:27 | * | find0x90 quit (Quit: find0x90) |
01:08:39 | FromGitter | <gogolxdong> have checked there is only the path what I need in $PATH of windows env. |
01:16:33 | FromDiscord | <2vg> Yes. It is possible |
01:16:33 | FromDiscord | <2vg> However, it is necessary to use MinGW which is not official and not MinGW |
01:19:45 | FromDiscord | <2vg> My solution(working on my env): |
01:19:45 | FromDiscord | <2vg> Get the 64-bit MinGW compiler from here and setup it. |
01:19:45 | FromDiscord | <2vg> |
01:19:45 | FromDiscord | <2vg> https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/ |
01:19:45 | FromDiscord | <2vg> |
01:19:46 | FromDiscord | <2vg> Just clone Nim, run build.bat and build Nim :) |
01:20:21 | FromDiscord | <2vg> Yes. It is possible |
01:20:21 | FromDiscord | <2vg> However, it is necessary to use MinGW which is not official |
01:21:48 | FromDiscord | <2vg> and... never forget $PATH |
01:31:10 | FromGitter | <gogolxdong> Is it 0.18.0 or latest? |
01:32:56 | FromDiscord | <2vg> either |
01:33:48 | * | fjvallarino joined #nim |
01:34:24 | * | find0x90 joined #nim |
01:34:40 | * | find0x90 quit (Client Quit) |
01:36:32 | FromGitter | <gogolxdong> mine is 0.18.0 |
01:40:16 | FromDiscord | <2vg> working since 0.17.3 on my env |
01:44:02 | FromGitter | <gogolxdong> I know, how to switch to latest? |
01:44:22 | FromDiscord | <2vg> yep, clone devel branch |
01:45:34 | FromGitter | <gogolxdong> it is . |
01:46:41 | FromDiscord | <2vg> ... choosenim using ? |
01:48:28 | FromGitter | <gogolxdong> yeah, but this is from the build directory. |
01:48:59 | FromGitter | <gogolxdong> PS D:\Nim\bin> ./nim.exe -v ⏎ Nim Compiler Version 0.18.0 [Windows: amd64] ⏎ Copyright (c) 2006-2018 by Andreas Rumpf ⏎ ⏎ git hash: 855956bf617f68ac0be3717329e9e1181e5dc0c6 ... [https://gitter.im/nim-lang/Nim?at=5b36e18b3c5abf52b62fdbd3] |
01:54:12 | FromDiscord | <2vg> hmm, I do not think that choosenim can do it. |
01:54:12 | FromDiscord | <2vg> choosenim seems to try to download MinGW from Nim official. |
01:58:35 | FromGitter | <gogolxdong> replaced with gcc-8.1.0 of the above link. |
02:04:22 | FromDiscord | <2vg> cool |
02:38:34 | * | smt` quit (Read error: Connection reset by peer) |
02:38:59 | * | smt` joined #nim |
02:45:24 | * | smt` quit (Read error: Connection reset by peer) |
02:48:09 | * | HYP3RBOR3A joined #nim |
03:18:56 | * | leorize quit (Quit: WeeChat 2.1) |
03:32:30 | * | lompik joined #nim |
03:34:45 | shashlick | @gogolxdong: did you figure it out? |
03:35:22 | shashlick | ping if you have any issues |
03:40:14 | FromGitter | <gogolxdong> not yet |
04:02:24 | shashlick | So I git clone the repo, then csources, then build.bat, then Koch boot |
04:02:27 | shashlick | Works every time |
04:02:34 | shashlick | Which step isn't working for you |
04:03:37 | FromGitter | <kayabaNerve> @Varriount So I used regular vars and addr. The $ function is still getting segfaults |
04:12:08 | FromGitter | <kayabaNerve> And all I can do is make it segfault later rather than earlier, but it always is at the same point despite different addresses being generated. |
04:12:37 | FromGitter | <kayabaNerve> https://pastebin.com/arbMHYxx ⏎ https://pastebin.com/0iNuEgQQ ⏎ Just as a summary. And the second doesn't actually work. It just segfaults later... |
04:14:17 | FromGitter | <Varriount> @kayabaNerve What a coincidence, I was just about to ask about you |
04:17:23 | * | fjvallarino quit (Remote host closed the connection) |
04:17:30 | * | fjvallarino joined #nim |
04:20:19 | FromGitter | <Varriount> @kayabaNerve Can you show me your full code? |
04:23:46 | FromGitter | <kayabaNerve> https://github.com/kayabaNerve/Ember |
04:24:57 | FromGitter | <kayabaNerve> src/lib/SECP256K1Wrapper.nim ⏎ src/Wallet/PrivateKey.nim ⏎ src/Wallet/PublicKey.nim ⏎ src/Wallet/Address.nim ⏎ src/main.nim [https://gitter.im/nim-lang/Nim?at=5b37061970efc60660a107cd] |
04:25:00 | FromGitter | <gogolxdong> build.bat I use build64.bat |
04:25:00 | FromGitter | <kayabaNerve> @Varriount |
04:25:33 | FromGitter | <kayabaNerve> And I don't think it's issue with some sort of threading because it's too consistent... |
04:27:21 | FromGitter | <Varriount> @kayabaNerve https://github.com/kayabaNerve/Ember/blob/master/src/Wallet/PrivateKey.nim#L19 |
04:27:40 | FromGitter | <Varriount> Is the alloc0 memory ever deallocated? |
04:28:37 | FromGitter | <Varriount> This function might be easier: https://nim-lang.org/docs/system.html#unsafeNew,ref.T,Natural |
04:28:52 | FromGitter | <kayabaNerve> I didn't even realize I had that. I thought I removed all |
04:29:01 | FromGitter | <kayabaNerve> I'll remove it |
04:29:54 | FromGitter | <Varriount> Same on line 12 |
04:29:59 | FromGitter | <kayabaNerve> result = PrivateKey() and L30 addition of addr should be enough, right? |
04:30:10 | FromGitter | <kayabaNerve> Yeah. Got that. Just checking PrivateKey() will handle array |
04:30:42 | FromGitter | <Varriount> Also, PrivateKey can just be a reference to an array. |
04:31:26 | FromGitter | <kayabaNerve> K |
04:31:35 | FromGitter | <kayabaNerve> So I changed it the most recent commit |
04:31:37 | FromGitter | <kayabaNerve> It compiles |
04:31:43 | FromGitter | <kayabaNerve> And previously I had 8 addresses printed |
04:31:46 | FromGitter | <kayabaNerve> Now I have 8 to 10 |
04:31:49 | FromGitter | <kayabaNerve> Nowhere near 100 |
04:32:01 | FromGitter | <kayabaNerve> So I have better code now |
04:32:31 | FromGitter | <kayabaNerve> I have the same issue. ⏎ ⏎ Also, public key started off as a ptr to the object it was. Now it's a full object. I like being able to expand it. |
04:40:05 | * | mitai quit (Ping timeout: 260 seconds) |
04:44:04 | FromGitter | <Varriount> @kayabaNerve Do you mind if I just do a general review of the library? It will help me understand the logic a bit better. |
04:44:53 | FromGitter | <Varriount> Unfortunately, I have little experience with cryptocurrency and blockchain-powered programs. |
04:50:30 | FromGitter | <kayabaNerve> Sure |
04:51:26 | FromGitter | <kayabaNerve> It could be my misuse of the library, yet I don't think it is. I think I'm doing very simple things with it... @mratsim Would be able to comment. |
04:51:55 | FromGitter | <kayabaNerve> All I want in the end is for this to work 100% of the time. It's exceptionally weird since it stops in the middle of the array. Not at 62 or 63. 11. |
04:52:18 | FromGitter | <kayabaNerve> To be clear, it's the one here. https://github.com/status-im/nim-secp256k1 |
05:08:23 | FromGitter | <Varriount> @kayabaNerve Have you heard about https://github.com/status-im/nim-stint ? |
05:13:48 | FromGitter | <kayabaNerve> Yeah but it doesn't work without a patched Nim compiler |
05:13:50 | FromGitter | <kayabaNerve> Why? |
05:14:33 | FromGitter | <kayabaNerve> Also, the BigNumber library I use is much more useful for my needs. ⏎ ⏎ Finally, are you saying my BN code is part of the problem or just suggesting it in case I didn't know? |
05:16:31 | FromGitter | <Varriount> Again, I'm going through all the code, as it helps me understand the program as a whole. |
05:16:45 | FromGitter | <kayabaNerve> K. Thanks for your help. |
05:16:48 | FromGitter | <Varriount> I was suggesting it in case you didn't know. |
05:17:12 | FromGitter | <Varriount> By the way, is the latest version of the code in the repo? I can't seem to compile the version I downloaded. |
05:17:45 | FromGitter | <kayabaNerve> You need to package the SECP256K1 library with it |
05:17:48 | FromGitter | <kayabaNerve> It's in the gitignotre |
05:17:59 | FromGitter | <kayabaNerve> I don't have Nimble. My git install is broken |
05:18:05 | FromGitter | <kayabaNerve> So I had to manually download it |
05:18:29 | FromGitter | <kayabaNerve> Oh. And then that requires the BTC libsecp256k1 library to be downloaded as well. That's the end of the downloading though. |
05:18:48 | FromGitter | <kayabaNerve> If you have git, you can clone and just init the submodule |
05:21:10 | FromGitter | <Varriount> You also might like https://github.com/cheatfate/nimcrypto |
05:21:32 | FromGitter | <Varriount> `fatal error: '../../src/lib/SHA512/SHA512.h' file not found` ? |
05:23:33 | FromGitter | <kayabaNerve> https://github.com/kayabaNerve/Ember/blob/master/src/lib/SHA512/SHA512.h |
05:23:38 | FromGitter | <kayabaNerve> The file is on Git. |
05:23:45 | FromGitter | <kayabaNerve> What file are you compiling? |
05:23:59 | FromGitter | <Varriount> Ah, I was in the wrong directory. I was compiling from /src/ |
05:24:16 | FromGitter | <kayabaNerve> Lol. All good. Thanks for your help. |
05:24:35 | FromGitter | <Varriount> When I run it, I get the following stack trace: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b37141363042f2df34a4356] |
05:24:52 | FromGitter | <kayabaNerve> What Nim v? |
05:25:22 | FromGitter | <Varriount> It's a development version. I believe I last updated about 2-3 weeks ago. |
05:25:42 | FromGitter | <Varriount> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b37145663042f2df34a43b3] |
05:26:05 | FromGitter | <kayabaNerve> I'm on v18.0 stable |
05:27:28 | FromGitter | <kayabaNerve> ```result = $cSHA512(hex)``` ⏎ That's the call to the C function. |
05:29:34 | FromGitter | <Varriount> Were these C function wrappers created with C2Nim? |
05:36:53 | FromGitter | <Varriount> @kayabaNerve LLDB spits out `Prometheus[4288:66533] detected buffer overflow` |
05:38:57 | FromGitter | <kayabaNerve> Nope. I don't have that either :p |
05:39:12 | FromGitter | <kayabaNerve> Is this from sha512 or public key? |
05:43:22 | FromGitter | <Varriount> sha512 |
05:43:40 | FromGitter | <Varriount> It seems to be occuring somewhere in the sha512 C file. |
05:44:05 | FromGitter | <Varriount> Is there a repository that file originated from? |
05:44:15 | FromGitter | <kayabaNerve> Sounds not like Nim but a compiler difference |
05:44:23 | FromGitter | <kayabaNerve> What compiler do you use? |
05:44:27 | FromGitter | <Varriount> clang. |
05:44:33 | FromGitter | <kayabaNerve> And it was some public domain code I modified |
05:44:40 | FromGitter | <kayabaNerve> I used GCC. Shouldn't be a difference though |
05:45:20 | FromGitter | <Varriount> Well, depending on the code layout and memory, the buffer overflow isn't guaranteed to raise an error. |
05:45:50 | FromGitter | <kayabaNerve> Got it. |
05:48:26 | FromGitter | <Varriount> @kayabaNerve Are you getting the sha512 digest of the string? |
05:48:43 | FromGitter | <Varriount> or the hmac? |
05:49:24 | FromGitter | <kayabaNerve> It's a hex string converted to a byte array |
05:49:37 | FromGitter | <kayabaNerve> And then that is Sha512'd |
05:49:43 | FromGitter | <kayabaNerve> And I convert the response to a hex string |
05:56:22 | FromGitter | <Varriount> @kayabaNerve For your hash, are the letters uppercase or lowercase? |
05:57:19 | FromGitter | <kayabaNerve> I do all hex operations in upper case iirc |
05:57:47 | FromGitter | <kayabaNerve> But I think my hex library parses undercase too... |
05:58:38 | * | fjvallarino quit (Remote host closed the connection) |
05:59:07 | * | fjvallarino joined #nim |
06:03:30 | * | fjvallarino quit (Ping timeout: 260 seconds) |
06:05:35 | FromGitter | <Varriount> @kayabaNerve I replaced use of the sha512 file with the sha512 hashing from nimcrypto, the binary runs. |
06:05:49 | FromGitter | <Varriount> I get an output of what appear to be hashes. |
06:06:02 | FromGitter | <Varriount> Like `EmbBdmBppYJc6kLZjg46rzh1LciXuapbjRnUpF2etEKkA1Jpgwikn3hgaCSTeW` |
06:08:04 | FromGitter | <kayabaNerve> That's an address |
06:08:11 | FromGitter | <kayabaNerve> How many do you get? |
06:08:26 | FromGitter | <kayabaNerve> You should get 100 with no segfaults. |
06:08:37 | FromGitter | <kayabaNerve> Maybe an address inequality error 1/2... |
06:08:42 | FromGitter | <kayabaNerve> But no segfaults |
06:10:09 | FromGitter | <Varriount> I get 501 lines of output. |
06:11:40 | FromGitter | <kayabaNerve> Oh. Yeah. Sorry. Made it 500 |
06:11:49 | FromGitter | <kayabaNerve> So you had a hash issue but nothing else? |
06:12:11 | FromGitter | <kayabaNerve> I'll switch to nimcrypto, then Nim devel, then clang |
06:12:14 | FromGitter | <kayabaNerve> Thanks @Varriount |
06:12:27 | FromGitter | <kayabaNerve> I really appreciate the time you put into it |
06:12:45 | FromGitter | <Varriount> nimcrypto is a pretty suite library. Shoutout to @cheatfate ! |
06:12:50 | FromGitter | <Varriount> *sweet |
06:13:04 | FromGitter | <kayabaNerve> Real quick. What's the 501st or 1st line? It should be 500 addresses. Just a blank line? Did I print an error message? |
06:13:48 | FromGitter | <Varriount> The first line is `Emb4QENw4SSekBZu9RcPPbXqf779oGyvCKaaqEhKnbBLQqHSqkhXpcaXuykCXu` |
06:14:02 | FromGitter | <Varriount> The last is `Emb5a2GkiwrnbywnjvBA3KNgEojN5s8eUfBhknqX26NGC26zWYL4sgNpTc5ttr` |
06:16:06 | FromGitter | <kayabaNerve> Only thing I can think of is an error message or it is 500 |
06:16:11 | FromGitter | <kayabaNerve> Thanks. I appreciate it |
06:16:21 | FromGitter | <kayabaNerve> And by error I mean one of the warnings I have. |
06:16:49 | FromGitter | <kayabaNerve> Fun fact: you probably have generated more address than me now. What are you going to do with all your places to hold cryptocurrency now? |
06:19:19 | FromGitter | <Varriount> *shrug* |
06:20:37 | FromGitter | <kayabaNerve> True words. Thanks again for all the help. Really meant a lot you actually downloaded it and looked it over |
06:22:53 | * | yglukhov quit (Ping timeout: 240 seconds) |
06:22:53 | * | federico3[m] quit (Ping timeout: 240 seconds) |
06:23:05 | * | hohlerde quit (Ping timeout: 255 seconds) |
06:23:07 | * | zielmicha[m] quit (Ping timeout: 245 seconds) |
06:23:07 | * | carterza[m] quit (Ping timeout: 245 seconds) |
06:23:07 | * | nkaramolegos[m] quit (Ping timeout: 245 seconds) |
06:23:10 | * | byteflame quit (Ping timeout: 245 seconds) |
06:23:12 | * | sendell[m] quit (Ping timeout: 260 seconds) |
06:23:17 | * | tyrion[m] quit (Ping timeout: 240 seconds) |
06:23:17 | * | marszym[m] quit (Ping timeout: 240 seconds) |
06:23:17 | * | Abnegation quit (Ping timeout: 240 seconds) |
06:23:30 | * | sroecker[m] quit (Ping timeout: 260 seconds) |
06:23:30 | * | Jipok[m] quit (Ping timeout: 260 seconds) |
06:23:36 | * | Demos[m] quit (Ping timeout: 245 seconds) |
06:23:36 | FromGitter | <Varriount> @kayabaNerve By the way, I fiddled around with rewriting some of the minor procedures: https://gist.github.com/Varriount/b7d3b21788335fb082d545328ddf72f2 |
06:23:37 | * | xomachine[m] quit (Ping timeout: 256 seconds) |
06:23:37 | * | libman[m] quit (Ping timeout: 256 seconds) |
06:23:37 | * | Miguelngel[m] quit (Ping timeout: 256 seconds) |
06:23:41 | * | endes[m] quit (Ping timeout: 240 seconds) |
06:23:42 | * | dyce[m] quit (Ping timeout: 240 seconds) |
06:23:44 | * | notdekka[m] quit (Ping timeout: 256 seconds) |
06:23:44 | * | sg-james[m] quit (Ping timeout: 256 seconds) |
06:23:47 | * | TheManiac quit (Ping timeout: 260 seconds) |
06:23:47 | * | hitchhooker[m] quit (Ping timeout: 260 seconds) |
06:23:47 | * | pqflx3[m] quit (Ping timeout: 260 seconds) |
06:23:47 | * | unclechu quit (Ping timeout: 260 seconds) |
06:23:57 | * | narimiran[m] quit (Ping timeout: 245 seconds) |
06:23:58 | * | macsek1911[m] quit (Ping timeout: 260 seconds) |
06:24:05 | * | solitudesf quit (Ping timeout: 276 seconds) |
06:24:11 | * | petersjt014[m] quit (Ping timeout: 256 seconds) |
06:24:18 | * | planetis[m] quit (Ping timeout: 256 seconds) |
06:24:18 | * | gh0st[m] quit (Ping timeout: 256 seconds) |
06:25:18 | * | Vladar joined #nim |
06:25:27 | FromGitter | <Varriount> Also, keep in mind that something like ⏎ ⏎ ```while result.len > 61: ⏎ result = result.substr(1, result.len)``` ⏎ ⏎ is very expensive. `substr` creates a new string, so this loop has the possibility of creating lots of intermediate string copies. [https://gitter.im/nim-lang/Nim?at=5b3722577b811a6d63c3a335] |
06:26:03 | FromGitter | <Varriount> It's usually more efficient (although not as simple) to modify strings in-place. |
06:28:14 | * | hoijui joined #nim |
06:32:29 | * | miran_ joined #nim |
06:34:16 | * | zahary joined #nim |
06:40:14 | * | fjvallarino joined #nim |
06:42:36 | FromGitter | <kayabaNerve> I plan on using a single substring |
06:44:02 | FromGitter | <kayabaNerve> Just didn't want to worry about inclusive/exclusive boundary issues just yet and be debugging errors where I cut off one too few |
06:46:03 | * | rockcavera quit (Remote host closed the connection) |
06:54:26 | * | rockcavera joined #nim |
07:07:09 | FromGitter | <Varriount> @kayabaNerve Everything in Nim should be inclusive on both ends. |
07:09:25 | * | zahary quit (Quit: Leaving.) |
07:10:21 | FromGitter | <Varriount> One thing I like a lot is using toOpenArray to operate on slices of strings. |
07:11:10 | * | lompik quit (Ping timeout: 260 seconds) |
07:20:48 | * | zahary joined #nim |
07:26:53 | * | HYP3RBOR3A quit (Quit: Leaving) |
07:33:20 | * | hoijui quit (Ping timeout: 260 seconds) |
07:33:32 | * | pqflx3[m] joined #nim |
07:47:27 | * | rockcavera quit (Remote host closed the connection) |
07:48:39 | * | hitchhooker[m] joined #nim |
07:48:40 | * | federico3[m] joined #nim |
07:48:40 | * | gh0st[m] joined #nim |
07:48:40 | * | Abnegation joined #nim |
07:48:41 | * | unclechu joined #nim |
07:48:41 | * | yglukhov joined #nim |
07:48:41 | * | nkaramolegos[m] joined #nim |
07:48:41 | * | Miguelngel[m] joined #nim |
07:48:41 | * | solitudesf joined #nim |
07:48:42 | * | Demos[m] joined #nim |
07:48:42 | * | dyce[m] joined #nim |
07:48:46 | * | marszym[m] joined #nim |
07:48:47 | * | libman[m] joined #nim |
07:48:47 | * | macsek1911[m] joined #nim |
07:48:47 | * | sendell[m] joined #nim |
07:48:47 | * | carterza[m] joined #nim |
07:48:47 | * | TheManiac joined #nim |
07:48:47 | * | sg-james[m] joined #nim |
07:48:47 | * | narimiran[m] joined #nim |
07:48:48 | * | petersjt014[m] joined #nim |
07:48:48 | * | endes[m] joined #nim |
07:48:48 | * | Jipok[m] joined #nim |
07:48:48 | * | tyrion[m] joined #nim |
07:48:48 | * | hohlerde joined #nim |
07:48:48 | * | zielmicha[m] joined #nim |
07:48:48 | * | sroecker[m] joined #nim |
07:48:48 | * | notdekka[m] joined #nim |
07:48:48 | * | planetis[m] joined #nim |
07:48:49 | * | xomachine[m] joined #nim |
07:48:49 | * | byteflame joined #nim |
07:49:27 | * | zahary quit (Quit: Leaving.) |
08:04:50 | * | dddddd joined #nim |
08:10:43 | * | dgwana joined #nim |
08:11:01 | * | hoijui joined #nim |
08:24:04 | FromGitter | <mratsim> @kayabaNerve unfortunately the whole Status Nim team is off until Monday, for Private keys usin secp256k1 you can check: https://github.com/status-im/nim-eth-keys |
08:25:05 | FromGitter | <mratsim> there are some tricky part in the signature representation in memory, make sure to use the serialize procs. |
08:26:22 | * | xet7 joined #nim |
08:27:48 | * | hoijui quit (Quit: Leaving) |
08:59:22 | * | rockcavera joined #nim |
08:59:34 | * | donzx joined #nim |
08:59:34 | * | donlzx joined #nim |
08:59:51 | * | donlzx quit (Client Quit) |
09:01:27 | * | rauss quit (Read error: Connection reset by peer) |
09:03:24 | * | rauss joined #nim |
09:05:51 | * | Zireael07 joined #nim |
09:06:20 | Zireael07 | making my first steps in nim, I managed to run someone's open source attempt at a roguelike which uses a c library |
09:06:31 | Zireael07 | however the js export of the same doesn't work |
09:07:00 | Zireael07 | and I will admit the js target was one of the reasons why I tried nim |
09:08:34 | FromGitter | <tim-st> nim can only target js if it's pure nim or the stdlib module is supported by js target |
09:09:40 | Zireael07 | the documentation does mention stdlib limitation, but not the pure nim part |
09:10:17 | Zireael07 | awww... at least nim looks like a nice way to have better distribution than Python |
09:10:22 | FromGitter | <tim-st> If it "uses a c library" it is not pure nim if I understand you correctly |
09:11:33 | FromGitter | <tim-st> or do you meant you translated the nim code that uses a c lib to pure nim? |
09:12:08 | Zireael07 | no, it uses a c library via shared lib loading |
09:12:22 | Zireael07 | I never implied the project is pure nim |
09:12:42 | Zireael07 | I just said the documentation doesn't mention the fact that js target can only do pure nim |
09:13:48 | FromGitter | <tim-st> ok, yes, but I think there is no way for a js interpreter to allow loading a library without beeing potentially harmful to the user that uses the js code |
09:13:57 | FromGitter | <tim-st> so they dont allow it |
09:15:05 | Zireael07 | yes, I can understand the safety concerns |
09:15:17 | Zireael07 | but it'd be nicer if docs did mention that limitation |
09:15:25 | FromGitter | <tim-st> yes, absolutely |
09:16:09 | Zireael07 | thanks! |
09:16:14 | * | Zireael07 quit (Quit: KVIrc 4.9.2 Aria http://www.kvirc.net/) |
09:17:03 | FromGitter | <tim-st> no problem, btw nim supports things like determing the target at compile time (js, gcc,...) and you can write code by hand that should be taken if js is target, but that's maybe too much work |
09:43:19 | FromGitter | <bevo009> Could someone tell me why the last assert statement doesn't compile? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b3750b789db5e701c9659eb] |
09:45:09 | * | opi quit (Quit: ZNC - http://znc.in) |
09:45:55 | * | opi joined #nim |
09:46:08 | FromGitter | <mratsim> @Zirael07, if you find a NodeJS wrapper for C dll, you can do Nim JS —> NodeWrapper for DLL —> DLL |
09:52:41 | FromGitter | <bevo009> And, is this the correct doc for assert? https://nim-lang.org/docs/system.html#assert.t,bool,string |
09:54:31 | FromGitter | <mratsim> a.type is int |
09:55:08 | FromGitter | <mratsim> == cannot compare types |
09:55:08 | FromGitter | <bevo009> ahh |
09:55:18 | FromGitter | <bevo009> thanks! |
09:56:19 | * | xet7 quit (Quit: Leaving) |
10:08:51 | livcd | who is the guy behind skyvaultgames ? |
10:27:42 | * | dgwana quit (Read error: Connection reset by peer) |
10:29:35 | * | dgwana joined #nim |
10:35:59 | * | data-man joined #nim |
10:40:23 | FromGitter | <Araq> dunno |
11:09:14 | * | lompik joined #nim |
11:15:20 | * | elrood joined #nim |
11:37:56 | * | nsf joined #nim |
11:38:26 | * | CodeVance joined #nim |
11:44:20 | FromDiscord | <2vg> This is the latest preview version of the techempower benchmark results. |
11:44:20 | FromDiscord | <2vg> By Araq 's packedjson json test is up to 18th place: 3 |
11:44:21 | FromDiscord | <2vg> |
11:44:21 | FromDiscord | <2vg> https://www.techempower.com/benchmarks/#section=test&runid=3da523ee-fff1-45d8-9044-7feb532bf9ee&hw=ph&test=json |
11:45:08 | FromDiscord | <2vg> But sadly, I feel that further optimization is severe ... |
11:45:12 | FromGitter | <Araq> 18th place? |
11:45:19 | FromGitter | <Araq> kinda sucks, doesn't it? |
11:45:36 | * | arecaceae quit (Remote host closed the connection) |
11:46:00 | * | arecaceae joined #nim |
11:47:53 | FromDiscord | <2vg> My http request parser is probably faster so may have to use SIMD any further |
11:51:06 | FromGitter | <Araq> so from X-th position to 18th? where was it before? |
11:51:46 | FromDiscord | <2vg> 24th -> 18th |
11:51:50 | FromDiscord | <2vg> I do not know what is the bottleneck. |
11:52:34 | carterza[m] | is there an offtopic channel for nim on discord? |
11:53:02 | CodeVance | carterza[m], #nim-offtopic |
11:53:09 | CodeVance | oh nvm |
11:53:38 | carterza[m] | hrm is that how my name shows in here - carterza? |
11:53:46 | carterza[m] | I was hoping it'd show as Zachary Carter as I have my nick set |
11:54:01 | carterza[m] | oh well |
11:54:03 | miran_ | it is carterza[m] on IRC |
11:54:14 | carterza[m] | hrm okay - thanks |
11:54:26 | carterza[m] | I'm on Riot so maybe the setting isn't taking effect |
11:55:23 | * | user1101 joined #nim |
11:57:04 | user1101 | Nim's `concept` is so cool, it allows you to constrain types so elegantly. What language is this inspired from? Or is it Nim's own style? |
11:59:29 | carterza[m] | maybe Rust traits? |
11:59:31 | carterza[m] | I dunno |
12:05:19 | FromGitter | <rayman22201> More likely |
12:05:39 | FromGitter | <rayman22201> More likely came from Haskell |
12:06:46 | carterza[m] | Ah - never haskelled before |
12:07:22 | FromDiscord | <magnusi> concepts do look a bit like Rust traits, though |
12:08:53 | carterza[m] | Maybe this - https://en.wikibooks.org/wiki/Haskell/Classes_and_types#Type_constraints ? |
12:09:19 | carterza[m] | I dunno |
12:09:32 | carterza[m] | just haphazardly guessing |
12:10:31 | FromGitter | <rayman22201> Lol. |
12:10:39 | * | dddddd quit (Remote host closed the connection) |
12:11:30 | FromGitter | <rayman22201> Yes wa |
12:12:03 | FromGitter | <rayman22201> My glitter client is acting up. Sorry for the noise |
12:12:04 | carterza[m] | woohoo! what do I win? |
12:12:07 | carterza[m] | :P |
12:12:22 | carterza[m] | I'm playing with openbsd and nim |
12:12:29 | carterza[m] | or I'm about to start playing w/ them |
12:13:20 | carterza[m] | I'm brand new to BSDs though so this is going to be challenging I think |
12:14:53 | carterza[m] | also - I'm about 1/2 way into this book - https://www.amazon.com/Code-Language-Computer-Hardware-Software/dp/0735611319 - not having a CS background, I can say it's a phenomenal read |
12:14:55 | carterza[m] | very enjoyable |
12:15:46 | FromGitter | <rayman22201> Rust type traits also has inspiration from Haskell I believe so the comparison is not surprising. |
12:19:13 | FromGitter | <rayman22201> Have fun with openBSD. Nim should work fine there, though the libraries you can use might be a little more limited. |
12:30:03 | * | mitai joined #nim |
12:31:39 | FromDiscord | <magnusi> does nim have something like `rustdoc`, that is a unified system for code docs? |
12:33:24 | FromGitter | <rayman22201> https://nim-lang.org/docs/docgen.html |
12:34:42 | FromDiscord | <magnusi> neat, thanks |
12:35:19 | FromGitter | <rayman22201> Np |
12:41:38 | carterza[m] | well - this is the article / page that inspired me to look at OpenBSD for web dev |
12:41:57 | carterza[m] | https://learnbchs.org/pledge.html |
12:42:01 | carterza[m] | https://learnbchs.org |
12:42:16 | carterza[m] | I'm thinking about trying to port the Nim playground to it |
12:42:17 | carterza[m] | instead of using Docker |
12:42:25 | carterza[m] | and going with sandboxing instead of using docker w/ a container |
12:47:48 | FromGitter | <rayman22201> Neat! |
12:48:12 | * | salewski joined #nim |
12:48:19 | * | gmpreussner_ joined #nim |
12:49:01 | carterza[m] | https://onewheel.com/ - since I can't find offtopic on riot - I just got this delivered on Thursday |
12:49:06 | carterza[m] | I've been sick so I haven't had a chance to ride it yet |
12:49:10 | carterza[m] | but I'm excited :D |
12:52:41 | * | xet7 joined #nim |
12:54:06 | salewski | Ruby: if self.respond_to(:special_hit_action) and (new_el = special_hit_action(boxlist, x, y, event.button)): |
12:54:08 | CodeVance | :clap: |
12:54:15 | CodeVance | carterza[m], |
12:54:16 | salewski | Mathlab: https://stackoverflow.com/questions/10537491/test-method-existence-on-objects |
12:54:39 | salewski | Has Nim something similar to respond_to() ? |
12:55:32 | FromGitter | <Araq> when declared(module.respondTo) |
12:56:25 | salewski | That is for subtyping, test if a method is available for an object. Is converting some Ruby code to Nim. |
12:57:07 | FromGitter | <Araq> huh? 'when declared' has nothing to do with subtyping |
12:57:10 | CodeVance | compiles(module.respondTo()) |
12:57:35 | * | donzx quit (Quit: Leaving) |
12:57:48 | salewski | Araq, no not testing if method is defined in Module, test if method is available for object instance. |
12:58:03 | salewski | Same as in that matlab link. |
12:59:01 | salewski | Converting OOP Ruby code to Nim is not easy :-( |
12:59:22 | CodeVance | when compiles(obj.respond_To(value)): #... |
12:59:47 | salewski | Oh yes, that may work. |
12:59:47 | carterza[m] | converting any OOP code to Nim isn't easy |
12:59:52 | carterza[m] | unless you use OOP in Nim |
12:59:58 | carterza[m] | and even then it can be challenging |
13:00:16 | carterza[m] | it's not like porting from C |
13:00:38 | salewski | Yes indeed! |
13:00:46 | carterza[m] | because you're working in reverse in terms of abstraction level |
13:00:56 | carterza[m] | now you're going from higher to lower instead of lower to higher |
13:01:29 | FromGitter | <Araq> "method is available for object instance" is a weird way of putting it |
13:01:55 | FromGitter | <Araq> in Nim the object instance has a type and you know whether the type has this proc/method or not |
13:02:18 | FromGitter | <Araq> so the Nim equivalent of your test is actually 'true' or 'false', it's known at compile-time |
13:02:32 | salewski | Araq -- yes, that may be true, but my fist goal is to get it compiling. |
13:02:59 | salewski | I know I will have to rewrite it later to make it fine Nim. |
13:03:09 | CodeVance | I'm making a class macro for nim |
13:03:16 | CodeVance | playing around with ast |
13:06:24 | Yardanico | carterza[m], offtopic is #nim-offtopic |
13:06:42 | Yardanico | carterza[m], and to use it from matrix look at this guide - https://gist.github.com/fstab/ce805d3001600ac147b79d413668770d |
13:06:49 | carterza[m] | thanks bud |
13:06:51 | carterza[m] | I remember on gitter it was twitch or something weird |
13:06:53 | carterza[m] | but I'm trying to get off gitter |
13:06:54 | Yardanico | yes, it |
13:07:03 | Yardanico | #freenode_#nim-offtopic:matrix.org - offtopic channel from matrix |
13:07:13 | carterza[m] | I wish my stupid name showed is zachary carter |
13:07:15 | carterza[m] | but I'll fix that later |
13:07:18 | carterza[m] | thx |
13:07:37 | * | salewski quit (Quit: WeeChat 2.0.1) |
13:07:43 | Yardanico | carterza[m], well, you can change your nickname in IRC (this guide talks about it) |
13:08:19 | CodeVance | I like the new nick |
13:08:24 | carterza[m] | okay I'll give it a read in a sec, thanks |
13:08:24 | carterza[m] | lol |
13:09:24 | Yardanico | carterza[m], open a new chat, invite @appservice-irc:matrix.org to it, and say "!nick yournewnickname" |
13:09:55 | * | carterza[m] is now known as zacharycarter |
13:10:02 | zacharycarter | niceeee |
13:10:39 | CodeVance | wb |
13:11:14 | zacharycarter | thank you! |
13:11:17 | zacharycarter | both of you! |
13:12:07 | Yardanico | CodeVance, isn't there some implementations of it already? :) or you just want to learn macros |
13:13:22 | CodeVance | Both |
13:13:35 | CodeVance | But I want to be able to redefine attributes |
13:14:39 | CodeVance | Yardanico, |
13:14:41 | zacharycarter | If I see a C proc signature like - `char * kutil_urlpartx(struct kreq *req, const char *path, const char *mime, const char *page, ...)` - I'm supposed to use {.varargs.} to bind in Nim I believe. But what about - |
13:14:42 | zacharycarter | `void kutil_verrx(const struct kreq *, const char *, const char *, va_list)` ? |
13:14:43 | Yardanico | CodeVance, yeah, I saw it |
13:15:13 | Yardanico | zacharycarter, what is va_list? there's varargs type in nim too |
13:15:20 | Yardanico | Try to use it with c2nim |
13:15:34 | zacharycarter | I did |
13:15:45 | zacharycarter | it just put va_list there :/ |
13:16:34 | CodeVance | isn't that a C macro |
13:17:14 | zacharycarter | yeah I believe so |
13:17:41 | zacharycarter | https://en.cppreference.com/w/cpp/utility/variadic/va_list |
13:17:42 | * | captainbland joined #nim |
13:17:56 | zacharycarter | so maybe just |
13:18:03 | zacharycarter | varargs[untyped] ? |
13:18:09 | zacharycarter | I'll try that |
13:18:15 | Yardanico | this will only work with macro/template |
13:18:26 | Yardanico | or only with a template, i don't remember |
13:18:32 | FromGitter | <Araq> ``va_list`` is not a thing |
13:18:57 | FromGitter | <Araq> in Nim, it's some opaque compiler magic thing in C (yes, C has these things too!) |
13:19:53 | zacharycarter | ah okay |
13:19:58 | FromDiscord | <2vg> wo, asyncdispatch2 cool |
13:20:01 | FromGitter | <Araq> you can probably get far with ``type va_list {.importc, header: "...".} = object`` though |
13:20:17 | FromDiscord | <2vg> asyncdispatch < 2 ? |
13:20:33 | zacharycarter | sweet - thank you much! |
13:24:23 | * | endragor joined #nim |
13:26:41 | * | donzx joined #nim |
13:26:41 | * | donzx quit (Client Quit) |
13:26:41 | * | donlzx joined #nim |
13:26:51 | * | vry_ joined #nim |
13:28:10 | * | brainproxy quit (Ping timeout: 245 seconds) |
13:28:20 | * | vry_ left #nim (#nim) |
13:32:27 | federico3 | ooh, nice! https://nimble.directory/pkg/nimha |
13:32:55 | * | captainbland quit (Read error: Connection reset by peer) |
13:34:38 | * | find0x90 joined #nim |
13:42:49 | * | Trustable joined #nim |
13:44:15 | * | find0x90 quit (Quit: find0x90) |
13:46:10 | * | zacharycarter sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/rrnhtZMWeZszjaQanVRFCNXC > |
13:46:15 | * | endragor quit (Remote host closed the connection) |
13:46:33 | * | zacharycarter sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/EfopdOeAnlYHoCnLiOoaGcVw > |
13:54:29 | * | data-man quit (Quit: Konversation terminated!) |
13:57:38 | * | codevance[m] joined #nim |
13:58:42 | zacharycarter | oh |
13:58:44 | zacharycarter | I'm being stupid |
13:58:49 | * | brainproxy joined #nim |
13:59:12 | zacharycarter | this is what happens when you take months off from nim |
14:00:36 | * | dgwana quit (Ping timeout: 256 seconds) |
14:04:21 | * | MatrixBridge joined #nim |
14:04:23 | * | MatrixBridge left #nim ("User left") |
14:08:17 | * | CodeVance quit (Quit: Leaving) |
14:12:28 | * | xet7 quit (Quit: Leaving) |
14:22:50 | * | brainproxy quit (Ping timeout: 260 seconds) |
14:26:11 | * | donlzx quit (Quit: Leaving) |
14:28:18 | zacharycarter | https://github.com/zacharycarter/kcgi.nim |
14:36:22 | FromGitter | <Varriount> Hi zacharycarter! |
14:38:04 | zacharycarter | Hey Varriount! |
14:39:16 | zacharycarter | how are you? |
14:56:28 | * | brainproxy joined #nim |
14:59:16 | FromDiscord | <Hel> so i've been trying to make a discord bot with discordnim and i kept getting a zlib1.dll error |
14:59:21 | FromDiscord | <Hel> which i resolved |
14:59:31 | FromDiscord | <Hel> but now i'm getting this error |
14:59:33 | FromDiscord | <Hel> |
14:59:34 | FromDiscord | <Hel> https://cdn.discordapp.com/attachments/371759389889003532/462633293859520523/unknown.png |
15:04:44 | * | PMunch joined #nim |
15:05:03 | codevance[m] | Hel nim has it's own zlib dll doesn't it? |
15:05:43 | FromDiscord | <Hel> yeah that's what i used |
15:05:55 | codevance[m] | in the bin folder zlib1.dll |
15:06:17 | FromDiscord | <Hel> used that too |
15:06:30 | FromDiscord | <Hel> but then i got `could not import: zilb1.dll` |
15:08:10 | * | PMunch quit (Client Quit) |
15:11:52 | * | Ven`` joined #nim |
15:23:30 | * | brainproxy quit (Ping timeout: 260 seconds) |
15:25:04 | * | Ven`` quit (Read error: Connection reset by peer) |
15:26:19 | * | Ven`` joined #nim |
15:35:07 | * | btbytes joined #nim |
15:39:44 | * | btbytes quit (Client Quit) |
15:39:52 | * | nsf quit (Quit: WeeChat 2.1) |
15:42:42 | codevance[m] | Hel drag zlib1.dll to the source folder and the executable folder |
15:43:48 | * | dddddd joined #nim |
15:52:44 | * | Trustable quit (Remote host closed the connection) |
15:53:50 | * | brainproxy joined #nim |
15:55:03 | FromDiscord | <Hel> i did that |
15:59:14 | codevance[m] | You on windows right? |
16:00:09 | FromDiscord | <Hel> yes |
16:00:19 | FromDiscord | <Hel> i mean .dll |
16:00:38 | codevance[m] | what discord lib u using? |
16:01:10 | FromDiscord | <Hel> discordnim - https://github.com/Krognol/discordnim |
16:10:58 | * | Ven`` quit (Read error: Connection reset by peer) |
16:11:17 | * | Ven`` joined #nim |
16:14:33 | * | fjvallarino quit (Remote host closed the connection) |
16:14:39 | * | fjvallarino joined #nim |
16:16:33 | * | brainproxy quit (Ping timeout: 248 seconds) |
16:39:00 | * | fjvallarino quit (Remote host closed the connection) |
16:39:27 | * | fjvallarino joined #nim |
16:43:51 | * | fjvallarino quit (Ping timeout: 240 seconds) |
16:46:33 | zacharycarter | openbsd is pretty straightforward so far |
16:46:35 | zacharycarter | and httpd seems nice |
17:10:25 | * | find0x90 joined #nim |
17:19:07 | * | fjvallarino joined #nim |
17:26:08 | FromGitter | <ephja> I dunno what problem I had, but I think the failure was more predictable when I used malloc rather than allocShared. now it fails then I free the malloc-ed memory since the memory is referenced after that, but it continues to work when I do the equivalent operations for shared memory |
17:28:01 | zacharycarter | I'm getting an error on OpenBSD when trying to install nimble via koch - ```cannot open file compiler/ast``` |
17:28:05 | zacharycarter | I installed nim from source |
17:28:19 | zacharycarter | I've tried with doas |
17:31:09 | FromGitter | <ephja> but I'm playing random samples at random intervals and I can hear that something is different when I call deallocShared and then continue to use the memory, compared to when I do the correct thing and not deallocate before the last access. interesting 🤔🤔 |
17:34:31 | Yardanico | seems that he migrated to rust :D https://github.com/jackmott/nim_simd/commit/7c4e68ff37d34032b90b2a6f3e9075abca12d551 |
17:35:11 | * | dgwana joined #nim |
17:42:35 | FromGitter | <ephja> a good simd interface will provide a lot of value |
17:51:50 | FromGitter | <rayman22201> Anybody know why jackmott gave up on Nim? |
18:00:51 | * | fjvallarino quit (Remote host closed the connection) |
18:00:58 | * | fjvallarino joined #nim |
18:03:10 | * | brainproxy joined #nim |
18:07:29 | * | brainproxy quit (Ping timeout: 248 seconds) |
18:07:56 | * | user1101 quit (Quit: user1101) |
18:11:58 | * | Ven`` quit (Read error: Connection reset by peer) |
18:15:01 | * | Ven`` joined #nim |
18:23:24 | Yardanico | @rayman22201 well, maybe he didn't |
18:27:02 | * | Ven`` quit (Read error: Connection reset by peer) |
18:28:26 | * | Ven`` joined #nim |
18:36:16 | * | brainproxy joined #nim |
18:37:01 | codevance[m] | we are programmers first nimmers second |
18:37:45 | Yardanico | codevance[m], it depends :D |
18:38:29 | codevance[m] | no it doesn't |
18:39:11 | codevance[m] | If rust was nim I'd be using rust |
18:43:09 | Yardanico | codevance[m], well, if nim was named "rust" and rust was named "nim" I would be using rust, but I don't get the point of this comparasion :) |
18:43:38 | miran_ | which one would mozilla sponsor? :D |
18:43:41 | * | miran_ is now known as miran |
18:43:52 | codevance[m] | nim has what I want. rust doesn't. I don't really care what its called. |
18:45:49 | codevance[m] | coding in nim is as I'd envision programming should be. So its the lang I'd chose if given a choice. Other people might not have the same requirements or are driven by other factors. So be it/ |
18:56:44 | FromGitter | <kayabaNerve> Can't compile nimcrypto due to internal error getInt @Varriount |
18:57:00 | * | PMunch joined #nim |
18:58:45 | * | dgwana quit (Quit: Leaving) |
19:00:26 | * | brainproxy quit (Ping timeout: 255 seconds) |
19:04:45 | PMunch | Anyone know how to set up UNIX socket communication? I've found how to connect to a socket from federico3's i3-ipc thing, but nothing on how to set up one |
19:05:17 | FromGitter | <Varriount> @kayabaNerve You probably need the development version of the compiler |
19:06:05 | FromGitter | <kayabaNerve> @Varriount I don't want to use that lol |
19:06:08 | FromGitter | <kayabaNerve> I will if I have to |
19:07:05 | * | lompik quit (Ping timeout: 276 seconds) |
19:09:39 | FromGitter | <Varriount> Why not? The development version is usually quite stable. |
19:10:35 | Yardanico | @kayabaNerve I +1 @Varriount's message - devel doesn't mean "all your programs will break" or "compiler will always crash" |
19:10:43 | codevance[m] | compiler is a package |
19:11:04 | Yardanico | devel is usually more stable than older release :D |
19:11:37 | FromGitter | <ephja> stable versions matter a lot more post 1.0 |
19:11:52 | codevance[m] | I want a new "release" of nim. Or at least some way to see the changes from 0.18 |
19:12:04 | FromGitter | <rayman22201> @codevance[m] I didn't mean to cause a philosophical debate. suppose I should have been more specific. jackmott stopped using Nim for their SIMD project and move to Rust. I want to know what their reasons were for changing. Engineering trade-offs / org issues / community. This is the same reason the community survey is important. This kind of thing is important to for discovering where Nim is weak and or should |
19:12:04 | FromGitter | ... focus development efforts. Or not focus depending on the answer... |
19:14:22 | FromGitter | <rayman22201> Though I completely agree with you, Nim does a lot of things right, and is my favorite language. But that is all my personal bias lol |
19:14:50 | codevance[m] | as far as I can tell "nim the language" doesn't have any weaknesses. |
19:15:07 | codevance[m] | It does what it says it does |
19:15:22 | codevance[m] | the places its weak are the places its not trying to compete in |
19:15:59 | codevance[m] | I'd also be interested in jackmott's reason. But often you don't hear back from teams. |
19:16:20 | federico3 | PMunch: you mean creating it? |
19:16:36 | FromGitter | <rayman22201> codevance[m]: What domains is Nim trying to not compete in? |
19:16:50 | codevance[m] | oop |
19:17:03 | PMunch | federico3, yeah I want to create a UNIX socket that some other program can send messages on |
19:17:11 | codevance[m] | like I said wherever its weak |
19:17:37 | codevance[m] | It's also not trying to be a dynamically typed language. |
19:17:39 | FromGitter | <ephja> very few languages are trying to compete with some of Rusts features |
19:18:02 | PMunch | codevance[m], you can always look at the changelog file |
19:18:14 | PMunch | If you want a list of what has changed since the last release |
19:18:34 | codevance[m] | SIMD looks like its rust's domain |
19:18:43 | codevance[m] | PMunch: the changelog is massive |
19:19:01 | codevance[m] | I follow the development. Things get added everyday |
19:19:07 | codevance[m] | I wish there was a dev document |
19:19:19 | codevance[m] | and also a "diff" for the doc |
19:19:21 | FromGitter | <rayman22201> Where Nim is weak is not completely obvious. Especially to new people trying the language. Also, just because Nim is weak in an area doesn't mean it shouldn't try to improve there |
19:19:25 | FromGitter | <ephja> in other words, performance. that's what you use SIMD for |
19:19:36 | codevance[m] | PMunch: what changelog file? |
19:19:37 | FromGitter | <rayman22201> but perf is something Nim is supposed to be strong in |
19:19:48 | FromGitter | <ephja> yes |
19:20:04 | FromGitter | <rayman22201> Therefore SIMD should be something we care about. |
19:20:25 | PMunch | codevance[m], this one: https://github.com/nim-lang/Nim/blob/devel/changelog.md |
19:21:47 | codevance[m] | PMunch: that's new |
19:22:22 | Yardanico | codevance[m], not really |
19:22:39 | Yardanico | codevance[m], well, it's relatively new, but first version with new changelog.md came with 0.18.0 :) |
19:22:45 | federico3 | PMunch: it's a call to socket(AF_UNIX, SOCK_STREAM, 0) (the syscall I mean) to create the socket and then bind() |
19:23:00 | PMunch | Yeah I know how to do it in C |
19:23:01 | codevance[m] | let me put it this way. its not in the release folder |
19:23:17 | PMunch | But for Nim it seems like I basically have to do it in the exact same way |
19:23:19 | federico3 | PMunch: I'm looking for the call to bind(..) in Nim |
19:23:33 | PMunch | Which means fumbling around with pointers and such |
19:23:52 | FromGitter | <rayman22201> Unfortunately I don't think Nim has a high level wrapper for Sockets atm |
19:24:20 | Yardanico | https://nim-lang.org/docs/net.html ? :) |
19:24:25 | Yardanico | "This module implements a high-level cross-platform sockets interface." |
19:24:39 | federico3 | a 2-3 lines wrapper around bindSocket |
19:25:02 | codevance[m] | rayman I'm not sure that Jack Mott is abandoning nim. It seems he's writing a lib for various langs |
19:25:12 | federico3 | Yardanico: it should belong to posix.nim |
19:25:21 | Yardanico | federico3, but sockets are cross-platform |
19:25:28 | FromGitter | <rayman22201> lol. Yeah. I just found net module too. oops |
19:25:32 | FromGitter | <rayman22201> need better search |
19:25:44 | federico3 | Yardanico: not an "unix domain socket" :) |
19:25:50 | Yardanico | oh, sorry |
19:26:05 | federico3 | it's also not net-related, it's local :) |
19:26:35 | PMunch | Yeah I tried to use net |
19:26:54 | PMunch | But it throws an error on the accept call |
19:27:05 | PMunch | Something about not recognizing the family |
19:27:22 | FromGitter | <rayman22201> https://github.com/nim-lang/Nim/issues/3320 |
19:27:24 | FromGitter | <rayman22201> ? |
19:27:31 | federico3 | PMunch: if you strace it you should see bind(3, {sa_family=AF_UNIX, sun_path="/tmp/somesocket2"}, 18) |
19:27:52 | PMunch | Oh, dinner is here. I'll look more into it later |
19:28:09 | PMunch | Yeah I got the bind working |
19:28:24 | * | Ven`` quit (Read error: Connection reset by peer) |
19:28:33 | PMunch | But when you accept a connection the accept call fails |
19:28:44 | federico3 | PMunch: IMO it's worth submitting a tiny wrapper into posix.nim |
19:32:33 | * | brainproxy joined #nim |
19:40:41 | * | riidom_ is now known as riidom |
19:41:14 | Yardanico | https://github.com/jackmott/nim_simd/commit/7c4e68ff37d34032b90b2a6f3e9075abca12d551#commitcomment-29555291 |
19:44:02 | FromGitter | <rayman22201> :-P Was just about to post it |
19:44:18 | FromGitter | <rayman22201> thanks @yrsdi |
19:44:24 | FromGitter | <rayman22201> @Yardanico even |
19:44:38 | FromGitter | <rayman22201> lol.... bad autocomplete |
19:44:38 | Yardanico | @rayman22201 I'm fast at github notifications :D |
19:47:17 | FromGitter | <rayman22201> I really want to sell my Mac. I am not happy with the direction OSX has been going and Apple as a company, but all the Mac issues in Nim land make me tempted to keep it around... |
19:48:03 | Yardanico | I had no issues with nim on hackintosh :D |
19:48:33 | FromGitter | <rayman22201> lol |
19:50:28 | * | yglukhov[i] joined #nim |
19:54:45 | * | brainproxy quit (Ping timeout: 260 seconds) |
20:01:15 | * | fjvallarino quit (Remote host closed the connection) |
20:02:09 | * | yglukhov[i] quit (Ping timeout: 248 seconds) |
20:07:33 | * | skrylar joined #nim |
20:07:40 | codevance[m] | Can nim devel be used for development |
20:07:49 | codevance[m] | ? |
20:10:18 | FromGitter | <ephja> yes. bootstrapping rarely breaks |
20:12:28 | FromGitter | <ephja> that's not the only potential issue, but it usually works fine for me, and people often test their libs on recent development versions since we're not at 1.x yet and for various other reasons |
20:13:38 | FromGitter | <ephja> use the latest release instead if you want and then try to upgrade if you run into lib incompatibilities or need specific fixes |
20:17:58 | Yardanico | codevance[m], yes of course |
20:18:33 | Yardanico | also by using devel version you'll potentially find any third-party nim libs which are incompatible with devel and maybe fix them :P |
20:19:40 | codevance[m] | So its a forwards first approach |
20:20:33 | codevance[m] | ok thanks |
20:23:50 | * | yglukhov[i] joined #nim |
20:25:19 | * | brainproxy joined #nim |
20:26:28 | FromGitter | <rayman22201> IDK if it should be in the std lib but Jack Mott's suggestion to implement CPU feature detection does sound like a good idea... |
20:28:07 | * | yglukhov_ joined #nim |
20:28:07 | * | yglukhov[i] quit (Read error: Connection reset by peer) |
20:31:46 | skrylar | the library selection could be better |
20:31:52 | skrylar | but it does work |
20:32:04 | FromGitter | <kayabaNerve> I agree Yardanico. That's not my issue. |
20:32:42 | FromGitter | <kayabaNerve> My issue is compiler compatibility and the idea behind it. |
20:33:02 | FromGitter | <kayabaNerve> I want a single version. The end. I'll upgrade to the newest stable, but devel is devel. |
20:33:16 | FromGitter | <kayabaNerve> It's constantly needing updates to stay updated. |
20:33:40 | skrylar | are you using bleeding edge nimble packages? |
20:34:02 | skrylar | i don't have issues with using only the latest stable, although i pick dependencies carefully |
20:36:04 | codevance[m] | kayabaNerve have you tried installing the release version's compiler? |
20:37:14 | FromGitter | <kayabaNerve> I'm on 0.18.0 |
20:37:33 | FromGitter | <kayabaNerve> This package has no dependencies and is mature |
20:37:56 | FromGitter | <kayabaNerve> Last commit 8 days ago though |
20:38:04 | FromGitter | <kayabaNerve> But is existed for at least a few months |
20:42:27 | skrylar | then whats the problem |
20:43:50 | FromGitter | <kayabaNerve> Fair enough. |
20:44:09 | FromGitter | <kayabaNerve> It wouldn't be a problem if they also developed on stable |
20:48:25 | * | brainproxy quit (Ping timeout: 260 seconds) |
20:50:23 | * | Trustable joined #nim |
20:50:42 | FromGitter | <tim-st> when my binary needs `-d:ssl` or other `-d` can I define them in my source code so passing wont be needed? |
20:51:14 | FromGitter | <tim-st> if not, what is the idea to disallow it? |
20:54:08 | FromDiscord | <Epictek> I have a noob question |
20:54:40 | FromGitter | <kayabaNerve> If I already have Nim, to compile the compiler, do I have to all the steps or can I use my existing Koch? |
20:55:28 | FromGitter | <tim-st> just recompile koch, takes 30 seconds |
20:55:30 | FromDiscord | <Epictek> I want to write a wrapper around a web API that I can use with both the JS backend and the standard C backend, Is this possible? Just wanting to be able to write the code once |
20:56:05 | shashlick | tim-st: you can use nim.cfg or appname.cfg for the -d:ssl |
20:56:25 | shashlick | There used to be a define pragma, hoping araq brings it back |
20:56:26 | * | yglukhov_ quit (Read error: Connection reset by peer) |
20:56:29 | FromGitter | <tim-st> shashlick: thx, but then it's global? for all projects? |
20:56:48 | shashlick | No keep it in the app local directory |
20:56:56 | shashlick | With just that one line |
20:57:11 | FromGitter | <tim-st> ok, thanks! pragma would be better though, only passl is available for c compiler |
20:57:41 | shashlick | Yep I've requested araq a few days ago for nimpcre which needs the same |
20:57:49 | FromGitter | <tim-st> nice |
20:58:03 | FromGitter | <tim-st> Epictek: I don't think that's a noob question |
20:58:55 | shashlick | Epictek: should be possible, I've never done it and have no examples but should be feasible |
21:00:04 | FromGitter | <tim-st> for example using ssl like "https.." always requires `-d:ssl`, if I dont set it, it doesnt work. So I dont understand why it isnt set by default |
21:01:01 | FromGitter | <tim-st> ok, maybe this can be done when the pragma exists |
21:01:36 | FromGitter | <tim-st> This even motivated me to use python again for network |
21:01:47 | FromGitter | <tim-st> the `requests` package works just as I want it |
21:03:13 | FromDiscord | <Epictek> shashlick: yeah I'm strugling to find any example with karax. Best I found was nimforum |
21:03:19 | FromDiscord | <Epictek> shashlick: yeah I'm strugling to find any examples with karax. Best I found was nimforum |
21:05:00 | shashlick | Are you not able to set nim.cfg? |
21:05:01 | * | jmott joined #nim |
21:05:22 | shashlick | This way you have an option to depend on the huge ssl lib |
21:06:01 | FromDiscord | <Epictek> Yeah I thought the point of Nim was to only include what is actually needed... |
21:06:28 | jmott | hello. first time hear, I heard people were talking about the nim_simd github repo and just hoppped in, in case anyone had any questions |
21:06:34 | jmott | first time here* |
21:06:55 | shashlick | Epictek have you tried just generating js and c and see if it works? |
21:07:09 | shashlick | Welcome jmott |
21:08:28 | FromGitter | <kayabaNerve> I can't recompile Koch. Can't open `os`. |
21:11:20 | FromDiscord | <Epictek> shashlick: well I'm strugling to figure out what libary I should use to make requests with JS, httpclient only works with C. Karax has kajax but there doesn't seem to be a libary that just lets me reuse the same http code for the both C and JS. |
21:11:44 | * | dgwana joined #nim |
21:11:52 | * | miran quit (Ping timeout: 245 seconds) |
21:13:29 | FromGitter | <ephja> does nimLoadLibrary leak 32 bytes or is a false positive even with the suppression file for valgrind? :p |
21:14:50 | PMunch | federico3, agreed |
21:14:53 | FromGitter | <ephja> so many entries for libpulse.. |
21:15:58 | PMunch | ephja, nimLoadLibrary? |
21:17:15 | * | yglukhov[i] joined #nim |
21:17:33 | FromGitter | <ephja> for dynamic linking. it shows a leak in dlopen. who cares about 32 bytes though but I'm just messing around with valgrind again |
21:18:41 | * | yglukhov[i] quit (Read error: Connection reset by peer) |
21:19:08 | PMunch | Yeah but what is nimLoadLibrary? |
21:19:16 | PMunch | I can't find it in the dynload module |
21:19:37 | * | brainproxy joined #nim |
21:20:06 | PMunch | s/dynload/dynlib |
21:20:35 | * | yglukhov[i] joined #nim |
21:23:49 | * | NimBot joined #nim |
21:24:29 | * | fjvallarino joined #nim |
21:24:57 | FromGitter | <kayabaNerve> Any idea how to compile Nim devel when I have this error? `koch.nim(24, 3) Error: cannot open 'os'` |
21:25:46 | FromGitter | <ephja> PMunch: system/cgprocs.nim |
21:26:29 | FromGitter | <ephja> I don't see any calls to nimUnloadLibrary |
21:30:25 | * | dgwana quit (Read error: Connection reset by peer) |
21:39:01 | FromGitter | <rayman22201> Hi @jmott. I think the convo over your library has died for now, but thanks for showing up. :-) |
21:41:17 | * | Vladar quit (Quit: Leaving) |
21:42:33 | * | brainproxy quit (Ping timeout: 256 seconds) |
21:58:54 | * | yglukhov[i] quit (Remote host closed the connection) |
22:07:43 | codevance[m] | Why does autocomplete just die |
22:09:41 | Yardanico | codevance[m], because nimsuggest uses compiler for autocompletion, and on the code which results in a compiler crash nimsuggest will crash too |
22:09:59 | Yardanico | and also there may be some memory leaks in the nimsuggest |
22:10:15 | * | elrood quit (Quit: Leaving) |
22:10:38 | codevance[m] | Is there a fix yet? |
22:10:39 | codevance[m] | I'm using vscode |
22:10:51 | Yardanico | codevance[m], well, if nimsuggest hangs - kill it |
22:10:55 | Yardanico | otherwise - you can reload vscode :P |
22:11:27 | * | brainproxy joined #nim |
22:11:46 | codevance[m] | Yeah. But it'd be amazing to not haveta do such |
22:13:12 | codevance[m] | oh well |
22:13:27 | * | fjvallarino quit (Remote host closed the connection) |
22:13:33 | * | fjvallarino joined #nim |
22:16:22 | * | Trustable quit (Remote host closed the connection) |
22:34:41 | * | brainproxy quit (Ping timeout: 256 seconds) |
22:35:26 | zacharycarter | anyone have any idea why I'd be getting this error on OpenBSD when building nimble via ./koch nim after installing Nim from source? |
22:36:03 | zacharycarter | ```cannot open file compiler/ast``` |
22:37:03 | FromGitter | <Araq> what's "installing Nim from source"? |
22:40:16 | * | zacharycarter sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/kwkTpeOvlMmoxBCeRDCnrBab > |
22:42:41 | zacharycarter | I'll try w/ choosenim |
22:43:44 | * | PMunch quit (Remote host closed the connection) |
22:44:09 | * | PMunch joined #nim |
22:44:37 | zacharycarter | no bsd support doh |
22:47:35 | zacharycarter | going to try this again |
22:48:19 | * | craigger quit (Quit: bye) |
22:48:31 | * | craigger joined #nim |
22:52:41 | * | rockcavera quit (Remote host closed the connection) |
22:56:19 | * | fjvallarino quit (Remote host closed the connection) |
22:57:19 | * | Ven`` joined #nim |
22:58:30 | zacharycarter | https://gist.github.com/zacharycarter/4f3ab2336df2e41c1bce5c63ed73ecba |
22:58:47 | zacharycarter | those are the errors I get when running ./koch tools or ./koch nimble |
22:59:23 | * | rockcavera joined #nim |
23:03:42 | * | brainproxy joined #nim |
23:05:42 | dvn | having a curious problem after installing nix via guix package manager |
23:06:11 | dvn | when i try to run "nim c" on anything i get the following error: |
23:06:12 | dvn | Error: invocation of external compiler program failed. No such file or directory |
23:06:14 | dvn | Additional info: Could not find command: '/gnu/st'. OS error: No such file or directory 2 |
23:06:47 | * | user1101 joined #nim |
23:08:04 | dvn | nix is truncating the path there, because with guix, gcc is located in /gnu/store/<hash>-gcc/bin/gcc |
23:09:34 | * | Ven`` quit (Ping timeout: 256 seconds) |
23:12:02 | dvn | this is a problem with the guix package definition, not nim, however i'm wondering if i'm correct in my assumption that nim does not want to be fed the full path to the gcc compiler, and instead just wants to run the command without path (just "gcc") |
23:12:57 | * | zahary joined #nim |
23:17:35 | * | find0x90 quit (Quit: find0x90) |
23:19:49 | * | jmott quit (Quit: Leaving) |
23:20:09 | FromGitter | <Araq> nim doesnt care |
23:21:09 | dvn | so is the path just getting truncated in the error message then? |
23:21:40 | dvn | i cannot get nim to show me the full path even with the --listfullpaths flag |
23:21:46 | * | find0x90 joined #nim |
23:22:05 | dvn | er.. tired... sorry. you were not respoinding to me |
23:23:16 | * | find0x90 quit (Client Quit) |
23:38:06 | * | zahary quit (Quit: Leaving.) |
23:39:12 | * | zahary joined #nim |
23:39:20 | * | zahary quit (Client Quit) |
23:54:27 | codevance[m] | Is there some way to limit using |