00:00:18 | FromDiscord | <TryAngle> In reply to @Elegantbeef "To answer the question": How would merging rune and char kill off that? I don't really know what a "binary buffer string" is? Langs that have UTF8 encoded chars don't make strings arrays of chars either afaik. |
00:00:50 | FromDiscord | <TryAngle> So how would those two things "fight" each other |
00:04:34 | FromDiscord | <TryAngle> And also why is a string type better as a binary buffer then something like seq[u8] or something like that. I believe u on this but I would like to understand 😳 |
00:04:55 | FromDiscord | <TryAngle> (edit) "seq[u8]" => "seq[uint8]" |
00:37:11 | FromDiscord | <Elegantbeef> It's not any better it's just a present standard usage |
00:37:45 | FromDiscord | <Elegantbeef> It kills it off cause there are two ways to implement a unicodestr with their own benefits each |
00:38:03 | FromDiscord | <Elegantbeef> you can do `seq[Rune]` or `seq[char]` internally |
00:40:16 | FromDiscord | <Elegantbeef> You have to remember there a shit load of existing Nim code and changing string to unicode aware changes a ton of behaviour and performance graphs |
00:40:31 | * | jmd_ joined #nim |
00:41:11 | * | jmdaemon quit (Ping timeout: 268 seconds) |
01:46:47 | FromDiscord | <!Patitotective> to check if a rune is a numeric value what is the best way?↵`($rune)[0] in Digits`↵`if rune.ord <= char.high: rune.char in Digits` |
01:46:49 | FromDiscord | <!Patitotective> (edit) "Digits`" => "Digits`↵?" |
01:49:00 | FromDiscord | <!Patitotective> maybe `rune >= Rune('0') and rune <= Rune('9')` |
01:49:46 | FromDiscord | <!Patitotective> (edit) ">=" => ">=%" | "<=" => "<=%" |
01:55:25 | FromDiscord | <Elegantbeef> `rune in '0'.ord .. '9'.ord` |
01:55:44 | FromDiscord | <Elegantbeef> `rune.distinctBase` probably |
01:55:51 | FromDiscord | <Elegantbeef> But arent there also unicode numbers that are non ascii |
02:04:39 | FromDiscord | <Rika> 9 |
02:04:44 | FromDiscord | <Rika> ⑨ |
02:04:47 | FromDiscord | <Rika> ❾ |
02:04:54 | FromDiscord | <Rika> Have fun |
02:34:42 | * | noeontheend joined #nim |
02:35:46 | * | rockcavera joined #nim |
02:35:46 | * | rockcavera quit (Changing host) |
02:35:46 | * | rockcavera joined #nim |
02:37:50 | FromDiscord | <demotomohiro> Also:↵Ⅸ↵九 |
02:38:30 | * | noeontheend_ joined #nim |
02:39:52 | * | noeontheend quit (Ping timeout: 248 seconds) |
02:45:01 | * | noeontheend_ quit (Ping timeout: 256 seconds) |
03:09:59 | FromDiscord | <j-james> does nim have any packages like https://docs.rs/trees/0.3.0/trees/ ? |
03:11:11 | FromDiscord | <huantian> I swear there is one and I can’t remember the name |
03:11:14 | FromDiscord | <j-james> i've only found binary/balancing trees, not any that preserve the parent-child structure |
03:13:49 | FromDiscord | <j-james> i feel like there may be some other name for them that i'm unaware of 🙁 |
03:14:10 | FromDiscord | <Elegantbeef> I'm dumb so it just looks like a linked list to me |
03:14:14 | FromDiscord | <Elegantbeef> Rather node graph |
03:21:49 | * | xet7 joined #nim |
03:29:39 | FromDiscord | <j-james> it might be? |
03:29:47 | FromDiscord | <j-james> each node just has to have a singular (or no) parent, and an arbitrary amount (including none) of children |
03:29:54 | FromDiscord | <j-james> and information attached |
03:30:18 | FromDiscord | <j-james> this is probably some very common data structure, i just haven't ever used one before |
03:45:56 | * | arkurious quit (Quit: Leaving) |
03:56:12 | * | CyberTailor quit (Remote host closed the connection) |
03:58:50 | FromDiscord | <Rika> It says there, child sibling linked tree |
03:58:58 | FromDiscord | <Rika> https://www.geeksforgeeks.org/left-child-right-sibling-representation-tree/ |
03:59:47 | * | CyberTailor joined #nim |
04:26:13 | * | robertmeta quit (*.net *.split) |
04:26:13 | * | oz quit (*.net *.split) |
04:26:13 | * | v9fk quit (*.net *.split) |
04:26:13 | * | dv^_^ quit (*.net *.split) |
04:26:51 | * | v9fk joined #nim |
04:27:05 | * | ox joined #nim |
04:27:12 | * | robertmeta joined #nim |
04:37:27 | * | Yardanico_ quit (*.net *.split) |
04:37:27 | * | soileh quit (*.net *.split) |
04:37:27 | * | blackbeard420 quit (*.net *.split) |
04:37:27 | * | qwestion quit (*.net *.split) |
04:37:28 | * | tanami quit (*.net *.split) |
04:37:38 | * | blackbeard420 joined #nim |
04:37:39 | * | Yardanico joined #nim |
04:37:39 | * | tanami joined #nim |
04:37:41 | * | Yardanico quit (Changing host) |
04:37:41 | * | Yardanico joined #nim |
04:37:42 | * | soileh joined #nim |
05:03:44 | FromDiscord | <Phil> Just learned about `dumpAstGen`, looks pretty neat! |
05:05:57 | FromDiscord | <Prestige> Wasn't someone developing a library for science or something? I remember seeing posts about it, can't remember the name |
05:06:52 | FromDiscord | <Professor Actual Factual> In reply to @Avahe "Wasn't someone developing a": Science library sounds too vague, we do have a science project that is continually growing with science based libs: https://github.com/SciNim/getting-started |
05:07:09 | FromDiscord | <Prestige> ah that's what I was looking for, thanks |
05:09:52 | FromDiscord | <Prestige> I think interfacing with R would be pretty huge |
05:10:32 | * | pch joined #nim |
05:43:51 | NimEventer | New post on r/nim by yyoncho: Nimlangserver Announcement, see https://reddit.com/r/nim/comments/vr0aql/nimlangserver_announcement/ |
05:58:31 | * | mahlon joined #nim |
05:59:22 | FromDiscord | <ajusa> oh wow that's great news |
05:59:32 | FromDiscord | <Phil> I am unsure what this will mean for the vscode extension |
06:00:20 | FromDiscord | <Phil> Like, the recompile is what made getting autocomplete suggestions so slow on nim, right? So I'm not sure how running that in a separate thread will help autocomplete speeds |
06:00:49 | FromDiscord | <ajusa> The main issue I've seen folks complain about is that it was possible for nimsuggest to get stuck |
06:00:59 | FromDiscord | <ajusa> which would lead to 100% CPU usage until you killed it |
06:01:16 | FromDiscord | <ajusa> As this runs separate processes, it can manage them better and kill ones that don't respond |
06:01:47 | FromDiscord | <ajusa> Also this uses a caching mechanism that seems like it would cut down on the amount of code to be recompiled greatly |
06:02:05 | FromDiscord | <Phil> Huh, alright never had that issue in particular in the 7 months I used the extension |
06:03:16 | * | CyberTailor quit (Remote host closed the connection) |
06:05:43 | * | CyberTailor joined #nim |
06:17:49 | FromDiscord | <Prestige> Working well for me so far |
06:18:34 | FromDiscord | <Phil> I wonder if I should have noticed any changes to the vscode extension already or if I don't have that update yet |
06:19:00 | FromDiscord | <Phil> Well looking into that later |
06:19:24 | FromDiscord | <Phil> (edit) "Well" => "Well," |
06:28:28 | FromDiscord | <Elegantbeef> the V3 of nimsuggest hasnt landed in stable right? |
06:31:38 | * | pch quit (Remote host closed the connection) |
06:35:37 | FromDiscord | <Tanguy> Apparently it's been backported to 1.6 |
06:36:04 | FromDiscord | <Elegantbeef> Yea but it's not 1.6.8 yet |
06:36:17 | FromDiscord | <Prestige> https://github.com/nim-lang/Nim/pull/19892 |
06:36:48 | FromDiscord | <huantian> does this mean sematic highlighting 🥺 |
06:37:04 | FromDiscord | <Elegantbeef> Not yea afaik |
06:37:37 | FromDiscord | <Phil> Ah so I'll notice any changes once v3 actually starts shipping with nim, or I swap to devel ? |
06:37:53 | FromDiscord | <Elegantbeef> And when you enable it in your editor |
06:37:57 | FromDiscord | <Phil> Check |
06:38:09 | FromDiscord | <Elegantbeef> Presently doesnt seem to work with kate |
06:38:46 | FromDiscord | <ajusa> if anyone has a minute or two, are they able to reproduce https://github.com/treeform/boxy/issues/44 ? wondering if it's due to my Linux dependencies rather than boxy itself |
06:42:37 | FromDiscord | <Elegantbeef> Works fine here |
06:42:43 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/993406486275436554/image.png |
06:42:54 | FromDiscord | <Elegantbeef> I had to improvise though |
06:45:29 | FromDiscord | <Elegantbeef> Actually the langserver does work with kate just not the typical nimble directory it seems...? |
06:49:56 | FromDiscord | <ajusa> In reply to @Elegantbeef "Works fine here": well shoot |
06:56:01 | FromDiscord | <demotomohiro> @That error message looks like came from shader. Could you find which shader generating the error? |
06:56:19 | FromDiscord | <demotomohiro> @ajusa |
06:56:35 | FromDiscord | <ajusa> It's happening somewhere internally in Windy |
06:57:00 | FromDiscord | <ajusa> but yeah I was looking for some sort of debug flag that might print out the shader, haven't found it yet |
06:57:23 | FromDiscord | <ajusa> (edit) "It's happening somewhere internally in Windy ... " added "or Boxy" |
06:58:18 | FromDiscord | <Elegantbeef> Is it possible you have a bad version of one of the packages |
06:58:26 | FromDiscord | <ajusa> I hope not |
06:58:37 | FromDiscord | <ajusa> I install everything at head |
06:59:06 | FromDiscord | <ajusa> and if it works for you it's something on my machine I assume |
07:12:25 | * | rockcavera quit (Remote host closed the connection) |
07:19:27 | * | gsalazar joined #nim |
07:22:56 | FromDiscord | <b1rdf00d> Is this the right place to ask for help RE pull requests / failing tests? |
07:23:28 | FromDiscord | <Elegantbeef> You can ask and some may help |
07:29:44 | FromDiscord | <d4rckh> i cant close a tcp socket while im waiting to receive something? |
07:33:45 | FromDiscord | <Elegantbeef> No clue it'd make sense that it'd raise an error and stop it |
07:34:52 | FromDiscord | <b1rdf00d> sent a long message, see http://ix.io/41zm |
07:35:52 | FromDiscord | <b1rdf00d> actually I'm not sure how to work out which test is failing |
07:35:56 | FromDiscord | <Elegantbeef> I just checked and posix isnt enabled with windows yes |
07:36:00 | FromDiscord | <Elegantbeef> What's the PR? |
07:36:14 | FromDiscord | <Elegantbeef> Oh wait that was the PR i thought that was an issue |
07:36:15 | FromDiscord | <Elegantbeef> my bad |
07:37:16 | FromDiscord | <Elegantbeef> is that `exit` command windows' shell compliant? |
07:38:23 | FromDiscord | <b1rdf00d> I did check this, which I interpreted to be compliant: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/exit |
07:39:52 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=41zn |
07:39:59 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=41zo |
07:40:48 | FromDiscord | <Elegantbeef> It's clearly searching for a binary |
07:41:37 | FromDiscord | <b1rdf00d> ^ is that Windows? |
07:41:42 | FromDiscord | <Elegantbeef> Wine |
07:41:50 | FromDiscord | <b1rdf00d> _ah_ that's a good idea |
07:42:00 | FromDiscord | <Elegantbeef> If you have mingw and wine installed you can do `nim c -r -d:mingw ./test.nim` |
07:42:13 | FromDiscord | <Elegantbeef> You want to use `execShellCmd` |
07:42:34 | FromDiscord | <Elegantbeef> `execCmd` does not run in the shell |
07:43:37 | FromDiscord | <b1rdf00d> okay that makes sense, actually the reason I submitted this PR is I was using `execCmd` to call a python script, I thought this would do the same thing for testing purposes without needing to get python involved |
07:43:48 | FromDiscord | <d4rckh> i closed all the clients connected to the tcp server individually and now i get a different error |
07:43:52 | FromDiscord | <Elegantbeef> Remember i was the one that pointed you to the issue? |
07:43:55 | FromDiscord | <d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=41zp |
07:44:11 | FromDiscord | <b1rdf00d> In reply to @Elegantbeef "Remember i was the": I do yep! But I may not have understood what you meant |
07:44:27 | FromDiscord | <b1rdf00d> (I'm surprised you remember given how many issues you field on here) |
07:44:28 | FromDiscord | <d4rckh> i cant pin point the exact function that raised this error because the stacktrace starts at runForever() and ends at the inter of my big proc |
07:47:04 | FromDiscord | <Elegantbeef> Welcome to Nim's async |
08:02:53 | FromDiscord | <fbpyr> on nim1.6.6 win10, when I run `nimble taskname`, with an `exec "copy ..."` command in it, it compiles the project fine, but then complains, that it cannot find the path to `copy`.↵the same exact copy command works fine by itself in the same terminal.↵what would be the canonical way to copy the generated dll to some additional places? |
08:03:37 | FromDiscord | <Phil> That's why async I've seen so far. Stacktraces tend to become useless in its wake in general |
08:03:50 | FromDiscord | <Phil> (edit) "why" => "every" |
08:04:00 | FromDiscord | <Elegantbeef> Eventually someone will fix it |
08:04:12 | FromDiscord | <Phil> Similar issues in java stacktraces |
08:04:22 | FromDiscord | <Phil> When dealing with async |
08:04:34 | FromDiscord | <Phil> So I'm not holding out hope |
08:05:05 | FromDiscord | <Elegantbeef> The difference is Nim's async is in macros so the traces can be cleaned by some brave soul! |
08:13:20 | FromDiscord | <zhmtzhmt> How can I debug c++ code compiled by pragma "{.compile: "MapGen2.cpp".}", ↵break point marked in cpp file does not work. |
08:27:21 | FromDiscord | <Tanguy> In reply to @d4rckh "i cant close a": https://superuser.com/questions/298919/what-is-tcp-half-open-connection-and-tcp-half-closed-connection |
08:31:16 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=41zu |
08:31:34 | FromDiscord | <Elegantbeef> incremental compilation is still very early |
08:32:20 | FromDiscord | <jmgomez> do you know if there is a place to track the work done? |
08:32:31 | FromDiscord | <Rika> Probably the issues tracker |
08:33:48 | FromDiscord | <jmgomez> ok. Also, once it's out will it help as a side nim suggest? In a sense that it will consume less resources? |
08:36:57 | FromDiscord | <Elegantbeef> It probably will but until then the new nimsuggest protocol version will help a lot |
08:40:13 | FromDiscord | <jmgomez> Oh didnt know they were already efforts to improve nimsuggest too. That's great |
08:47:13 | FromDiscord | <d4rckh> In reply to @Tanguy "https://superuser.com/questions/298919/what-is-tcp-": and how can i handle that and properly close my tcp server at run time? |
08:48:02 | * | CyberTailor quit (Remote host closed the connection) |
08:49:04 | * | CyberTailor joined #nim |
08:58:10 | FromDiscord | <enthus1ast> @d4rckh\: i do not know your exact problem, but in networking every send / recv can break your code, so every network proc call must be at least guarded by try and except |
08:59:36 | FromDiscord | <enthus1ast> so it might be a good idea to structure you application like this, that you do not sprinkle these all over, but have a defined "sending and receiving" area where you take great care of the applications flow |
09:01:32 | FromDiscord | <fwsgonzo> which Nim library can help me add a watermark to an image? |
09:01:36 | FromDiscord | <fwsgonzo> its a simple blending operation |
09:01:41 | FromDiscord | <Elegantbeef> pixie |
09:01:51 | FromDiscord | <fwsgonzo> thanks |
09:01:54 | FromDiscord | <enthus1ast> @d4rckh\: as far as i know, a so\_linger of 0 forcefully terminates a tcp connection |
09:02:55 | FromDiscord | <Luckayla> Did you have to let it linger? |
09:04:47 | FromDiscord | <enthus1ast> @d4rckh\: ah and also, if you control the protocol you speak, a heartbeat (in both directions, client -\> server; server -\> client) should be applied |
09:05:15 | FromDiscord | <enthus1ast> and if a participant cannot answer in time you clean up |
09:05:45 | FromDiscord | <enthus1ast> i know this is mostly general stuff i wrote, but finding the source of your issue requires to have an indepth look |
09:06:03 | * | dtomato quit (Quit: The Lounge - https://thelounge.chat) |
09:06:26 | * | dtomato joined #nim |
09:12:07 | FromDiscord | <enthus1ast> networking is quite difficult to get right, the async often /seems/ to make this easier, but in async you can easily run in the "crosstalking" issues, since there is not automatic multiplexing of of your applications channels. What i mean by this is that for example two async functions, wait for the completion of a long runnning task, but the answering order is not guaranteed, so the wrong functions receives the answer |
09:12:08 | FromDiscord | <enthus1ast> what i sometimes do to circumvent this is that i just open new connections for a long running task |
09:13:30 | FromDiscord | <enthus1ast> another option is to just have one receiver that receives data, then it completes a callback that your initiator set |
09:14:08 | FromDiscord | <enthus1ast> then you have another issue though, so that, if not answer was received, the callback is never fullfilled, but stalls, .... |
09:14:11 | FromDiscord | <enthus1ast> yeah |
09:14:15 | FromDiscord | <enthus1ast> networking is fun |
09:17:13 | FromDiscord | <fwsgonzo> which API function in pixie can performan an operation on two images? |
09:21:21 | FromDiscord | <enthus1ast> masking mabye? @fwsgonzo https://github.com/treeform/pixie/blob/master/examples/masking.nim |
09:23:03 | FromDiscord | <enthus1ast> or blending? |
09:23:56 | FromDiscord | <fwsgonzo> thanks, but yeah, exactly - I am trying to blend two images - but the BlendMode is not mentioned much in the API |
09:24:08 | FromDiscord | <fwsgonzo> I would have thought (for example) that drawImage could take a BlendMode |
09:24:08 | * | CyberTailor quit (Ping timeout: 268 seconds) |
09:24:43 | FromDiscord | <enthus1ast> have not used pixie that much to be honest, but could you maybe call draw 2 time? |
09:24:53 | FromDiscord | <enthus1ast> one for your background, the other one for your whatermakr |
09:25:00 | FromDiscord | <enthus1ast> watermark |
09:25:04 | FromDiscord | <fwsgonzo> I am wondering that too, if I start with one image, set a "global" blend mode, and then draw the other |
09:26:25 | FromDiscord | <fwsgonzo> (edit) "I am wondering that too, if I start with one image, set a "global" blend mode, and then draw the other ... " added "image over" |
09:28:04 | * | lumo_e joined #nim |
09:30:57 | FromDiscord | <fwsgonzo> It was masking, I guess: https://nimdocs.com/treeform/pixie/pixie/images.html#draw,Image,Mask |
09:31:12 | FromDiscord | <fwsgonzo> not sure why they call it that, afaik masks are binary |
09:46:45 | FromDiscord | <d4rckh> In reply to @enthus1ast "<@648552095531663361>\: i do not": yes i am using async sockets and when they raise an exception it gets raised from runForever(), if i guard runForever() by try and except and discard the OSError my entire app stops |
09:47:18 | FromDiscord | <enthus1ast> i came up with that\: https://play.nim-lang.org/#ix=41zJ |
09:47:25 | FromDiscord | <Phil> I'm currently reading through demotomohiro's article about gcc and clibs for nimmers (and after that I'll read through the clibs for nimmers one).↵I just want to see if I'm getting something correct there:↵Anything not written in a function in C is executed at compile time? Am I getting that right? |
09:47:41 | FromDiscord | <enthus1ast> yeah the exceptions bubble up to runForever↵(@d4rckh) |
09:47:58 | FromDiscord | <enthus1ast> but they're raised deeper in your app |
09:48:18 | FromDiscord | <d4rckh> well they dont get caught |
09:48:24 | FromDiscord | <d4rckh> (edit) "well they dont get caught ... " added "if i wrap the try block around the recvLine" |
09:50:24 | FromDiscord | <enthus1ast> can you share the stacktrace?↵(@d4rckh) |
09:51:40 | FromDiscord | <d4rckh> sent a code paste, see https://paste.rs/SO2 |
09:52:49 | FromDiscord | <enthus1ast> okay this does not help \:) |
09:52:49 | FromDiscord | <enthus1ast> server.nim 77 is runForever i guess? \:) |
09:53:07 | FromDiscord | <d4rckh> correct |
09:54:06 | FromDiscord | <enthus1ast> have you also guarded the send? |
09:55:32 | FromDiscord | <d4rckh> yes but it probably wont help? |
09:55:48 | FromDiscord | <d4rckh> yup it doesnt |
09:57:28 | FromDiscord | <enthus1ast> can you share the code? |
10:00:45 | FromDiscord | <Prestige> There's no way to set a sort of "global" indentation for subsequent echo calls, is there? |
10:01:59 | FromDiscord | <enthus1ast> @Prestige\: no guess you must overload your echo |
10:02:05 | FromDiscord | <enthus1ast> or do your own |
10:02:25 | FromDiscord | <Prestige> Cool just checking before I do my own thing |
10:26:11 | * | lumo_e quit (Ping timeout: 255 seconds) |
10:32:03 | FromDiscord | <d4rckh> In reply to @enthus1ast "can you share the": of what |
10:41:34 | * | pch joined #nim |
11:22:03 | * | lumo_e joined #nim |
11:22:36 | FromDiscord | <Goel> sent a code paste, see https://play.nim-lang.org/#ix=41zW |
11:24:35 | FromDiscord | <Rika> k = ($i).cstring |
11:25:44 | FromDiscord | <Goel> Oh... i tried that like this: `k = $i.cstring` earlier, i wasn't aware it needs the parenthesis |
11:26:31 | FromDiscord | <jan0809> eh https://lunduke.substack.com/p/a-linux-kernel-module-written-in |
11:27:25 | FromDiscord | <jan0809> since when scratch compiles to cpp |
11:32:36 | FromDiscord | <Rika> #offtopic |
11:34:31 | FromDiscord | <jan0809> true |
11:42:20 | * | jmd_ quit (Ping timeout: 260 seconds) |
11:45:23 | FromDiscord | <TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=41A3 |
11:46:20 | FromDiscord | <TryAngle> ah ok, sets require ordinal types and rune is not rodinal |
11:46:26 | FromDiscord | <TryAngle> but why is rune not ordinal? |
11:47:59 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/manual.html#types-set-type |
11:48:33 | FromDiscord | <demotomohiro> !eval import unicode; var s: set[Rune] |
11:48:35 | NimBot | Compile failed: /usercode/in.nim(1, 27) Error: set is too large |
11:49:01 | FromDiscord | <Rika> runes are max 32 bit right? i forgot |
11:49:03 | FromDiscord | <TryAngle> ah I remember sets are basically big arrays? |
11:49:14 | FromDiscord | <TryAngle> (edit) "arrays?" => "arrays that a "prefilled"?" |
11:49:16 | FromDiscord | <Rika> sets are bit sets |
11:49:23 | FromDiscord | <Rika> so that means it needs as many bits as there are elements |
11:49:34 | FromDiscord | <Rika> so if you have a 16 bit value, you need a 2^16 bit set |
11:49:46 | FromDiscord | <TryAngle> ye that's what I mean |
11:50:07 | FromDiscord | <TryAngle> ok, then I want to use array anyways |
11:50:20 | FromDiscord | <demotomohiro> !eval import unicode; echo sizeof(Rune) |
11:50:24 | NimBot | 4 |
11:51:05 | FromDiscord | <Rika> use a hashset |
11:51:23 | FromDiscord | <xflywind> Internally big sets are arrays, small sets are numbers. |
11:53:25 | FromDiscord | <xflywind> !eval var s: set[int32] |
11:53:27 | NimBot | Compile failed: /usercode/in.nim(1, 11) Error: set is too large |
11:59:37 | FromDiscord | <TryAngle> how can i type unicode characters in nim strings? |
11:59:43 | FromDiscord | <TryAngle> (edit) "how can i type unicode characters ... in" added "as id" |
12:00:24 | FromDiscord | <TryAngle> I want to add special diacritcs |
12:00:33 | FromDiscord | <TryAngle> for example: "a\030" |
12:02:49 | FromDiscord | <TryAngle> oh nvm I'm stupid I misstyped .... ...... .... .. .. .. . .. .. ..... |
12:06:06 | FromDiscord | <planetis> you can get around that by declaring a range |
12:06:36 | FromDiscord | <planetis> !eval echo {range[0..2](2)} |
12:06:39 | NimBot | {2} |
12:09:30 | FromDiscord | <demotomohiro> This keyboard can type any unicode characters! https://twitter.com/hsgw/status/1543866246617526275 |
12:10:13 | FromDiscord | <jan0809> ergonomic |
12:15:41 | FromDiscord | <Emmanuel M. Smith> Will the new Mastering Nim book be available in PDF at some point? |
12:33:30 | FromDiscord | <planetis> No idea, I am waiting for a discount in the .de domain like in .com to get it. |
12:38:47 | * | toluene0 quit (Quit: Ping timeout (120 seconds)) |
12:39:36 | * | FromDiscord quit (Remote host closed the connection) |
12:39:49 | * | FromDiscord joined #nim |
12:40:51 | * | toluene joined #nim |
12:41:49 | FromDiscord | <aph> does staticRead means that the file will be in the binary? thanks |
12:42:10 | FromDiscord | <Rika> The file contents will be |
12:42:43 | FromDiscord | <aph> oh awesome that's what i want thanks |
12:53:22 | FromDiscord | <jan0809> In reply to @planetis "No idea, I am": it used to be at around 40€ some days |
12:55:30 | FromDiscord | <fwsgonzo> sent a code paste, see https://play.nim-lang.org/#ix=41Ah |
12:55:36 | FromDiscord | <Rika> What is the code |
12:56:21 | FromDiscord | <fwsgonzo> sent a code paste, see https://play.nim-lang.org/#ix=41Ai |
12:56:59 | FromDiscord | <Rika> And what does callback return |
12:57:05 | FromDiscord | <fwsgonzo> int, string, string |
12:57:21 | FromDiscord | <Rika> Explicitly convert b into a c string then |
12:57:30 | FromDiscord | <fwsgonzo> cstring(a) ? |
12:57:33 | FromDiscord | <Rika> B |
12:57:41 | FromDiscord | <Rika> And a I guess yeah |
12:58:13 | FromDiscord | <fwsgonzo> alright, that was easy 🙂 thanks 👍 |
13:23:36 | FromDiscord | <trevor> sent a code paste, see https://play.nim-lang.org/#ix=41Am |
13:23:38 | * | lumo_e quit (Ping timeout: 240 seconds) |
13:31:17 | FromDiscord | <demotomohiro> It seems `fact.id.slot0` is `T.slot0` as `fact.id` is type T.↵I guess T is supposed to be tuple or object type that has `slot0` and `slot1` field.↵Or `slot0` can be a procedure that takes `fact.id` and returns int. |
13:33:08 | FromDiscord | <fbpyr> when compiling my nim code as lib, is there a way to get its dll dir path?↵`os.getAppDir()` only gives me the path of the executable it is called from. 🤔 |
13:34:10 | FromDiscord | <ynfle> Are there irc logs for channels other than main? |
13:34:33 | FromDiscord | <enthus1ast> [fbpyr](https://matrix.to/#/@fbpyr:tchncs.de)\: https://stackoverflow.com/questions/6924195/get-dll-path-at-runtime |
13:36:13 | FromDiscord | <trevor> Ah, so @demotomohiro `slot0`, `slot1` isn't some Nim language feature? I realize there is a whole other file filled with Nim macros I can investigate. |
13:37:18 | FromDiscord | <trevor> lol, found the code. Thanks! |
13:40:12 | FromDiscord | <demotomohiro> In reply to @trevor "Ah, so <@288750616510201856> `slot0`,": I think `slot0`, `slot1` is something related to `T`, not language feature. |
13:41:36 | FromDiscord | <trevor> Yup! Looks like the macro where they are used is tied to a `NimNode`, so I think they're storing the underlyiing object there. |
13:41:39 | FromDiscord | <fbpyr> [enthus1ast](https://matrix.to/#/@sn0re:matrix.code0.xyz)\: thank you for the link, but that is in .net. for this small lib I would ideally not import winim and use a nim functionality if available? |
13:42:06 | FromDiscord | <enthus1ast> huh .net? |
13:42:45 | FromDiscord | <fbpyr> oh wait they are of different langs.. |
13:42:55 | FromDiscord | <fbpyr> sry |
13:47:08 | FromDiscord | <fbpyr> oh nice `GetModuleFileNameW` is directly there.. 😀 |
13:47:42 | * | TakinOver quit (Ping timeout: 272 seconds) |
13:47:47 | * | lumo_e joined #nim |
13:47:57 | * | lumo_e quit (Client Quit) |
13:59:06 | arkanoid | uh? new book? |
14:00:56 | FromDiscord | <demotomohiro> @Arkanoid https://forum.nim-lang.org/t/9259 |
14:03:58 | FromDiscord | <xflywind> And more are to come. |
14:03:58 | arkanoid | wow, I will never buy it |
14:05:17 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "But arent there also": yea but i dont care about thoes hehe |
14:05:23 | arkanoid | I read technical book in my work time, while on the move, and I have space/weight limitations. What a bad decision :( |
14:06:12 | arkanoid | xflywind, what do you mean? |
14:06:15 | FromDiscord | <planetis> In reply to @flywind "And more are to": more books? |
14:09:49 | FromDiscord | <planetis> > In fact, the algorithm described in the book is new and significantly easier to comprehend than the one that Karax implements!↵That's interesting, anyone got that far? |
14:13:32 | FromDiscord | <xflywind> In reply to @planetis "more books?": Yeah https://discord.com/channels/371759389889003530/768367394547957761/991387438062764032 |
14:14:39 | FromDiscord | <xflywind> https://forum.nim-lang.org/t/9259#60641 |
14:15:05 | FromDiscord | <xflywind> In reply to @arkanoid "<@658563905425244160>, what do you": https://forum.nim-lang.org/t/9259#60641 |
14:15:57 | arkanoid | xflywind, oh! planned. Good to know |
14:16:01 | FromDiscord | <planetis> Books are cool, but if they are so expensive... |
14:16:58 | arkanoid | problem is not price, is usability |
14:17:15 | FromDiscord | <planetis> what usability? |
14:18:18 | FromDiscord | <ynfle> Is it better to ask arraymancer questions here of in #science? |
14:18:33 | FromDiscord | <planetis> pbl science |
14:23:03 | FromDiscord | <ynfle> What are the circumstances where `var a = b` where b is declared as a let object wouldn't produce a copy |
14:23:09 | FromDiscord | <ynfle> ? |
14:23:40 | FromDiscord | <Phil> In reply to @planetis "what usability?": Being able to read it as ebook on a Kindle or on a phone as you desire |
14:26:48 | FromDiscord | <Phil> In reply to @ynfle "What are the circumstances": Wouldn't a ref type lead to a copy of the ref, which would fulfill those requirements ? I'd need to get to a PC to validate but that'd be my first thought |
14:27:16 | * | arkurious joined #nim |
14:27:21 | FromDiscord | <Phil> It would not bea copy of the original data, only the ref I would assume |
14:28:14 | FromDiscord | <Rika> In reply to @Isofruit "Wouldn't a ref type": they mean a copy of the stack value |
14:28:20 | FromDiscord | <planetis> when is the last read of b, let a = b would create a cursor and that avoids the inc refcount |
14:28:21 | FromDiscord | <Rika> so regardless of whether it is a ref or not |
14:33:42 | * | rockcavera joined #nim |
14:33:42 | * | rockcavera quit (Changing host) |
14:33:42 | * | rockcavera joined #nim |
14:35:32 | arkanoid | I wish there were something like python's streamlint or R's shiny for Nim |
14:35:39 | FromDiscord | <demotomohiro> In reply to @ynfle "What are the circumstances": https://wandbox.org/permlink/WU6OaRLT1AFYQs8f |
14:36:37 | arkanoid | nim seems the perfect fit for this, having DSL, js capability, and this mood that makes things magic |
14:39:51 | * | ox is now known as oz |
14:40:18 | FromDiscord | <demotomohiro> @Arkanoid He said no for e-book version: https://forum.nim-lang.org/t/9259#60646 |
14:43:27 | arkanoid | demotomohiro: 1 is statistically false, 2 is legally false and also much more probable given condition 1, 3 is just patronizing |
14:45:32 | arkanoid | also this really says to me "nim is not serious, is an experiment meant for hobby and to be consumed in your spare time" |
14:48:54 | Amun-Ra | given the reponses on forum, I'll buy clay table version |
14:49:11 | Amun-Ra | those wippersnappers with paper books… |
14:49:42 | FromDiscord | <pietroppeter> In reply to @arkanoid "I wish there were": I would love having a streamlit-like api in nimib. for the moment happy enough that, thanks to @hugogranstrom , we have easy to access js capabilities in it, see this nice example: https://pietroppeter.github.io/nimib/caesar.html |
14:49:53 | Amun-Ra | (I have more than enough physical books, so I'll pass on that one) |
14:50:06 | FromDiscord | <pietroppeter> In reply to @pietroppeter "I would love having": (this is not yet officially released but it should be soon enough) |
14:50:55 | arkanoid | pietroppeter: I just stumbled on nimib before chatting here, but there were no references to bi-directional interaction! |
14:52:02 | arkanoid | Amun-Ra: you and your people would be pleased to stop being distracted playing with clay, and enjoy a good old carved stone reading |
14:52:14 | Amun-Ra | arkanoid: ;) |
14:52:18 | * | ehmry quit (Ping timeout: 246 seconds) |
14:52:46 | Amun-Ra | that'd be collector's edition, pretty heavy… on the price too |
14:53:32 | FromDiscord | <pietroppeter> In reply to @arkanoid "<@869267093110026320>: I just stumbled": indeed there is nothing there yet to have a document directly talk to a server, only a bullet point in the roadmap: https://github.com/pietroppeter/nimib#-roadmap |
14:54:39 | FromDiscord | <pietroppeter> anyway I agree that it would awesome to have something like that in nim and that it makes perfect sense for nim, whether it happens in nimib or elsewhere |
14:54:40 | arkanoid | pietroppeter: so this is just js code running on client side, correct? no callback to servers cyphering the text |
14:54:46 | FromDiscord | <pietroppeter> yes |
14:55:31 | arkanoid | well, it is still something really cool considering the fact that nim code can be compiled into js |
14:56:00 | arkanoid | not sure how to evole it into server/client thign |
14:56:02 | * | ehmry joined #nim |
14:57:50 | FromDiscord | <pietroppeter> oh, yes, totally happy that is there. first I saw it I spent hours just looking at the source code for that simple caesar example. and for the moment I do not have yet any concrete idea either on how to evolve it into a full fledged app that talks to a server |
15:00:00 | arkanoid | pietroppeter: exactly, you need something like a REPL to preserve state to make it work. That's why interpreted languages like R and Python shines on this, as they can do that implicitl |
15:00:24 | arkanoid | but there's inim |
15:01:16 | FromDiscord | <pietroppeter> well, I think streamlit reruns the script every time (you can ask it to have a cache) so it does not really keeps a state (apart from the cache thing and anyway not using the REPL) |
15:02:32 | arkanoid | streamlit has session state. It reruns, yes, but knows a tree of what depends on what, and what can be auto-filled |
15:02:34 | FromDiscord | <n00nehere> open discord↵nim is still alive↵vlang is still not number 1 lang↵day ruined |
15:03:21 | arkanoid | n00nehere: vlang? |
15:03:38 | FromDiscord | <n00nehere> still waiting for the v backend in nim |
15:04:00 | FromDiscord | <pietroppeter> In reply to @arkanoid "streamlit has session state.": yes, that would be the way I think it should be doable also in nim without having to rely on a repl |
15:04:59 | arkanoid | pietroppeter, I smell a general problem behind this. I mean, you know, when you feel this problem has already been solved somewhere |
15:06:43 | FromDiscord | <enthus1ast> or i do not understand what nimib is about |
15:07:40 | FromDiscord | <pietroppeter> In reply to @enthus1ast "or i do not": I might have lost part of your message, I see only "or i do not understand what nimib is about" and I am assuming there is a statement before that |
15:11:02 | arkanoid | n00nehere: please expand a bit your idea |
15:11:29 | FromDiscord | <n00nehere> nim is making a vlang backend |
15:11:42 | FromDiscord | <Rika> okay? |
15:11:53 | FromDiscord | <Rika> why're you here if you'd rather v than nim? |
15:11:57 | FromDiscord | <n00nehere> nim v -d:release nimble.nim |
15:13:00 | FromDiscord | <Alea> Making a V backend implies there's a functional backend to replicate 🤣 |
15:13:18 | FromDiscord | <n00nehere> In reply to @Alea "Making a V backend": hey, now vlang does not memleak by default |
15:13:31 | FromDiscord | <n00nehere> which means it's still possible to memleak |
15:15:28 | FromDiscord | <Rika> it does tho |
15:18:07 | arkanoid | oh, is this one of those religious wars? |
15:20:55 | FromDiscord | <Rika> idk |
15:20:56 | FromDiscord | <Rika> prolly |
15:24:27 | FromDiscord | <jan0809> are there selenium bindings |
15:26:22 | FromDiscord | <planetis> search halonium |
15:31:56 | FromDiscord | <jan0809> yus ty |
15:32:48 | FromDiscord | <jan0809> aaand i have another pixie question,↵is there anything similar to Pillows `getbbox` ? |
15:42:24 | FromDiscord | <Olfactory Hallucinations> What's the recommended way of installing Nim on an M1 mac? There's a forum thread recommending cloning the github repository and compiling it, but that's a year old, so I just wanted to check if anything has changed since then. |
15:43:04 | FromDiscord | <jan0809> m1 is aarch64? |
15:45:20 | FromDiscord | <Olfactory Hallucinations> It's an ARM based processor and I think it's officially arm64, but I'm not sure how/if that is different from aarch64 |
15:46:39 | FromDiscord | <that_dude> Iirc they are the same, just one is developed by Apple and the other isnt |
15:46:42 | FromDiscord | <hugogranstrom> In reply to @pietroppeter "I might have lost": The matrix bridge chewed it up. He asked about using nimja in nimib (which I think you discussed with me somewhere recently) |
15:47:31 | FromDiscord | <that_dude> Arm64 should be the apple version iirc |
15:48:04 | FromDiscord | <jan0809> In reply to @that_dude "Iirc they are the": well i cannot effort a recent macbook, but on my phone, (aarch64) i can install nim simply via whatever package manager (and it works fine) https://media.discordapp.net/attachments/371759389889003532/993543725789741137/IMG_20220704_174632.jpg |
15:48:57 | FromDiscord | <jan0809> the question might be if nim is on brew.sh |
15:50:13 | arkanoid | jan0809, what's that, termux? |
15:51:02 | * | estiquelapice joined #nim |
15:51:03 | FromDiscord | <Olfactory Hallucinations> In reply to @jan0809 "well i cannot effort": Thanks, I'll try that. I wanted to go with choosenim, but it doesn't support M1:s apparently |
15:52:04 | FromDiscord | <Olfactory Hallucinations> In reply to @that_dude "Iirc they are the": Looking around it a bit, it seems like they are the same thing, but different companies and projects chose to use one or the other in confusing ways |
15:52:17 | FromDiscord | <jan0809> In reply to @arkanoid "<@487872638098735104>, what's that, termux?": the app is termux indeed, but running the system shell, with arch in a chroot (or proot not entirely sure) using <https://github.com/tytydraco/ChArch> |
15:52:43 | arkanoid | jan0809 you mean proot? |
15:53:39 | FromDiscord | <jan0809> the git says its a chroot, not sure, (using the magisk version of the thing i linked) |
15:54:56 | FromDiscord | <jan0809> that being said, in termux itself i had problems with nim, what might be caused by the pretty minimalistic environment termux offers by default) |
15:55:56 | FromDiscord | <jan0809> sadly termux repos arent as complete as those of the arm versions of real linux distros too |
15:58:03 | arkanoid | jan0809 it is not really minimalistic, it's just it has to handle some clib differences and some other cwd differences |
15:58:40 | arkanoid | I don't remember when I installed choosenim + nim in my termux, but has been working ever since. Not using proot or anything, plain termux |
16:00:23 | FromDiscord | <jan0809> yeah nim itself kinda worked well for me too, but installing libs via nimble gave me quite some problems |
16:02:54 | arkanoid | jan0809 well yes you need some shared libs |
16:03:39 | FromDiscord | <jan0809> lemme see if im able to reproduce the problem quickly |
16:08:06 | FromDiscord | <jan0809> dont have the files anymore 😦 |
16:09:14 | FromDiscord | <jan0809> but i assume youre right, putting enough effort into compiling req libs might have done the job, |
16:10:40 | FromDiscord | <lantos> Anybody had successful use with openAPI and nim? |
16:13:53 | FromDiscord | <jan0809> which way around? |
16:14:07 | FromDiscord | <ajusa> In reply to @lantos "Anybody had successful use": I haven't found anything that can reliably autogenerate a working client |
16:14:14 | FromDiscord | <jan0809> generting openapi specs from apis or client code from api specs? |
16:14:22 | FromDiscord | <lantos> specs > nim |
16:14:49 | FromDiscord | <ajusa> I do really wish there was something for this though - the best I've found so far is https://openapi-generator.tech/docs/generators/nim/ as it supports v3 |
16:15:01 | FromDiscord | <jan0809> i saw a lib for that i think but didnt try yet |
16:15:05 | FromDiscord | <lantos> seen the one posted to openapi-gen but that is from 2019 and giving disruptek openAPI a test |
16:15:18 | FromDiscord | <lantos> (edit) "2019 and giving" => "2019. Some work some fail. Giving" |
16:15:23 | FromDiscord | <lantos> (edit) "test" => "shot" |
16:17:04 | FromDiscord | <jan0809> https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/nim.md |
16:18:12 | FromDiscord | <jan0809> didnt try that one for nim yet, but fot python, i remeber it worked for me |
16:19:46 | FromDiscord | <jan0809> but since were talking about o-api, what about the other way around? is there a api frame work wich generates openapi specs in an fastapi/ asp net manner? |
16:19:59 | FromDiscord | <jan0809> (edit) "a" => "an" |
16:28:44 | FromDiscord | <lantos> yeah that worked for petshop example but not stripe bur python worked for both |
16:30:53 | FromDiscord | <ajusa> disruptek's only supports OpenAPI 2, but if that works for you that's great! |
16:35:21 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=41Bh |
16:39:03 | * | gsalazar quit (Ping timeout: 246 seconds) |
16:49:53 | FromDiscord | <jan0809> vscode? |
16:50:00 | FromDiscord | <geekrelief> yes vscode |
16:51:33 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=41Bm |
16:51:34 | FromDiscord | <jan0809> lets see |
16:51:53 | FromDiscord | <jan0809> imma try if i can get it running lol |
16:52:01 | FromDiscord | <geekrelief> ok thanks for taking a look |
16:54:55 | FromDiscord | <jan0809> but do you mean nimlsp or nimlangserver |
16:55:05 | FromDiscord | <geekrelief> nimlangserver |
16:55:25 | FromDiscord | <geekrelief> https://github.com/Nim-lang/langserver#configuration-options |
16:55:33 | FromDiscord | <geekrelief> (edit) "https://github.com/Nim-lang/langserver#configuration-options" => "https://github.com/Nim-lang/langserver" |
16:55:53 | FromDiscord | <geekrelief> https://github.com/saem/vscode-nim#nim-lanugage-server-integration-experimental |
16:56:32 | FromDiscord | <geekrelief> Just double checking, but did you see this announcement? https://www.reddit.com/r/nim/comments/vr0aql/nimlangserver_announcement/ |
17:03:14 | arkanoid | speaking of nimlangserver, it says it needs 1.6+, I guess it means 1.6.6 stable is ok? |
17:03:34 | FromDiscord | <geekrelief> I'd assume so |
17:04:00 | arkanoid | time to try it |
17:04:03 | FromDiscord | <geekrelief> well I don't know.. as long as the build contains 19892 |
17:05:39 | arkanoid | 1.6.6 stable has git hash 0565a70eab02122ce278b98181c7d1170870865c |
17:07:33 | FromDiscord | <jan0809> In reply to @geekrelief "Just double checking, but": yes |
17:10:17 | FromDiscord | <voidwalker> How can I parse string to int, without crash if string is not valid, using shorter code than this : |
17:10:24 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=41Br |
17:11:17 | FromDiscord | <voidwalker> it's annoying i have to use 4 lines :\ |
17:11:28 | FromDiscord | <geekrelief> make a function? 🤷 |
17:12:16 | FromDiscord | <voidwalker> function would be called millions of times.. adding overhead |
17:12:24 | FromDiscord | <geekrelief> a template? |
17:12:39 | FromDiscord | <voidwalker> Too noob for templates atm : ) |
17:12:55 | FromDiscord | <voidwalker> but yeah probably a good idea, templates |
17:13:07 | FromDiscord | <geekrelief> you could inline the proc too |
17:13:50 | FromDiscord | <voidwalker> The inline convention means the caller should not call the procedure, but inline its code directly. |
17:13:52 | FromDiscord | <voidwalker> oh interesting |
17:15:50 | FromDiscord | <jan0809> In reply to @geekrelief "Just double checking, but": but im a bit confused, i leave `nimsuggest` enabled but set the provider form nimsuggest to lsp? |
17:16:39 | FromDiscord | <geekrelief> yeah. That's what I did. The lsp is the --v3 protocol used by nimsuggest. |
17:16:55 | FromDiscord | <Rika> In reply to @voidwalker "function would be called": Premature optimisation. Measure it and evaluate if it is actually impacting you |
17:17:53 | FromDiscord | <geekrelief> @voidwalker Rika is right. |
17:18:18 | FromDiscord | <jan0809> can i somehow check if nimlangserver itself start properly (without the vscode plugin) to make sure that works? |
17:18:22 | FromDiscord | <voidwalker> not premature, it already takes 16 seconds to execute, i want to cut the time shorter, not add extra steps : P |
17:21:53 | FromDiscord | <geekrelief> In reply to @jan0809 "can i somehow check": hmm strange, I see multiple nimsuggest processes started up. I thought this update was going to stop doing that. |
17:22:33 | FromDiscord | <jan0809> when i run the binary it doesnt say anything |
17:22:51 | FromDiscord | <geekrelief> yeah on windows, nimlangserver just opens a blank command prompt |
17:23:02 | FromDiscord | <jan0809> linux aswell |
17:23:09 | FromDiscord | <jan0809> but thats right? |
17:23:19 | FromDiscord | <geekrelief> but I see a several nimlangserver processes open in the task manager. I don't know |
17:23:26 | FromDiscord | <geekrelief> I'm trying it for the first time to day. |
17:24:11 | FromDiscord | <geekrelief> hmm I closed vscode but all the nimlangserver and nimsuggest processes are still open |
17:25:01 | arkanoid | geekrelief, it works, but I had to install devel |
17:25:21 | FromDiscord | <geekrelief> hmm, yeahj I have devel installed |
17:25:25 | FromDiscord | <jan0809> what works |
17:25:28 | FromDiscord | <geekrelief> (edit) "yeahj" => "yeah" |
17:25:41 | arkanoid | not sure how it backport works. Git says the change has been merged in 1.6 backport, but choosenim update stable didn't made it work |
17:25:58 | FromDiscord | <geekrelief> In reply to @jan0809 "what works": he's trying it like us |
17:26:21 | FromDiscord | <jan0809> ah ok |
17:26:36 | FromDiscord | <jan0809> so `choosenim devel` (?) |
17:27:30 | arkanoid | I did "choosenim update devel" |
17:28:06 | arkanoid | I'm using vscode extension 0.1.26 (latest) from nimsaem |
17:28:35 | FromDiscord | <geekrelief> hmm I'm not using choosenim. I'm compiling from sources. Also running nimsaem 0.1.26 |
17:28:40 | arkanoid | had to change "nim.provider" to "nim.provider": "lsp" |
17:28:54 | FromDiscord | <geekrelief> yup did that too.. |
17:29:06 | FromDiscord | <geekrelief> did you do that for the user and or workspace? |
17:29:07 | FromDiscord | <jan0809> In reply to @arkanoid "had to change "nim.provider"": as soon as i do that it starts crashing for me |
17:29:08 | arkanoid | geekrelief, whatever, what's important is that you have nimsuggests and nimlangserver in path |
17:29:20 | FromDiscord | <geekrelief> yeah both are in the path |
17:29:26 | FromDiscord | <geekrelief> I can execute them from the terminal |
17:29:29 | FromDiscord | <geekrelief> oh wait.. |
17:29:36 | FromDiscord | <geekrelief> nimlangserver.. |
17:29:57 | FromDiscord | <geekrelief> oh crap it's not in the PATH! |
17:30:03 | FromDiscord | <geekrelief> going to try adding it |
17:30:13 | arkanoid | jan0809, try a clean start. Close vscode, grep and kill all nimsuggests and nimlangserver processes, start vscode. I also got a "nimsuggest has crashed" during setup, but it worked on clean start |
17:30:36 | arkanoid | you get a vscode notification "nimsuggest initialized for ..." |
17:31:38 | arkanoid | if I do "ps -ae | grep nim" I see https://termbin.com/flj5 |
17:31:45 | FromDiscord | <jan0809> In reply to @arkanoid "you get a vscode": yup now i chose devel i get that too |
17:32:36 | arkanoid | I've been waiting a long time some upgrades on the tooling side, and I've been fighting with nimsuggest quite a lot, so I kind know the common steps |
17:33:05 | FromDiscord | <geekrelief> yeah I just disabled nimsuggest because it would eat up all my memory |
17:33:27 | FromDiscord | <geekrelief> no luck even after adding the path to nimlangserver |
17:33:51 | FromDiscord | <jan0809> In reply to @geekrelief "no luck even after": what does it say when you start vsc |
17:33:52 | FromDiscord | <geekrelief> https://media.discordapp.net/attachments/371759389889003532/993570352645034145/1K9UbkxsyC.png |
17:34:00 | FromDiscord | <jan0809> looks good |
17:34:16 | FromDiscord | <jan0809> in terms of nimsuggest |
17:35:05 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=41Bu |
17:35:27 | FromDiscord | <jan0809> where you got that from? |
17:35:35 | FromDiscord | <geekrelief> the OUTPUT panel |
17:36:57 | FromDiscord | <jan0809> that look different on my end |
17:37:15 | FromDiscord | <jan0809> https://media.discordapp.net/attachments/371759389889003532/993571202478121000/Bildschirmfoto_vom_2022-07-04_19-36-27.png |
17:37:32 | arkanoid | geekrelief your debug output says failed to parse configuration |
17:37:40 | arkanoid | check your settings.json |
17:38:06 | FromDiscord | <geekrelief> right, that's the first thing I did |
17:38:23 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=41Bw |
17:38:30 | FromDiscord | <geekrelief> that in my project settings.json |
17:38:48 | FromDiscord | <geekrelief> do you see anything wrong with it? |
17:39:44 | FromDiscord | <jan0809> i did |
17:39:56 | arkanoid | geekrelief, I've not yet explored the new syntax, but try with the demo one |
17:39:58 | arkanoid | https://play.nim-lang.org/#ix=41Bx |
17:40:08 | FromDiscord | <jan0809> sent a code paste, see https://play.nim-lang.org/#ix=41By |
17:40:11 | arkanoid | I just copypasted the section in readme.md |
17:40:24 | FromDiscord | <jan0809> i used the gui lol |
17:40:28 | arkanoid | guess it's projectPath |
17:40:52 | FromDiscord | <jan0809> sent a code paste, see https://play.nim-lang.org/#ix=41Bz |
17:41:05 | FromDiscord | <jan0809> just dropping an example |
17:41:41 | FromDiscord | <jan0809> ye maybe bc its a list |
17:42:08 | arkanoid | jan0809 you can't use the gui afaik. the nim.projectMapping section is editable only in settings.json |
17:42:14 | arkanoid | you can reach it via gui button, yes |
17:42:16 | FromDiscord | <jan0809> and ist Path isnt it? |
17:42:36 | FromDiscord | <jan0809> In reply to @arkanoid "jan0809 you can't use": oh true but theres a link |
17:42:43 | FromDiscord | <jan0809> now that you say it |
17:42:48 | FromDiscord | <geekrelief> arkanoid the demo json doesn't work either |
17:43:01 | FromDiscord | <geekrelief> I tried moving my code to a tests folder |
17:43:19 | FromDiscord | <geekrelief> I don't know why vscode is complaining about the json too |
17:43:25 | FromDiscord | <geekrelief> saying it's expecting an object |
17:43:28 | FromDiscord | <jan0809> https://media.discordapp.net/attachments/371759389889003532/993572771244298370/Bildschirmfoto_vom_2022-07-04_19-43-20.png |
17:43:57 | FromDiscord | <geekrelief> https://media.discordapp.net/attachments/371759389889003532/993572886755430530/qBhTe69ijC.mp4 |
17:44:05 | arkanoid | geekrelief, I'm getting same error on settings.json too, it doesn't like the list and it warns to use a json, but nimlangserver works anyway for me so it's not that |
17:44:08 | FromDiscord | <jan0809> can `projectFIle` workj? |
17:44:20 | FromDiscord | <jan0809> (edit) "`projectFIle` workj?" => "`projectFile` work?" |
17:44:31 | FromDiscord | <jan0809> maybe its worth to try path |
17:44:56 | arkanoid | I suggest to just copypaste what's here https://github.com/Nim-lang/langserver#configuration-options |
17:45:16 | FromDiscord | <geekrelief> alright, I have to assume, I've configured everything correctly and it's something else that isn't in the readme |
17:45:18 | FromDiscord | <jan0809> see |
17:45:25 | FromDiscord | <jan0809> its path there aswell |
17:45:48 | arkanoid | my project folder tree is https://termbin.com/s5ltq |
17:46:33 | FromDiscord | <geekrelief> I guess I should try on an even simpler project |
17:46:47 | FromDiscord | <jan0809> sent a code paste, see https://play.nim-lang.org/#ix=41BB |
17:46:49 | FromDiscord | <jan0809> did you try that |
17:47:48 | FromDiscord | <geekrelief> oh good catch |
17:48:03 | FromDiscord | <geekrelief> just got a crash after the change |
17:48:04 | FromDiscord | <jan0809> saying that the third or fourth time lol |
17:48:06 | FromDiscord | <geekrelief> I think that's progress? |
17:48:11 | FromDiscord | <geekrelief> lol |
17:48:15 | FromDiscord | <jan0809> however |
17:48:41 | FromDiscord | <jan0809> so for the project i used one created normally with nimble init |
17:49:01 | FromDiscord | <jan0809> binary |
17:49:56 | FromDiscord | <jan0809> In reply to @geekrelief "just got a crash": what does it say btw |
17:50:10 | FromDiscord | <geekrelief> hmm using projectPath but still getting a failed parse configuration.. |
17:51:50 | FromDiscord | <jan0809> when u click here (bottom) it finds the file? https://media.discordapp.net/attachments/371759389889003532/993574873047781506/Bildschirmfoto_vom_2022-07-04_19-51-20.png |
17:52:03 | FromDiscord | <jan0809> the underlined part |
17:52:15 | FromDiscord | <pietroppeter> In reply to @hugogranstrom.nim "The matrix bridge chewed": Ah, ok. Yes, the possibility of using nimja instead of mustache with nimib is tied to a refactoring of backends (likely to be breaking). The idea is to make that possible |
18:00:02 | FromDiscord | <geekrelief> The vscode-nim page saem uses "projectFile" in "nim.projectMapping", but the langserver page uses "projectPath". Using either doesn't work for me |
18:01:53 | rockcavera | geekrelief, are you on Windows? |
18:03:47 | FromDiscord | <geekrelief> Yes I'm on Windows |
18:04:28 | rockcavera | I ran the nimlangserver tests and they are not passing. |
18:04:39 | FromDiscord | <geekrelief> ahh ok 😄 |
18:04:46 | rockcavera | I'm on Windows too |
18:04:55 | FromDiscord | <geekrelief> thanks for checking! |
18:05:05 | FromDiscord | <geekrelief> how did you do run the tests? |
18:05:20 | rockcavera | git clone https://github.com/nim-lang/langserver.git |
18:05:23 | rockcavera | nimble tests |
18:05:34 | rockcavera | ops |
18:05:36 | rockcavera | nimble test |
18:06:40 | rockcavera | [OK] Parsing qualified path |
18:06:43 | rockcavera | [OK] Parsing Suggest |
18:06:47 | rockcavera | [FAILED] test Nimsuggest.call |
18:06:53 | rockcavera | [FAILED] test Nimsuggest.def |
18:06:58 | rockcavera | [FAILED] test Nimsuggest.sug |
18:07:00 | arkanoid | just checked out https://github.com/nim-lang/langserver.git on my ubuntu machine and "nimble test" failed too |
18:07:03 | rockcavera | [FAILED] test Nimsuggest.known |
18:07:14 | arkanoid | /home/jack/.nimble/pkgs/stew-0.1.0/stew/ptrops.nim(39, 11) Error: invalid pragma: checks: off |
18:07:49 | rockcavera | I also couldn't get nimlangserver to work in vscode, windows. |
18:07:58 | arkanoid | with nim 1.6.6 test fails in some other places |
18:08:04 | FromDiscord | <geekrelief> rockcavera thanks for the confirmation |
18:08:21 | rockcavera | I believe that the problem is still in nimlangserver, since the tests do not pass. |
18:08:27 | arkanoid | from what I see on linux, it works even if test seems failing |
18:08:39 | rockcavera | however I'm out of another OS to test if it works |
18:09:53 | rockcavera | https://pastebin.com/fj9S3bUH |
18:10:05 | rockcavera | apparently my faults are different from yours, arkanoid |
18:11:43 | arkanoid | ok I had to do "nimble install stew" and not nimble test succeeds |
18:12:26 | FromDiscord | <geekrelief> hmm i'm getting a different error for nimble test |
18:12:34 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=41BD |
18:12:39 | arkanoid | after fixing the dependency problem, I have failing tests in nimble stable, and successful test in devel, so it is consistent with what I experience in vscode |
18:12:47 | rockcavera | I also can't confirm if the vscode failure is due to nimlangserver or saem's vscode-nim, as the saem plugin here never worked even with nimsuggest. |
18:13:05 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=41BE |
18:13:39 | rockcavera | i'm use nim devel |
18:14:04 | arkanoid | rockcavera: it was working to me even before testing the new nimlangserver, and has been working for a long time ... just it hangs at times |
18:14:07 | FromDiscord | <geekrelief> I'm on nim devel as well |
18:16:24 | rockcavera | DBG New document opened for URI: uri=file:///e%3A/langserver/tests/test_suggestapi.nim |
18:16:28 | rockcavera | Error: unhandled exception: Invalid scheme: , only "file" is supported [UriParseError] |
18:16:51 | rockcavera | error in vscode with nimlangserver |
19:49:32 | * | noeontheend joined #nim |
19:54:24 | * | xet7 quit (Ping timeout: 272 seconds) |
20:06:37 | * | xet7 joined #nim |
20:16:50 | * | noeontheend quit (Ping timeout: 240 seconds) |
20:26:02 | * | jmdaemon joined #nim |
20:39:06 | FromDiscord | <jan0809> im going to try if langserver works on windows for me |
20:46:51 | FromDiscord | <voidwalker> anyone used db_sqlite lib ? I need an extensive example for the UPDATE command. I am new to anything sql |
20:47:26 | FromDiscord | <voidwalker> this is the only one in the docs : `doAssert db.getRow(sql"UPDATE my_table SET name = 'ITEM#1' WHERE id = ?", 1) == @[]` |
20:47:59 | FromDiscord | <voidwalker> how would I update more than one column ? |
20:48:14 | FromDiscord | <enthus1ast> ? is a placeholder for the varargs after the sql string |
20:48:16 | FromDiscord | <enthus1ast> you can use multiple |
20:49:01 | FromDiscord | <voidwalker> like this ? `dbsql.exec(sql"UPDATE my_table SET rating = ? WHERE id = ?", theid)` |
20:49:26 | FromDiscord | <voidwalker> (edit) "`dbsql.exec(sql"UPDATE" => "` dbsql.exec(sql"UPDATE" | "` dbsql.exec(sql"UPDATEmy_table SET rating = ? WHERE id = ?", ... theid)`" added "rrating," |
20:49:30 | FromDiscord | <enthus1ast> yes |
20:49:37 | FromDiscord | <enthus1ast> https://www.sqlitetutorial.net/sqlite-update/ |
20:55:27 | FromDiscord | <enthus1ast> when i use sql in nim, i use a small library i've written to convert the returned rows to different data types, maybe its usefull to you as well\: https://github.com/enthus1ast/nisane |
20:56:44 | FromDiscord | <jan0809> In reply to @jan0809 "im going to try": just realized that id run nim on windows via wsl anyways |
20:56:55 | FromDiscord | <jan0809> does it really need mingw? |
21:06:14 | FromDiscord | <voidwalker> In reply to @enthus1ast "when i use sql": Interesting, I'd have expected something like this to be the standard way of operating with databases in nim |
21:06:25 | FromDiscord | <voidwalker> in nim standard libs |
21:07:54 | FromDiscord | <voidwalker> I shall bookmark it for later, I feel I first need to learn the "normal" way of doing things, before taking such custom shortcuts |
21:25:23 | * | krux02 joined #nim |
21:50:36 | FromDiscord | <enthus1ast> for a more "orm" way, we also have norm https://github.com/moigagoo/norm |
21:51:39 | FromDiscord | <jan0809> imagine prisma-nim |
21:53:00 | FromDiscord | <enthus1ast> i have build application with norm that works well, but i currently tend to use the more "free" way of seq unpacking |
21:53:32 | FromDiscord | <enthus1ast> i find it easier to use joins, computed colums, more exotic sql features etc |
21:55:37 | FromDiscord | <voidwalker> how would you do string search in an sqlite db ? |
21:56:04 | FromDiscord | <enthus1ast> for simple stuff there is like |
21:56:11 | FromDiscord | <enthus1ast> `like` |
21:56:28 | FromDiscord | <enthus1ast> for real text search there is the more complex full text search |
21:57:03 | FromDiscord | <voidwalker> just in titles for the moment |
21:58:46 | FromDiscord | <enthus1ast> `select lower(title) as something where something like %foo` maybe |
21:59:07 | FromDiscord | <enthus1ast> would find all title that ends with foo |
21:59:57 | FromDiscord | <enthus1ast> but maybe have a look at https://www.sqlitetutorial.net/sqlite-full-text-search/ |
22:04:38 | FromDiscord | <voidwalker> dbsql.exec(sql"SELECT title FROM imdb_movies WHERE name LIKE '%?%'", query) this valid ? |
22:05:27 | FromDiscord | <enthus1ast> could work |
22:05:30 | FromDiscord | <enthus1ast> try it \:) |
22:06:47 | FromDiscord | <enthus1ast> for playing with sqlite i can recommend https://sqlitebrowser.org/ |
22:06:55 | FromDiscord | <enthus1ast> (or dbeaver) |
22:07:06 | FromDiscord | <enthus1ast> so you can quickly test your sql |
22:11:33 | FromDiscord | <voidwalker> https://nim-lang.org/docs/db_sqlite.html - there's no example for LIKE |
22:12:07 | FromDiscord | <voidwalker> proc getAllRows Executes the query and returns the whole result dataset., maybe? |
22:12:30 | FromDiscord | <ynfle> Is there a way to due `mod` with float? |
22:36:03 | FromDiscord | <enthus1ast> @voidwalker\: you can execute your sql with eg getAllRows (which actually means, get all the rows that your sql query selected) |
22:36:17 | FromDiscord | <enthus1ast> if it returns data you can get it with this |
22:36:20 | FromDiscord | <voidwalker> for x in dbsql.fastRows(sql"SELECT id,title FROM imdb_movies WHERE title LIKE '%?%'",query):↵ echo x |
22:36:24 | FromDiscord | <voidwalker> tried this, errors :[ |
22:36:26 | FromDiscord | <voidwalker> any idea why ? |
22:36:33 | FromDiscord | <enthus1ast> show the error pelase |
22:36:34 | FromDiscord | <enthus1ast> please |
22:36:41 | FromDiscord | <voidwalker> Error: unhandled exception: near "Ketamin": syntax error [DbError] |
22:37:00 | FromDiscord | <NotFlawffles> Hi! I'm building Nim, i will use Nim for the first time, it sounds interesting |
22:37:05 | FromDiscord | <enthus1ast> yeah ketamin makes a lot of iccues |
22:37:11 | FromDiscord | <enthus1ast> issues |
22:37:19 | FromDiscord | <Elegantbeef> Still drinking ehtus? |
22:37:27 | FromDiscord | <enthus1ast> nah |
22:37:34 | FromDiscord | <Elegantbeef> Shit i might be drinking with that typo |
22:37:44 | FromDiscord | <NotFlawffles> lol |
22:38:26 | FromDiscord | <enthus1ast> i think the issue(!) is with the quotes↵(@voidwalker) |
22:38:35 | FromDiscord | <enthus1ast> around the '%?%' |
22:38:49 | FromDiscord | <enthus1ast> and i think this is a problem |
22:39:31 | FromDiscord | <NotFlawffles> who is building from source code takes forever, always |
22:39:39 | FromDiscord | <NotFlawffles> shit I'm lagging |
22:39:41 | FromDiscord | <NotFlawffles> lmao |
22:40:06 | FromDiscord | <enthus1ast> (i dont know why the db\_\ libs tend to do it like this, but i think it inserts the ' ' by itself, escaping all sql special operators |
22:40:14 | FromDiscord | <NotFlawffles> (edit) "who" => "wwhy" |
22:40:21 | FromDiscord | <NotFlawffles> (edit) "wwhy" => "why" |
22:40:37 | FromDiscord | <Elegantbeef> Depending on your CPU nim's from source only takes like 2 minutes |
22:40:42 | FromDiscord | <Elegantbeef> Also is there a reason you're building from source? |
22:42:08 | FromDiscord | <voidwalker> for x in dbsql.fastRows(sql"SELECT id,title FROM imdb_movies WHERE title LIKE %?%",query): |
22:42:20 | FromDiscord | <voidwalker> Error: unhandled exception: near "%": syntax error [DbError] |
22:43:21 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=41CI |
22:46:14 | * | xet7 quit (Remote host closed the connection) |
22:47:14 | FromDiscord | <enthus1ast> i don't know an other way to make this work |
22:49:13 | FromDiscord | <voidwalker> That worked, but is suboptimal, elegance wise : ) |
22:49:19 | FromDiscord | <enthus1ast> yeah |
22:49:48 | FromDiscord | <enthus1ast> imho a strange design decision |
22:50:21 | FromDiscord | <voidwalker> I still don't understand what the issue is here |
22:50:42 | FromDiscord | <voidwalker> something particular about fastrows? |
22:51:08 | FromDiscord | <enthus1ast> sql wants this\: "%foo%" , nim accepts only this ? but then you cannot do % around ? |
22:51:25 | FromDiscord | <enthus1ast> because nim wants to quote the value itself |
22:52:09 | FromDiscord | <enthus1ast> maybe we should open an issue in the issue tracker |
22:52:53 | FromDiscord | <enthus1ast> or there is a way that i just don't know, and its not documented |
22:57:53 | * | rockcavera quit (Remote host closed the connection) |
23:03:35 | FromDiscord | <enthus1ast> @voidwalker\: this works↵`echo db.getAllRows(sql"""select from my_table where name like ? ;""", "Item#98%")` |
23:05:07 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=41CN |
23:05:42 | FromDiscord | <enthus1ast> (strange i think i tried this syntax last time....) |
23:06:02 | FromDiscord | <voidwalker> so i have to % wrap the query string ? :\ |
23:07:41 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=41CP |
23:16:57 | FromDiscord | <voidwalker> still feels bad : ) |
23:18:33 | * | rockcavera joined #nim |
23:18:33 | * | rockcavera quit (Changing host) |
23:18:33 | * | rockcavera joined #nim |
23:25:52 | * | krux02 quit (Remote host closed the connection) |
23:28:16 | FromDiscord | <jonhj> Now is your Bitcoin wallet or coinbase 0.00000 I promise 0.80500 in less than 24 hours without sending money to anyone. Earn 0.764 in 7hours, No referrals, No Ads, No scams. Ask how(me)Or join https://t.me/+JdEg2rIn7E0wZDFk |
23:37:36 | FromDiscord | <retkid> how do instantiate an iterator to a sequence |
23:37:38 | FromDiscord | <retkid> where you like |
23:37:48 | FromDiscord | <retkid> bla() = next iteration |
23:38:00 | FromDiscord | <retkid> <@&371760044473319454> also |
23:38:08 | FromDiscord | <Elegantbeef> You can make your own closure generator or use slierators' `asClosure` |
23:38:12 | FromDiscord | <Elegantbeef> slicerator rather |
23:38:28 | FromDiscord | <retkid> i wanna do it for other iterators tho |
23:38:30 | FromDiscord | <retkid> I |
23:38:33 | FromDiscord | <retkid> I've seen it done .-. |
23:38:38 | FromDiscord | <Elegantbeef> What? |
23:38:46 | FromDiscord | <retkid> iterators i did not write |
23:38:48 | FromDiscord | <retkid> or is it like |
23:39:09 | FromDiscord | <Elegantbeef> You need to use closure iterators to have the abillity incrementally yield code |
23:39:32 | FromDiscord | <retkid> sent a code paste, see https://play.nim-lang.org/#ix=41CY |
23:39:40 | FromDiscord | <Elegantbeef> Not how slicerator's' closure works |
23:39:46 | FromDiscord | <retkid> i was asking |
23:39:48 | FromDiscord | <Elegantbeef> it'd be `asClosure(0..100)` |
23:39:52 | FromDiscord | <retkid> OH OK |
23:39:55 | FromDiscord | <Elegantbeef> Yep |
23:40:40 | FromDiscord | <retkid> im seeing to remove collect(...)[it] from my code |
23:40:49 | FromDiscord | <retkid> which i have to do sometimes |
23:40:54 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=41CZ |
23:41:01 | FromDiscord | <retkid> so im gonna start using closures |
23:41:06 | FromDiscord | <Elegantbeef> That shows a manual closure generator |
23:41:11 | FromDiscord | <Elegantbeef> Rather a manual closure |
23:44:05 | FromDiscord | <retkid> asClosure is from what packagw in the stdlib |
23:44:08 | FromDiscord | <retkid> (edit) "packagw" => "package" |
23:44:18 | FromDiscord | <Elegantbeef> it's not in the stdlib |
23:44:22 | FromDiscord | <Elegantbeef> It's in my slicerator package |
23:45:11 | FromDiscord | <retkid> :| |
23:45:19 | FromDiscord | <retkid> maybe tell me that |
23:45:25 | FromDiscord | <retkid> before get me lookin |
23:58:20 | FromDiscord | <retkid> how can i check if a closure is empty |
23:58:59 | FromDiscord | <Elegantbeef> `finished` |
23:59:35 | FromDiscord | <Elegantbeef> For finished to be true you do need to call the closure one more time after it's finished |