00:02:17 | couven92 | nope didn't work either |
00:04:09 | dom96 | TjYoco: you can run with the --debug flag and see what nimble executes |
00:04:59 | FromGitter | <superfunc> dom96: I'd be happy to add tests to that PR, but wont have time till this weekend |
00:05:19 | FromGitter | <superfunc> I could do them in a separate PR, whatever you prefer |
00:05:38 | TjYoco | dom96 I just made PR on GitHub, so I probably shouldn't run it again right? |
00:17:30 | Araq | couven92: sorry, I'm out of ideas |
00:18:04 | couven92 | yeah... me too, I'll try to hack it manually in the weekend |
00:18:47 | * | jsgrant joined #nim |
00:31:47 | * | chemist69 quit (Ping timeout: 246 seconds) |
00:34:52 | * | chemist69 joined #nim |
00:38:26 | * | TjYoco quit (Quit: Leaving) |
00:44:52 | * | couven92 quit (Quit: Client Disconnecting) |
00:56:05 | * | jsgrant quit (Quit: jsgrant) |
00:56:26 | * | jsgrant joined #nim |
01:01:02 | * | jsgrant quit (Client Quit) |
01:01:24 | * | jsgrant joined #nim |
01:06:05 | * | chemist69 quit (Ping timeout: 246 seconds) |
01:10:48 | * | SusWombat quit (Remote host closed the connection) |
01:12:58 | * | SusWombat joined #nim |
01:18:28 | * | pilne joined #nim |
01:20:00 | * | chemist69 joined #nim |
01:57:19 | * | dddddd quit (Remote host closed the connection) |
02:01:45 | * | ipjk_ joined #nim |
02:02:46 | * | chemist69 quit (Ping timeout: 264 seconds) |
02:04:15 | * | ipjk quit (Ping timeout: 248 seconds) |
02:07:17 | * | yglukhov joined #nim |
02:08:55 | * | vendethiel- joined #nim |
02:10:28 | * | Ven`` quit (Ping timeout: 240 seconds) |
02:11:21 | * | yglukhov quit (Ping timeout: 240 seconds) |
02:15:59 | * | chemist69 joined #nim |
02:20:49 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
02:27:33 | * | vlad1777d quit (Remote host closed the connection) |
02:32:02 | * | endragor joined #nim |
02:35:35 | * | relax joined #nim |
02:49:59 | FromGitter | <adamrezich> here's a weird question: why does this compile, but output nothing? https://play.nim-lang.org/?gist=46e9a15ddbdbd3cb881ba640ace84832 |
02:52:06 | FromGitter | <adamrezich> and if you remove the `[]`s and change the `var`s in the methods to `ptr`s, it does the same thing |
02:52:54 | FromGitter | <adamrezich> ( https://play.nim-lang.org/?gist=980448bcf2c1b6a77479319aca168645 ) |
02:55:06 | FromGitter | <adamrezich> it seems like it should either call one of the two methods, or else fail to compile because it couldn't figure it out, or something |
03:32:56 | * | mahmudov joined #nim |
03:51:56 | * | pilne quit (Quit: Quitting!) |
04:09:05 | * | yglukhov joined #nim |
04:13:21 | * | yglukhov quit (Ping timeout: 240 seconds) |
04:51:49 | * | mahmudov quit (Remote host closed the connection) |
05:02:05 | * | relax quit (Ping timeout: 240 seconds) |
05:04:50 | * | Ven`` joined #nim |
05:05:35 | * | vendethiel- quit (Ping timeout: 240 seconds) |
06:08:51 | * | yglukhov joined #nim |
06:12:37 | * | nsf joined #nim |
06:13:21 | * | yglukhov quit (Ping timeout: 248 seconds) |
06:26:44 | FromGitter | <Grabli66> Cant find FutureStream in documentation https://nim-lang.org/docs/lib.html |
06:38:08 | * | gokr joined #nim |
06:41:07 | FromGitter | <Varriount> @adamrezich I would file a bug report, however keep in mind that `ptr` is unsafe |
06:41:34 | FromGitter | <Varriount> I would consider what that about does to be undefined behavior. |
06:41:46 | FromGitter | <Varriount> *that snippet |
06:41:54 | Araq | I think it's not a bug, what you're doing is wrong |
06:42:14 | Araq | look at the produced C code and it will make sense |
06:44:02 | * | PMunch joined #nim |
06:47:06 | FromGitter | <Varriount> @Grabli66 It appears the AsyncStreams module doesn't have it's documentation in the index. Could you file a bug? |
06:49:07 | * | BigEpsilon joined #nim |
06:49:47 | FromGitter | <Grabli66> Ok |
06:53:19 | FromGitter | <BigEpsilon> @Araq , What do you think about adding this to c2nim: when a new function is parsed, check if its name is in p.options.classes, and if it is, replace it by the constructor. Does it make sens or do I keep it external to c2nim ? |
06:53:57 | Araq | how can the constructor not be in its class? |
06:54:29 | FromGitter | <BigEpsilon> not in its classe, but an arleady seen class |
06:54:45 | FromGitter | <BigEpsilon> oh options classes may not be what I think |
06:55:10 | FromGitter | <BigEpsilon> I'm talking about function call sry |
06:55:14 | FromGitter | <BigEpsilon> not definition |
06:55:51 | FromGitter | <BigEpsilon> the most important use case if for default function parameter values |
06:56:17 | FromGitter | <BigEpsilon> like bar(a: foo = foo(0)) |
06:56:46 | FromGitter | <BigEpsilon> where we'd like to have bar(a:foo=constructFoo(0)) |
06:57:32 | * | endragor quit (Remote host closed the connection) |
06:58:58 | * | Vladar joined #nim |
06:59:14 | * | endragor joined #nim |
07:04:58 | Araq | ah ok |
07:05:17 | Araq | sounds good to me |
07:08:32 | * | solitudesf joined #nim |
07:25:14 | FromGitter | <BigEpsilon> Ok I'll try to implement it this weekend |
07:26:09 | * | yglukhov joined #nim |
07:49:00 | FromGitter | <BigEpsilon> then add support for nested classes/structs |
07:49:30 | * | ShalokShalom quit (Ping timeout: 252 seconds) |
07:55:25 | Araq | :-) |
08:00:27 | * | ShalokShalom joined #nim |
08:09:50 | * | Trustable joined #nim |
08:13:13 | * | Arrrr joined #nim |
08:13:13 | * | Arrrr quit (Changing host) |
08:13:13 | * | Arrrr joined #nim |
08:20:57 | * | chaosdav quit (Ping timeout: 260 seconds) |
08:24:36 | * | dddddd joined #nim |
08:37:06 | * | adeohluwa joined #nim |
08:38:23 | * | mahsav joined #nim |
08:38:52 | * | chaosdav joined #nim |
08:39:09 | adeohluwa | hello guyz |
08:39:17 | adeohluwa | bn a minute tho |
08:40:01 | adeohluwa | I'm trying to write a scraper that will make a couple of concurrent requests |
08:40:22 | adeohluwa | what's the best option for dead easy concurrency in nim? |
08:40:47 | * | mahsav2 quit (Ping timeout: 260 seconds) |
08:46:51 | adeohluwa | also a way to specify how many concurrent requests @ a time |
08:55:13 | yglukhov | adeohluwa: for i in 0 ..< numberOfConcurrentRequests: asyncCheck runSrcapper() |
08:56:23 | yglukhov | note that this is a single thread solution. for multithread, use spawn instead of asyncCheck |
09:00:47 | adeohluwa | awesome , thanks a bunch |
09:00:49 | * | PMunch quit (Ping timeout: 248 seconds) |
09:01:16 | adeohluwa | yglukhov: will go try it out & give feedback |
09:02:23 | * | Yardanico joined #nim |
09:08:22 | * | PMunch joined #nim |
09:14:14 | * | dom96|w joined #nim |
09:14:26 | * | Yardanico quit (Remote host closed the connection) |
09:14:45 | FromGitter | <Bennyelg> Any reason why we always need to change string to SqlQuery type ? |
09:15:55 | FromGitter | <Bennyelg> I wondering If I need mimic some behaviors from the regular db_* connector to my library. ⏎ for example from connect, change to open, ⏎ for regular string statement, to SqlQuery |
09:15:57 | FromGitter | <Bennyelg> etc |
09:20:01 | * | endragor quit (Remote host closed the connection) |
09:21:35 | * | endragor joined #nim |
09:33:12 | * | vlad1777d joined #nim |
09:34:26 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
09:36:33 | Araq | Bennyelg: to prevent SQL injections. |
09:36:33 | FromGitter | <Bennyelg> if x not in ('x', 'y') |
09:36:44 | FromGitter | <Bennyelg> not work in nim ? |
09:36:55 | Araq | if x notin ... |
09:37:02 | FromGitter | <Bennyelg> @Araq thanks, Where is the definition of SqlQuery |
09:37:07 | FromGitter | <Bennyelg> I would like to see it |
09:37:07 | Araq | there are no 2 token operators in Nim (thank goo) |
09:37:25 | Araq | you're supposed to use sql"select * from ..." |
09:37:42 | Araq | not to convert it to SqlQuery, jezz the docs are full of examples |
09:38:16 | FromGitter | <Bennyelg> I saw the docs But I didnt find the sqlQuery definition |
09:38:19 | FromGitter | <Bennyelg> Just the usage |
09:39:50 | Araq | it's a 'distinct string' |
09:40:20 | FromGitter | <Bennyelg> Oh ok, now I'll check what is the definition of distinct string :| except it's distinct |
09:41:59 | FromGitter | <Bennyelg> @Arak, thanks for the help, ⏎ Another question, how can I simulate 'ping' to an address and see if I get a response |
09:42:02 | * | dom96|w joined #nim |
09:42:55 | * | couven92 joined #nim |
09:51:25 | * | renarc quit (Ping timeout: 240 seconds) |
10:06:30 | FromGitter | <Grabli66> How i can do something like this "let d : int = await spawn myProc()" ? |
10:08:36 | * | renarc joined #nim |
10:08:46 | * | ShalokShalom quit (Read error: Connection reset by peer) |
10:13:18 | * | mahsav2 joined #nim |
10:15:15 | * | mahsav quit (Ping timeout: 252 seconds) |
10:23:15 | * | couven92 quit (Quit: Client disconnecting) |
10:29:02 | * | PMunch_ joined #nim |
10:29:06 | * | PMunch_ quit (Remote host closed the connection) |
10:29:11 | * | PMunch quit (Read error: Connection reset by peer) |
10:29:17 | * | PMunch_ joined #nim |
10:29:34 | FromGitter | <Bennyelg> how to change nimble package name ? |
10:29:41 | * | rokups joined #nim |
10:30:34 | * | PMunch_ quit (Client Quit) |
10:30:50 | * | PMunch joined #nim |
10:37:23 | Araq | that requires a manual PR I think |
10:37:50 | Araq | grabli66: er, not sure |
10:42:15 | euantor | Bennyelg see here: https://github.com/nim-lang/packages#renaming-packages |
10:44:33 | * | ShalokShalom joined #nim |
10:48:43 | * | Trustable quit (Remote host closed the connection) |
11:01:52 | FromGitter | <Grabli66> Araq, maybe you know a best way to interact with .NET assembly from Nim? |
11:02:17 | Araq | sockets? |
11:02:51 | Araq | NET is a VM, it interacts with everything in a bad way |
11:06:05 | euantor | Either sockets or a named pipe if you're maning to do IPC |
11:11:21 | FromGitter | <Grabli66> Araq, i think about sockets, named pipes shared memory. Cause i dont know anything else. :) |
11:11:56 | FromGitter | <Grabli66> And i want fastest way |
11:12:33 | yglukhov | Grabli66: i think shared mem is always the fastest way, but the trickiest to get right. |
11:13:37 | FromGitter | <Grabli66> yglukhov, i also think it's better way. |
11:14:20 | yglukhov | whats your use case? |
11:15:22 | yglukhov | unless its some realtime video rendering-streaming shared mem sounds like an overkill |
11:15:28 | FromGitter | <Grabli66> I want a database core written in nim. And want a possibility to write stored procedures in C#, maybe Java :) |
11:16:14 | yglukhov | that doesnt sound like IPC |
11:16:24 | FromGitter | <Grabli66> Why? |
11:16:42 | yglukhov | i'm guessing you would want to run either JVM or CLR from within your native process. |
11:17:06 | yglukhov | so the CLR/JVM code will run in the same address space |
11:17:17 | FromGitter | <Grabli66> I can run CLR from my process? |
11:17:31 | yglukhov | no idea. JVM - yes. |
11:17:42 | yglukhov | i think it should be possible |
11:17:56 | yglukhov | .NET would be pretty much useless otherwise ;) |
11:18:06 | FromGitter | <Grabli66> Yes, i can run JVM. |
11:18:18 | Araq | expose a C interface and let them write stored procedures in Nim, C, C++, Rust. that's good enough ;-) |
11:19:22 | Araq | or compile the NET/JVM bytecode into native asm instructions you can run, how hard can it be? :D |
11:19:27 | * | Arrrr quit (Ping timeout: 260 seconds) |
11:19:40 | yglukhov | Grabli66: there you go: https://msdn.microsoft.com/en-us/library/9x0wh2z3(VS.90).aspx |
11:19:42 | FromGitter | <Grabli66> Araq, :) |
11:22:41 | yglukhov | "or compile the NET/JVM bytecode into native asm" - easy if you run CLR/JVM, they would JIT it for you =) |
11:22:47 | yglukhov | hopefully... =) |
11:23:14 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
11:24:32 | * | Yardanico joined #nim |
11:26:43 | yglukhov | "expose a C interface" - let's go a bit further. support passing procs to the server as Nim source code, and let the server compile and run it. |
11:27:27 | FromGitter | <Grabli66> yglukhov, thanks, i think host CLR is best solution :) |
11:27:53 | FromGitter | <edubart> how nim seq allocated memory grows? double every time when is out of reserved memory? |
11:27:58 | Araq | yglukhov: yeah but then you have to use some overly complex "hosting" API that can take weeks and months to figure out |
11:28:21 | Araq | edubart: the factor is 1.5 like compsci tells us |
11:30:07 | Araq | yglukhov: ah good I merged this http change -.- |
11:30:12 | Araq | can you revert it please? |
11:30:35 | yglukhov | Araq: that would not help, it was broken before. |
11:33:04 | Araq | ok then, at least it has not gotten worse |
11:34:15 | * | BitPuffin|osx joined #nim |
11:51:48 | * | ShalokShalom_ joined #nim |
11:54:40 | * | ShalokShalom quit (Ping timeout: 248 seconds) |
12:03:43 | * | Snircle joined #nim |
12:03:56 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
12:11:14 | * | Yardanico quit (Remote host closed the connection) |
12:13:37 | * | Yardanico joined #nim |
12:15:34 | FromGitter | <edubart> what is the proper way to add data from C pointer "data", with length "size" into a seq[uint8] named "buffer" ? |
12:33:35 | Yardanico | subsetpark, https://github.com/nim-lang/Nim/issues/6379 is fixed now :) |
12:35:42 | FromGitter | <edubart> I did use ⏎ var tmp = newStringStream(); tmp.writeData(data, size); return castseq[uint8 (toSeq(buffer.data.items)); ⏎ however I'm doing an additional by using stringstream, how to simplify? |
12:36:23 | PMunch | edubart: for i in 0..len: buffer[i] = cast[array[0..int.high,uint8]](data) |
12:36:35 | PMunch | Something like that should work |
12:38:09 | PMunch | The cast could of course be done earlier. ie. "let cArray = cast[array[0..int.high, uint8]](data)" then "for i in 0..len: buffer[i] = cArray[i]" |
12:38:27 | PMunch | And you probably want to initialize your seq to the size of the array before the loop |
12:40:12 | FromGitter | <edubart> hmm ok, I thought it could have a shortcut without doing for loops, but I will try that way |
12:41:30 | Araq | just write the data |
12:41:49 | * | madmalik joined #nim |
12:41:58 | Araq | tmp.writeData(unsafeAddr(buffer.data[0]), buffer.data.len) |
12:42:21 | PMunch | Well, another suggestion I found was to create a new type. So "type Carray = object; size: int, data: array[0..int.high, uint8]" and then simply implement [] and []= for it |
12:42:37 | FromGitter | <edubart> and is there a method to grow the seq (without initializing) before writing it? |
12:42:49 | Araq | PMunch: your cast to an 'array' is horrible and will stop to work soon enough |
12:42:55 | Araq | arrays are not pointers in Nim. |
12:43:12 | Araq | newSeqOfCap()? |
12:43:14 | PMunch | You were the one who first showed me how to do that Araq :P |
12:43:30 | Araq | pretty sure I showed it correctly |
12:43:34 | FromGitter | <edubart> for a seq that is already initialized |
12:43:43 | Araq | the idea mutated in your head |
12:44:09 | Araq | edubart: there is only setLen() then |
12:44:25 | Araq | we don't have a setCap() yet :-) |
12:44:54 | PMunch | Wait, what's the right way of doing it? |
12:45:04 | Araq | proc setCap(s, cap) = let old = s.len; setLen(s, cap); setLen(s, old) |
12:45:24 | FromGitter | <edubart> I think it would be useful if sequtils had a method to grow the capacity and also to have something like writeData from StringStream |
12:45:27 | PMunch | I remember you did a cast to an infinate size container |
12:45:30 | Araq | PMunch: cast to a *ptr* to an array |
12:45:41 | PMunch | Oh right |
12:46:19 | Araq | edubart: what's the use case? |
12:46:22 | FromGitter | <Bennyelg> So In-order to change my package name I need to pull request with modification of the https://github.com/nim-lang/packages/blob/master/packages.json file ? |
12:46:55 | Yardanico | yes |
12:47:26 | FromGitter | <edubart> my use case is that I am binding a C library where I need to copy memory from a loading method to nim seq[uint8] |
12:48:16 | * | dom96|w joined #nim |
12:48:37 | Araq | that's easily covered by setLen. |
12:48:37 | FromGitter | <edubart> so if there was writeData(pointer, size) in seq life would be easier for C bindings like this |
12:48:40 | Yardanico | Araq, btw, about pegs at compile-time: it throws an error like "lib/pure/pegs.nim(1217, 13) Error: attempt to access a nil address" now |
12:49:41 | Yardanico | 1217 is "case buf[pos]" |
12:49:49 | Yardanico | so it throws an error on buf[pos] |
12:49:53 | PMunch | Yeah I think the use-case C array to seq is common enough that this should exist as a library function |
12:53:44 | Araq | Yardanico: fix it? :-) |
12:53:56 | Yardanico | Araq, it's not clear why it throws an error like this |
12:53:57 | Araq | looked hard the last time |
12:54:00 | Yardanico | :D |
12:54:05 | Yardanico | then I shouldn't even try :P |
12:54:08 | Araq | it's VM bug (obviously) |
12:54:29 | Araq | I changed the 'buf: cstring' to 'buf: string' and got the same result |
12:54:36 | Yardanico | yeah |
12:55:03 | Araq | btw whoever wrote json.getStr was a genius |
12:55:34 | Araq | default values seem much better than exceptions in this case |
12:55:46 | Araq | this way the server doesn't crash and continues to serve |
13:02:18 | FromGitter | <Bennyelg> Improvements :D ⏎ https://github.com/Bennyelg/nimPresto |
13:03:02 | Yardanico | can you edit images a bit ? :) |
13:03:17 | FromGitter | <Bennyelg> ? |
13:03:19 | Yardanico | presto image is low-res |
13:03:27 | Yardanico | you can make both images smaller :) |
13:03:41 | FromGitter | <Bennyelg> I am a shitty designer |
13:03:52 | Yardanico | ok, first suggestion on code: |
13:03:55 | FromGitter | <Bennyelg> I'll be happy if someone can assist with that |
13:04:02 | Yardanico | don't use multiple "type" sections, you can put all your types into one |
13:04:06 | FromGitter | <edubart> ```code paste, see link``` ⏎ ⏎ my solution was that, what about having this in sequtils? I can make PR [https://gitter.im/nim-lang/Nim?at=59bbcfc6bc46472974390eb5] |
13:04:25 | Yardanico | e.g. type section can have more than 1 type definition |
13:04:26 | * | xet7 joined #nim |
13:04:34 | FromGitter | <Bennyelg> oh correct |
13:07:09 | Yardanico | about if client.get(url).status != "200 OK": -- it's better to use Http200 |
13:07:41 | FromGitter | <Bennyelg> mm inside the client call? |
13:11:14 | dom96|w | Araq: can't tell if that's sarcasm or not (regarding json.getStr) |
13:20:31 | * | TjYoco joined #nim |
13:25:50 | Araq | no sarcasm |
13:28:27 | Yardanico | Bennyelg: how can I test if my changed version of your package works? |
13:28:46 | Yardanico | do I need to run presto locally, or there's some test databases which are available online? |
13:29:10 | FromGitter | <Bennyelg> this is the problem, you will need a connection to presto database |
13:29:27 | * | arnetheduck joined #nim |
13:29:32 | FromGitter | <Bennyelg> I guess you can try run one locally with 1 node, but you will also need a catalog to stored the data into |
13:29:36 | FromGitter | <Bennyelg> it's just a sql-engine |
13:29:55 | FromGitter | <Bennyelg> this engine is separate the storage from the computation |
13:29:59 | FromGitter | <Bennyelg> great for big data |
13:30:29 | FromGitter | <Bennyelg> you can provide me a pull request and I'll test it :D |
13:30:37 | yglukhov | dom96: hey |
13:31:15 | Yardanico | Bennyelg: ok |
13:31:30 | yglukhov | dom96|w: what do you think of https://github.com/nim-lang/nimble/pull/404? |
13:31:41 | FromGitter | <Bennyelg> |
13:32:38 | Yardanico | yglukhov, http not found |
13:33:24 | yglukhov | Yardanico: which one? |
13:33:33 | Yardanico | yglukhov, I mean your PR id is 404 :P |
13:33:45 | yglukhov | ah, right =) |
13:34:06 | yglukhov | i've got 400 as well =) |
13:34:56 | Yardanico | Araq, "proc `==`(x, y: ptr int): bool {.error.}" from manual doesn't work |
13:35:06 | Yardanico | e.g. it still requires you to write some implementation |
13:35:19 | Yardanico | like "proc `==`(x, y: ptr int): bool {.error.} = true" |
13:35:43 | Araq | hmm |
13:35:50 | Yardanico | latest devel |
13:36:35 | * | PMunch quit (Quit: Leaving) |
13:37:50 | Yardanico | Bennyelg: I'm doing smaaal changes to your lib |
13:40:54 | * | endragor quit (Remote host closed the connection) |
13:40:56 | * | relax joined #nim |
13:42:57 | FromGitter | <Bennyelg> Ok :D |
13:43:19 | FromGitter | <Bennyelg> community help is always blessed. |
13:44:19 | Yardanico | Bennyelg: can you try this? https://gist.github.com/Yardanico/1bc941a8300c3095eb6c5308a9e2d1b7 |
13:44:24 | Yardanico | e.g. check if it works :) |
13:44:53 | TjYoco | Are methods basically virtual procs? |
13:46:11 | * | endragor joined #nim |
13:47:11 | * | Yardanico left #nim ("Quit") |
13:47:17 | * | Yardanico joined #nim |
13:50:57 | * | endragor quit (Ping timeout: 248 seconds) |
13:57:22 | FromGitter | <Bennyelg> @Yardanico ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59bbdc42bc46472974396100] |
13:57:28 | FromGitter | <Bennyelg> Im digging to find what is the problem |
13:58:06 | FromGitter | <Yardanico> @Bennyelg do you have any test DB which I can connect to? |
13:58:11 | * | endragor joined #nim |
13:59:23 | * | nsf quit (Quit: WeeChat 1.9) |
13:59:27 | FromGitter | <Bennyelg> @Yardanico hehe No Im testing on my work Database in production :| |
13:59:32 | Yardanico | lol |
13:59:37 | FromGitter | <Bennyelg> @Yardanico lol |
14:00:01 | Yardanico | well I changed fetchAll a bit |
14:00:22 | FromGitter | <Bennyelg> I think it's related to the processResponse |
14:00:24 | FromGitter | <Bennyelg> Im checking |
14:00:45 | FromGitter | <Bennyelg> something here ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59bbdd0c1081499f1f35bea7] |
14:01:24 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
14:02:01 | FromGitter | <Bennyelg> @Yardanico Because I checked also the fetchOne, fetchMany they all failed there , something probably about the newSeq allocation |
14:02:21 | * | endragor quit (Ping timeout: 240 seconds) |
14:02:35 | FromGitter | <Grabli66> How i can use async procedures in iterator? Do i need use "waitFor" for async procedures? |
14:03:09 | Yardanico | Bennyelg: well I can't help you much without having some DB connection :/ |
14:03:11 | FromGitter | <Bennyelg> @Yardanico The data["data"] |
14:03:31 | Yardanico | it seems presto doesn't even have arch package (or ubuntu one) |
14:03:35 | Yardanico | maybe they have it in docker |
14:03:43 | Yardanico | yeah |
14:04:34 | FromGitter | <Bennyelg> the data["data"].getElems resulting something like |
14:04:43 | FromGitter | <Bennyelg> @[@[]] |
14:04:47 | FromGitter | <Bennyelg> list of lists results |
14:05:37 | Yardanico | ah |
14:05:41 | Yardanico | I probably see the problem |
14:05:57 | FromGitter | <Bennyelg> something related to your for |
14:06:02 | FromGitter | <Bennyelg> cur.resultSet.data[i] = data.mapIt(it.getStr) |
14:06:03 | Yardanico | yeah |
14:06:04 | Yardanico | I know |
14:06:05 | Yardanico | change it |
14:06:12 | Yardanico | to |
14:06:19 | Yardanico | for i in 0..dataset.len: cur.resultSet.data[i] = dataset[i].mapIt(it.getStr) |
14:06:26 | Yardanico | e.g. add "dataset[i]" |
14:06:35 | FromGitter | <Bennyelg> yeah hehe |
14:06:38 | FromGitter | <Bennyelg> I just saw that |
14:08:27 | * | endragor joined #nim |
14:08:31 | FromGitter | <Bennyelg> looks good now, I am testing some corners now |
14:10:06 | Yardanico | be careful :P |
14:10:16 | * | endragor_ joined #nim |
14:10:18 | Yardanico | well I've used newSeq only for an optimization |
14:10:30 | Yardanico | it would be more efficient than adding to seq |
14:10:43 | FromGitter | <Bennyelg> I see that, this is pretty new to me Im still very very newbie |
14:10:51 | Yardanico | also I've used "using", which is an experimental feature |
14:11:06 | FromGitter | <Bennyelg> yea what does it mean exactly |
14:11:18 | Yardanico | e.g. "cur" would be "replaced" by "cur: Cursor" |
14:11:29 | Yardanico | if "cur" is a proc argument |
14:11:38 | FromGitter | <Bennyelg> oh fantastic instead of this: cursor |
14:11:46 | Yardanico | instead of "cur: Cursor" |
14:11:51 | Yardanico | or instead of "this: Cursor" |
14:11:55 | FromGitter | <Bennyelg> yea |
14:12:01 | Yardanico | https://nim-lang.org/docs/manual.html#statements-and-expressions-using-statement |
14:12:10 | Yardanico | using statement here |
14:12:15 | FromGitter | <Bennyelg> so I have to leave {.experimental.} |
14:12:28 | Yardanico | well it wouldn't do anything really bad |
14:13:02 | FromGitter | <Bennyelg> I don't care, I dont see anyone which use db_presto yet :D |
14:13:09 | FromGitter | <Bennyelg> this is all experimental |
14:13:17 | Yardanico | well at least you see that it looks a bit better :) |
14:13:21 | * | endragor quit (Ping timeout: 240 seconds) |
14:13:51 | FromGitter | <Bennyelg> yea |
14:14:01 | FromGitter | <Bennyelg> @Yardanico another question ⏎ why from proc to template |
14:14:01 | FromGitter | <Bennyelg> template cursor*(con): Cursor = con.cur |
14:14:28 | Yardanico | because your "cursor" was just a shortcut |
14:14:42 | Yardanico | and it's better sometimes to have a "template" for shortcut instead of a proc |
14:14:48 | Yardanico | e.g. performance-wise :) |
14:16:18 | FromGitter | <Bennyelg> Ok, thanks! |
14:16:32 | Yardanico | well you can change it back to a proc |
14:18:07 | * | vivus joined #nim |
14:19:12 | * | renarc quit (Ping timeout: 248 seconds) |
14:19:24 | vivus | hello all. where is the source-code for this: https://nim-lang.org/docs/ ? |
14:19:34 | vivus | s/source/source-code |
14:20:10 | Yardanico | in .nim files themselves :) |
14:20:35 | * | vendethiel- joined #nim |
14:20:41 | * | Ven`` quit (Ping timeout: 240 seconds) |
14:20:48 | Yardanico | except manual, tutorials |
14:21:16 | Yardanico | and some other files, which are here - https://github.com/nim-lang/Nim/tree/devel/doc |
14:23:23 | * | BitPuffin|osx quit (Ping timeout: 246 seconds) |
14:27:22 | vivus | it's under commented-code ? |
14:27:32 | vivus | I mean. its under comments in the code? |
14:27:39 | FromGitter | <Yardanico> Yes |
14:28:00 | FromGitter | <Bennyelg> @Yardanico I can't pass default value to a template right? |
14:29:51 | vivus | is the documentation lacking examples? |
14:30:15 | Araq | krux02: when you read this, I can't merge your sizeof/alignof |
14:30:43 | Araq | it breaks async on osx because the posix wrappers in general underspecify the fields |
14:31:02 | Araq | an .importc'ed object must not have its size computed by Nim |
14:31:32 | vivus | Araq: is the documentation lacking in some parts? |
14:31:55 | Araq | which documentation isn't? |
14:31:59 | * | renarc joined #nim |
14:32:21 | vivus | Araq: what would you like to see more of? examples for each proc ? |
14:32:32 | Yardanico | Bennyelg: just change it back to proc :) |
14:32:36 | FromGitter | <Bennyelg> @Yardanico Thanks for your help ⏎ https://github.com/Bennyelg/nimPresto/blob/master/db_presto.nim |
14:33:38 | Araq | vivus: I don't know, I know everything so I don't use the docs. |
14:34:15 | vivus | maybe dom96 might have some input |
14:34:50 | * | aziz joined #nim |
14:36:02 | Araq | Bennyelg: can you write a backend for ormin? :-) |
14:36:33 | * | aziz quit (Client Quit) |
14:38:56 | TjYoco | Araq did you consider dORMin so that it spelled nimrod backwards? |
14:40:19 | Yardanico | lol :) |
14:41:10 | adam12 | lol Araq |
14:42:25 | adam12 | does anybody know if niminst nimble package is deprecated? seems like there are 2 versions of niminst being maintained right now - one bundled in Nim repo, and nim-lang/niminst repo. |
14:44:17 | Araq | adam12: sorry about that, the on in $nim is nim specific but more up to date |
14:44:45 | Araq | nim-lang/niminst is for the other projects with the same needs |
14:45:03 | adam12 | Araq: ok, so if I submitted a pr for nim-lang/niminst, theoretically it might be accepted |
14:45:07 | TjYoco | How do I access object fields from within a macro? I pass my objects as varargs but f.field isn't accessible |
14:46:02 | adam12 | Araq: it makes sense, just wasn't clear. thanks. |
14:46:34 | TjYoco | or am I doing a run-time thing when I should be doing compile time thing. Still getting used to it.. |
14:47:47 | Yardanico | TjYoco, yeah, you're doing a runtime thing probably |
14:48:01 | Yardanico | however you can access object if they're constants |
14:48:50 | FromGitter | <Grabli66> Why AsyncFile does not raise EOF when is EOF? |
14:48:53 | TjYoco | Yardanico, makes sense, I think i'm getting the hang of it. |
14:53:07 | subsetpark | TjYoco: you also should make sure that you've marked as public the fields you want to access (from outside the module) |
14:53:09 | FromGitter | <Bennyelg> @Araq what is ormin |
14:53:47 | Yardanico | an ORM for Nim |
14:54:12 | Yardanico | https://github.com/Araq/ormin |
14:54:21 | Yardanico | examples here - https://github.com/Araq/ormin/blob/master/examples/forum.nim |
14:54:59 | FromGitter | <Bennyelg> so why we need write backend, write me I'll need to go I see your comments later :P |
14:55:05 | * | dom96|w joined #nim |
14:55:59 | * | dom96|w quit (Client Quit) |
14:56:32 | * | ShalokShalom_ is now known as ShalokShalom |
14:59:46 | Yardanico | Bennyelg: some backend like this https://github.com/Araq/ormin/blob/master/ormin/ormin_sqlite.nim |
15:02:03 | * | Jesin joined #nim |
15:08:51 | TjYoco | What am I doing wrong in this macro? https://play.nim-lang.org/?gist=00b9e02f8dca49d94445998328747566 |
15:09:45 | Yardanico | firstly - what do you want to generate? |
15:10:36 | TjYoco | the thing inside dumpAstGen |
15:10:55 | * | renarc quit (Remote host closed the connection) |
15:11:12 | TjYoco | whoops.. |
15:12:02 | * | haha_ joined #nim |
15:12:35 | TjYoco | well fix newField to be (apiName: string, s,f: bool) then I still get the error inside newCall() |
15:12:59 | Yardanico | well what are "true", "true"? |
15:13:03 | Yardanico | why do you need them? |
15:14:00 | Yardanico | maybe you just need to generate let my_thing = newField("my_thing", true, true) from letField( ("my_thing", true, true)) ? |
15:14:40 | TjYoco | yes, exactly |
15:15:05 | TjYoco | I know I didnt implement everything, but I put the minimal stuff in for this test |
15:17:12 | TjYoco | I want to camel case the string for the ident later.. so letField( ("thing_one"), ("thing_two", true) ) -> let thingOne = newField("thing_one") ... etc. Just dont understand how to make the `newField` a NimNode |
15:18:36 | * | relax quit (Ping timeout: 246 seconds) |
15:19:08 | Yardanico | I'm confused about one thing: your "otherF" field in Field object should be int or bool? |
15:19:19 | Yardanico | because you want to call thing macro with a bool |
15:20:00 | Yardanico | e.g. ("thing_two", true) - what's true for? |
15:21:38 | TjYoco | yes, I'm sorry lol. I was a little hasty to put it up. Here, https://play.nim-lang.org/?gist=95d64d65787fd7d1ebe73f84a5f78744 |
15:21:45 | * | arnetheduck quit (Ping timeout: 246 seconds) |
15:22:02 | Yardanico | ah, ok |
15:22:36 | TjYoco | VSCode wasn't throwing errors about it and I was more worried about the newCall() that I just didn't notice |
15:25:47 | Yardanico | ah, ok |
15:26:55 | Yardanico | well it's pretty easy macro |
15:27:18 | Yardanico | https://play.nim-lang.org/?gist=d2b72f3fab881e4a6154f26ec2b0065c |
15:27:19 | TjYoco | Not when you're me |
15:27:36 | * | endragor joined #nim |
15:27:55 | Yardanico | it would generate "let my_thing = newField("my_thing", true, true)" and "let my_thing_two = newField("my_thing_two", false, true)" |
15:29:23 | TjYoco | Maybe you could write some examples for the nim-lang docs. You seem really good at it and the ones on there look nothing like the ones I see you type here |
15:30:25 | * | endragor_ quit (Ping timeout: 240 seconds) |
15:33:01 | * | yglukhov quit (Remote host closed the connection) |
15:33:48 | TjYoco | Yardanico works perfect, even got the snake to camel case conversion in there really easy. |
15:34:09 | * | yglukhov joined #nim |
15:35:38 | * | yglukhov_ joined #nim |
15:35:38 | * | yglukhov quit (Read error: Connection reset by peer) |
15:37:43 | * | mahmudov joined #nim |
15:39:41 | * | yglukhov_ quit (Ping timeout: 240 seconds) |
15:42:06 | Yardanico | TjYoco, this would work too |
15:42:06 | Yardanico | https://play.nim-lang.org/?gist=c484d7582aeb5c188ae1dd0d4c55cacf |
15:42:52 | FromGitter | <ephja> initField ;) |
15:43:07 | Yardanico | ? |
15:45:00 | TjYoco | Yardanico, I think the first one is better because I have overloads for newField and I'm pretty sure that works with it |
15:45:34 | TjYoco | meh, nvm, I'll get it though |
15:46:25 | Yardanico | TjYoco, well it works for me |
15:46:40 | Yardanico | TjYoco, do you mean overloads like this? https://play.nim-lang.org/?gist=495ee92c4adcadd69832bfeec3d26a57 |
15:46:45 | * | endragor quit (Remote host closed the connection) |
15:48:52 | TjYoco | I meant a whole new proc, with different params, and yes it does work, thank you |
15:50:42 | * | Jesin quit (Quit: Leaving) |
15:50:54 | * | relax joined #nim |
15:56:15 | TjYoco | Yardanico, turned old into new: https://gist.github.com/Tyler-Yocolano/73a10036118edfe9b7c36e03a58652f8 -- Not sure how necessary it was, but I really wanted to try out macros and that was a good of spot as any. Thanks! |
15:57:32 | * | endragor joined #nim |
15:59:08 | Yardanico | well you can remove those " " as well |
16:00:29 | * | Arrrr joined #nim |
16:00:29 | * | Arrrr quit (Changing host) |
16:00:29 | * | Arrrr joined #nim |
16:01:10 | TjYoco | meh, I think I'll leave them |
16:02:27 | * | endragor quit (Remote host closed the connection) |
16:03:23 | TjYoco | If you mean around the second args that are sometimes strings, then those actually point to a different object later, not other field objects. I had them as enums but I was getting 'internal error' and just removing them was only way to stop it. |
16:03:55 | Yardanico | TjYoco, report it please |
16:04:08 | Yardanico | "internal error" is an internal compiler error, please report it to github issues |
16:05:55 | TjYoco | okay, Ill give it a shot |
16:07:22 | Yardanico | TjYoco, without quotes - https://play.nim-lang.org/?gist=eafe8850b945015b959c795aadea0c93 :) |
16:08:33 | * | haha_ quit (Quit: haha_) |
16:09:05 | TjYoco | Yardanico nice, but the first way was better for me since I had to `let fName = newIdentNode(snakeToCamel($item[0]))` |
16:09:22 | Yardanico | well you can still do it here |
16:09:26 | Yardanico | and also |
16:09:30 | TjYoco | Oh i see |
16:09:34 | TjYoco | I was looking at the wrong line |
16:09:35 | Yardanico | you don't need to manually convert snake_case to camelCase |
16:09:53 | Yardanico | e.g.: let some_snake = 5; echo someSnake |
16:09:58 | TjYoco | Oh yeah, Nim does that |
16:10:16 | TjYoco | I'm dumb |
16:12:49 | * | couven92 joined #nim |
16:21:59 | * | endragor joined #nim |
16:26:58 | ipjk_ | Anyone that have used scanf? I'm not really understanding the manual for it, on implementing your own matcher. |
16:27:32 | Yardanico | ipjk_, I've used it but I didn't implement my own matcher :) |
16:27:48 | Yardanico | well it has the manual on matchers, no? |
16:27:50 | Arrrr | I have used it and then forgot how to use it |
16:28:30 | ipjk_ | Yardanico: yes, it has. But it doesn't really make sense to me. |
16:29:42 | * | shashlick joined #nim |
16:30:39 | Yardanico | ipjk_, well, your matcher should at least have "input" and "start" arguments |
16:33:05 | Yardanico | well I can't really help you with it, I've never used matchers :) |
16:33:37 | Yardanico | it seems they're not used by other nim projects at all :D |
16:38:24 | ipjk_ | Yeah, I tried searching github. Most people seem to bind sscanf instead. |
16:39:07 | Yardanico | well it's their way... |
16:39:29 | Yardanico | but I think it's better to use pure nim :) |
16:39:34 | Yardanico | where you can |
16:39:56 | Yardanico | cool thing about scanf - it parses your expression at compile-time |
16:40:58 | Yardanico | so it generates code like this - https://gist.github.com/Yardanico/1ec534dbd8dc3c47fbda8713e6236ebe |
16:42:03 | Yardanico | and for example it's faster than .split |
16:42:31 | Yardanico | in cases if you need to split a string like "int,int,int,int|anotherint,anotherint,anotherint,anotherint" |
16:47:20 | * | Jesin joined #nim |
16:52:05 | * | endragor quit (Remote host closed the connection) |
16:53:29 | * | nsf joined #nim |
16:54:26 | * | haha_ joined #nim |
16:57:56 | FromGitter | <mratsim> I’m looking for articles/references on async programming good practices and pitfalls. Context: GPU functions on Nvidia Cuda are all async and I want to make sure I read the data when computation is actually finished. Any good references? |
17:02:07 | * | BitPuffin|osx joined #nim |
17:05:35 | ipjk_ | Yardanico: Would be easier if the documents stated that you needed the signature 'proc (a: string, b: int): int' etc. |
17:05:45 | * | smt` joined #nim |
17:05:49 | Yardanico | ipjk_, I don't know if I'm right about it :) |
17:05:54 | Yardanico | ipjk_, you're free to improve it |
17:06:41 | * | smt quit (Ping timeout: 240 seconds) |
17:15:47 | ipjk_ | Yardanico: it's rather hard to improve documents if you don't understand it yourself -- or do you mean the module? |
17:16:38 | Yardanico | well I mean docs |
17:16:38 | * | haha_ quit (Read error: Connection reset by peer) |
17:17:17 | * | haha_ joined #nim |
17:17:33 | * | solitudesf quit (Remote host closed the connection) |
17:22:42 | * | endragor joined #nim |
17:23:50 | * | nsf quit (Quit: WeeChat 1.9) |
17:25:29 | FromGitter | <zacharycarter> o/ |
17:26:11 | FromGitter | <zacharycarter> ipjk_: I've implemented my own matcher withs canf |
17:26:14 | FromGitter | <zacharycarter> scanf* |
17:26:32 | FromGitter | <zacharycarter> I did it just the other night let me see if I can remember what code I did it for |
17:27:05 | * | endragor quit (Ping timeout: 240 seconds) |
17:27:20 | FromGitter | <zacharycarter> found it |
17:27:58 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59bc0d9ebc464729743a8ab4] |
17:32:07 | * | Trustable joined #nim |
17:38:14 | ipjk_ | zach: so it only needs input and to return an int? |
17:38:49 | ipjk_ | returning the amount of matches? |
17:39:10 | * | endragor joined #nim |
17:39:29 | Yardanico | ipjk_, it doesn't return amount of matches |
17:39:36 | Yardanico | it returns how many chars are processed |
17:39:46 | ipjk_ | yeah, meant that |
17:39:51 | ipjk_ | like $[matchstring({'a', 'b', 'c'})] in abc = 3 |
17:41:31 | * | manjaro-kde5- joined #nim |
17:43:55 | * | claudiuinberlin joined #nim |
17:44:17 | FromGitter | <zacharycarter> I believe so |
17:47:27 | manjaro-kde5- | what are you parsing? I can help |
17:49:06 | * | manjaro-kde5- is now known as planhths |
17:49:14 | * | planhths is now known as planetis |
17:49:29 | planetis | I have used scanf before |
17:49:56 | planetis | check the end of the module for some simpler examples (the test cases) |
17:50:35 | * | qwertfisch joined #nim |
17:50:58 | shashlick | is Nim able to handle static functions from C? |
17:51:59 | FromGitter | <zacharycarter> ipjk_: that example is pretty straightforward - your'e returning the number of chars processed and modifying foo |
17:52:05 | FromGitter | <zacharycarter> based on the input |
17:54:17 | Yardanico | shashlick, try it ? :) |
17:54:24 | * | haha_ quit (Quit: haha_) |
17:55:28 | shashlick | static makes no sense actually, never mind |
17:56:00 | planetis | is the situation on android resolved? Last time I tried to build nim it failed with that notorious glob-smth error |
17:56:17 | Yardanico | planetis, yes |
17:56:19 | Yardanico | ah |
17:56:27 | Yardanico | on android without termux? |
17:56:33 | Yardanico | you need "glob.c" and "glob.h" |
17:56:43 | planetis | with termux but whatever is easier |
17:56:52 | Yardanico | planetis, use termux |
17:56:57 | planetis | yes I do |
17:56:57 | Yardanico | install it in play market |
17:57:07 | Yardanico | and install it as usual :) |
17:57:16 | * | dddddd quit (Remote host closed the connection) |
17:57:18 | Yardanico | termux support was added between 0.17.0 and 0.17.2 |
17:57:24 | Yardanico | so it's already in 0.17.2 |
17:57:48 | planetis | Yardanico: I tried building the latest release |
17:57:55 | Yardanico | planetis, ah |
17:58:06 | Yardanico | easy fix :) |
17:58:09 | planetis | (actually I clonned everything from git) |
17:58:27 | planetis | but it failed building csourses |
17:58:36 | Yardanico | planetis, apt install libandroid-glob apt install libandroid-glob-dev |
17:58:39 | planetis | i mean at bootstraping |
17:58:44 | Yardanico | apt install libandroid-glob libandroid-glob-dev |
17:58:45 | planetis | ok thank you |
17:59:05 | * | vlad1777d quit (Ping timeout: 240 seconds) |
18:01:23 | planetis | i have them both installed though. |
18:01:58 | Yardanico | planetis, can you post the output? |
18:02:05 | planetis | one sec |
18:02:06 | Yardanico | of trying to build csources |
18:02:11 | Yardanico | maybe on gist or pastebn |
18:06:09 | planetis | I need to pass --os android to build.sh right? |
18:06:15 | planetis | I wasn't doing that |
18:06:31 | Yardanico | no you shouldn't I think |
18:06:35 | Yardanico | it should detect it automatically |
18:06:40 | Yardanico | but you may try |
18:06:46 | Yardanico | let me see |
18:07:29 | Yardanico | well no |
18:07:32 | Yardanico | you shouldn't |
18:07:55 | planetis | well let me see if it fails |
18:09:52 | * | endragor quit (Remote host closed the connection) |
18:10:04 | planetis | weird it worked and csources was already up to date |
18:10:57 | planetis | now building without the os flag |
18:12:02 | shashlick | how do you pass a seq[int] to C as an array of pointers? i've tried "addr a[0]" and it still segfaults when it tries to read within C |
18:12:17 | shashlick | the seq is a var and i've also tried unsafeAddr |
18:14:19 | * | Jesin quit (Quit: Leaving) |
18:15:39 | planetis | wep fails https://pastebin.com/nLJR4r0c |
18:15:54 | planetis | I will make a PR for the Readme |
18:16:15 | FromGitter | <zacharycarter> anyone know the equivalent of the >>> operator from Java? |
18:17:20 | Yardanico | what it does? |
18:17:26 | FromGitter | <zacharycarter> logical right shift |
18:17:41 | Yardanico | https://stackoverflow.com/questions/5253194/implementing-logical-right-shift-in-c :) |
18:18:02 | FromGitter | <zacharycarter> good idea thanks |
18:19:32 | FromGitter | <Yardanico> try this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59bc19b4177fb9fe7ec616d5] |
18:19:48 | FromGitter | <zacharycarter> thanks for that |
18:20:09 | FromGitter | <Yardanico> ah |
18:20:17 | FromGitter | <Yardanico> ">>>", not "<<<" :) |
18:20:54 | FromGitter | <Yardanico> probably it will work |
18:21:02 | FromGitter | <Yardanico> it's really a direct translation from C |
18:24:32 | Yardanico | ah, also try this |
18:24:40 | FromGitter | <Yardanico> ```proc `>>>`(a, b: int): int = int(uint(a) shr b)``` |
18:26:05 | Yardanico | but both these procs have their corner-cases |
18:29:59 | FromGitter | <zacharycarter> hrm alright |
18:30:15 | FromGitter | <zacharycarter> damnit I wish I hadn't deleted my old rng / noise stuff |
18:30:18 | FromGitter | <zacharycarter> grrrr mad at myself |
18:30:25 | planetis | now fails with: https://pastebin.com/57Ee41zJ |
18:30:54 | planetis | *while building the koch tool |
18:31:06 | Yardanico | I don't really know why you're getting errors like this |
18:35:07 | * | yglukhov joined #nim |
18:36:07 | planetis | btw that is my env: https://pastebin.com/MkQse3Gw |
18:38:22 | planetis | shashlick: one idea, download the free chapter from Nim in Action about ffi, maybe the solution is in there |
18:39:17 | * | yglukhov quit (Ping timeout: 255 seconds) |
18:40:13 | planetis | anyway I am dropping this (buildin in android). it wasn't important anyway |
18:49:22 | shashlick | planetis: thanks, i'm doing what it suggests but still I segfault when the array is accessed within C |
18:49:36 | shashlick | https://forum.nim-lang.org/t/1489 is another reference I'm using |
18:51:31 | Yardanico | shashlick, well I think you should post your code here so someone might help you |
18:52:08 | shashlick | okay so I'm trying to call match_fingerprints() from https://github.com/acoustid/pg_acoustid/blob/master/acoustid_compare.c |
18:52:24 | shashlick | i've commented out all the postgresql code |
18:52:40 | shashlick | in my nim code, I have the following |
18:52:42 | shashlick | {.compile: "acoustid_compare.c".} |
18:52:42 | shashlick | proc match_fingerprints(a: ptr uint32, asize: int, b: ptr uint32, bsize: int): cfloat {.importc.} |
18:52:52 | Yardanico | ehm, why uint32 ? |
18:52:55 | Yardanico | just asking |
18:53:15 | shashlick | that's what the fingerprints are generated as |
18:53:21 | * | relax quit (Ping timeout: 248 seconds) |
18:53:28 | Yardanico | did you try c2nim? |
18:54:07 | shashlick | not yet |
19:01:37 | * | yglukhov joined #nim |
19:02:31 | * | Vladar quit (Quit: Leaving) |
19:04:22 | * | vendethiel- quit (Ping timeout: 260 seconds) |
19:06:11 | * | relax joined #nim |
19:07:57 | * | Ven`` joined #nim |
19:10:30 | * | Calinou joined #nim |
19:11:36 | * | haha_ joined #nim |
19:12:49 | * | rokups quit (Quit: Connection closed for inactivity) |
19:21:30 | * | relax quit (Ping timeout: 246 seconds) |
19:35:57 | FromGitter | <zacharycarter> I'm trying to get the random package working, not going well |
19:38:55 | * | planetis quit (Quit: Τσάγια!) |
19:39:04 | * | Yardanico quit (Remote host closed the connection) |
19:42:22 | * | haha_ quit (Quit: haha_) |
19:52:47 | * | derlafff quit (Remote host closed the connection) |
19:55:27 | * | relax joined #nim |
20:00:48 | FromGitter | <mratsim> the random package that ships by default? |
20:02:07 | Araq | no the one that is "super extensible" because we all can and should easily write our own random number generators |
20:04:19 | * | BigEpsilon quit (Remote host closed the connection) |
20:04:36 | * | BigEpsilon joined #nim |
20:05:13 | FromGitter | <zacharycarter> I'd just like something more than what the stdlib offers |
20:05:25 | FromGitter | <zacharycarter> more convenience methods, more rng implementations |
20:05:54 | FromGitter | <zacharycarter> I don't necessarily want a bunch of different rng packages |
20:09:18 | * | Jesin joined #nim |
20:09:26 | * | derlafff joined #nim |
20:11:00 | * | vlad1777d joined #nim |
20:18:50 | TjYoco | can you read the output of a execShellCmd()? |
20:20:08 | TjYoco | oh wait, I remember. Disregard |
20:25:02 | obadz | dom96: just so I get this right, you authored Aporia but recommend vscode? |
20:27:31 | FromGitter | <mratsim> Aporia is deprecated/in limbo state |
20:28:19 | FromGitter | <mratsim> I think it’s just a question of time vs everything that Nim needs |
20:28:29 | obadz | ok |
20:28:42 | obadz | and vscode gives the best in-editor type checking/completion/etc. experience? |
20:29:16 | FromGitter | <mratsim> I didn’t try others because I was already using VScode before developing in Nim but it’s very good |
20:29:30 | FromGitter | <mratsim> maybe emacs is better who knows ask @krux02 ;) |
20:29:33 | obadz | good to hear, I'll give it a go |
20:30:41 | FromGitter | <mratsim> especially if you use choosenim as well. I’m on mac and I couldn’t get nimsuggest to work with Nim installed from Homebrew (mac package manager) while it works great via choosenim |
20:33:20 | Calinou | are there plans to add nightly builds to choosenim? :) |
20:33:34 | Calinou | it'd be nice to automate builds (using AppVeyor + Travis), so that this can be done |
20:33:45 | Calinou | rustup has this, it's pretty handy |
20:36:57 | FromGitter | <mratsim> Yep, I can’t test macOS on Travis until choosenim next version is released :/ |
20:44:14 | Calinou | hmm, why? |
20:50:41 | Araq | git pull origin devel |
20:50:45 | Araq | koch boot -d:release |
20:50:54 | Araq | ^^ nightly build |
20:51:40 | * | obadz trying to see how to fit nimble into the nix way |
20:54:51 | FromGitter | <mratsim> @Calinou, I need this commit: https://github.com/dom96/choosenim/commit/78ebeb6094161ddded35fd776bf30936ebca9483 |
20:56:10 | Calinou | you could build Nim for macOS, then put it on Travis via wget :D |
20:56:15 | Calinou | (hacky, but works) |
20:56:31 | FromGitter | <mratsim> @obadz forget it, it doesn’t, like cargo, pypi, cabal, homebrew …. (well it’s installed in the user profile so that’s fine) |
20:56:37 | Calinou | Araq: how often does one need to re-build koch using the C sources? |
20:56:38 | Calinou | never? |
20:56:45 | Araq | never. |
20:56:47 | Calinou | I keep doing it every time, heh |
20:56:49 | Calinou | I'll stop then :P |
21:08:19 | * | BigEpsilon quit (Ping timeout: 255 seconds) |
21:10:43 | * | Trustable quit (Remote host closed the connection) |
21:13:44 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
21:41:49 | TjYoco | TjYoco |
21:42:05 | TjYoco | whoops, trying to search that.. |
21:44:10 | dom96 | mratsim: why can't you test on Travis macOS with choosenim? |
21:44:41 | * | relax quit (Ping timeout: 255 seconds) |
21:45:43 | * | vivus quit (Quit: Leaving) |
21:51:09 | * | Arrrr quit (Quit: Leaving.) |
21:55:48 | FromGitter | <mratsim> 1) 2.2 does not have the commit for no /dev/tty |
21:58:54 | TjYoco | Is there a way to concat strings within a macro? |
22:01:56 | Araq | & ? |
22:03:18 | TjYoco | https://play.nim-lang.org/?gist=96d377b650b32c1db3135cc220d70717 |
22:03:35 | TjYoco | I must be missing something obvious.. |
22:06:15 | TjYoco | hm, it even says it can't evaluate `let value = "nimble"` at runtime. Thought I was starting to understand this thing :/ |
22:07:27 | * | ShalokShalom quit (Ping timeout: 248 seconds) |
22:11:22 | TjYoco | oh, whoops forgot the " ` " at the end... const `cName`* = `value` |
22:11:51 | * | Elronnd is now known as ^^ |
22:11:54 | * | ^^ is now known as Elronnd |
22:14:15 | * | adeohluwa joined #nim |
22:15:34 | adeohluwa | I seem to get error on making requests to https websites from httpclient module |
22:15:46 | TjYoco | what error |
22:15:57 | adeohluwa | SSL support is not available, cannot connect over SSL |
22:16:07 | dom96 | compile with -d:ssl |
22:16:08 | TjYoco | compile with -d:ssl |
22:16:09 | adeohluwa | [HttpRequestError] |
22:16:14 | dom96 | TjYoco: :D |
22:16:21 | adeohluwa | TjYoco: bless man! |
22:16:33 | adeohluwa | dom96: thanks ! |
22:17:09 | TjYoco | dom96 lol I had to type that for my module you just merged about 40x before I just added it to a cfg |
22:17:37 | * | Jesin quit (Quit: Leaving) |
22:17:45 | * | madmalik quit (Quit: Connection closed for inactivity) |
22:20:42 | * | shashlick quit (Ping timeout: 246 seconds) |
22:22:21 | * | vlad1777d quit (Ping timeout: 252 seconds) |
22:23:21 | * | endragor joined #nim |
22:27:57 | * | endragor quit (Ping timeout: 260 seconds) |
22:30:15 | adeohluwa | Big thanks to the folks who contributed to the Nim Rosetta code samples |
22:39:18 | FromGitter | <adamrezich> is there a way to get the base typedesc of a typedesc? |
22:41:01 | * | Elronnd is now known as ^_^ |
22:41:13 | * | ^_^ is now known as Elronnd |
22:44:04 | * | mahmudov quit (Remote host closed the connection) |
22:48:50 | TjYoco | adamrezich, theres this: https://nim-lang.org/docs/manual.html#type-relations-subtype-relation |
22:49:14 | FromGitter | <adamrezich> yeah I saw that but it's just pseudocode |
22:55:53 | TjYoco | I mean, you can use `x of Type` and get a bool |
22:55:59 | programisto | are there any good benchmarks out there of jester but more specifically asynchttpserver? how competitive is it with other envs? |
22:57:31 | programisto | well, could have googled first: http://www.techempower.com/benchmarks/#section=data-r14&hw=ph&test=json |
23:01:17 | * | dddddd joined #nim |
23:02:39 | Araq | you asked for good benchmarks |
23:02:56 | FromGitter | <Bennyelg> Hello All :) |
23:03:31 | Araq | there are none, write a small program that hopefully reflects your use cases and do the timings on your own, everything else is fiction |
23:04:01 | FromGitter | <Bennyelg> @Araq , where can I find in the documents all the information regarding the {. .} |
23:04:01 | programisto | fair enough |
23:09:51 | Araq | https://nim-lang.org/docs/manual.html#pragmas |
23:10:16 | Araq | https://nim-lang.org/docs/manual.html#effect-system |
23:35:40 | * | ipjk_ quit (Quit: Leaving) |
23:37:39 | * | yglukhov quit (Remote host closed the connection) |
23:44:17 | * | vendethiel- joined #nim |
23:45:32 | * | Ven`` quit (Ping timeout: 260 seconds) |
23:46:09 | * | Jesin joined #nim |
23:48:51 | FromGitter | <mratsim> Finally, I managed to call custom cuda kernels from Nim. https://gist.github.com/mratsim/dfbd944f64181727a97dffb30b8cbd0a. I can sleep. ⏎ ⏎ Well, basically I lost the fights to: ⏎ ⏎ 1) Metaprogramming Cuda from Nim ... [https://gitter.im/nim-lang/Nim?at=59bc66e3210ac2692038375b] |
23:54:36 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
23:56:01 | * | couven92 quit (Quit: Client Disconnecting) |