<< 04-07-2022 >>

00:00:18FromDiscord<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:50FromDiscord<TryAngle> So how would those two things "fight" each other
00:04:34FromDiscord<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:55FromDiscord<TryAngle> (edit) "seq[u8]" => "seq[uint8]"
00:37:11FromDiscord<Elegantbeef> It's not any better it's just a present standard usage
00:37:45FromDiscord<Elegantbeef> It kills it off cause there are two ways to implement a unicodestr with their own benefits each
00:38:03FromDiscord<Elegantbeef> you can do `seq[Rune]` or `seq[char]` internally
00:40:16FromDiscord<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:47FromDiscord<!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:49FromDiscord<!Patitotective> (edit) "Digits`" => "Digits`↵?"
01:49:00FromDiscord<!Patitotective> maybe `rune >= Rune('0') and rune <= Rune('9')`
01:49:46FromDiscord<!Patitotective> (edit) ">=" => ">=%" | "<=" => "<=%"
01:55:25FromDiscord<Elegantbeef> `rune in '0'.ord .. '9'.ord`
01:55:44FromDiscord<Elegantbeef> `rune.distinctBase` probably
01:55:51FromDiscord<Elegantbeef> But arent there also unicode numbers that are non ascii
02:04:39FromDiscord<Rika>
02:04:44FromDiscord<Rika>
02:04:47FromDiscord<Rika>
02:04:54FromDiscord<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:50FromDiscord<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:59FromDiscord<j-james> does nim have any packages like https://docs.rs/trees/0.3.0/trees/ ?
03:11:11FromDiscord<huantian> I swear there is one and I can’t remember the name
03:11:14FromDiscord<j-james> i've only found binary/balancing trees, not any that preserve the parent-child structure
03:13:49FromDiscord<j-james> i feel like there may be some other name for them that i'm unaware of 🙁
03:14:10FromDiscord<Elegantbeef> I'm dumb so it just looks like a linked list to me
03:14:14FromDiscord<Elegantbeef> Rather node graph
03:21:49*xet7 joined #nim
03:29:39FromDiscord<j-james> it might be?
03:29:47FromDiscord<j-james> each node just has to have a singular (or no) parent, and an arbitrary amount (including none) of children
03:29:54FromDiscord<j-james> and information attached
03:30:18FromDiscord<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:50FromDiscord<Rika> It says there, child sibling linked tree
03:58:58FromDiscord<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:44FromDiscord<Phil> Just learned about `dumpAstGen`, looks pretty neat!
05:05:57FromDiscord<Prestige> Wasn't someone developing a library for science or something? I remember seeing posts about it, can't remember the name
05:06:52FromDiscord<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:09FromDiscord<Prestige> ah that's what I was looking for, thanks
05:09:52FromDiscord<Prestige> I think interfacing with R would be pretty huge
05:10:32*pch joined #nim
05:43:51NimEventerNew 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:22FromDiscord<ajusa> oh wow that's great news
05:59:32FromDiscord<Phil> I am unsure what this will mean for the vscode extension
06:00:20FromDiscord<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:49FromDiscord<ajusa> The main issue I've seen folks complain about is that it was possible for nimsuggest to get stuck
06:00:59FromDiscord<ajusa> which would lead to 100% CPU usage until you killed it
06:01:16FromDiscord<ajusa> As this runs separate processes, it can manage them better and kill ones that don't respond
06:01:47FromDiscord<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:05FromDiscord<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:49FromDiscord<Prestige> Working well for me so far
06:18:34FromDiscord<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:00FromDiscord<Phil> Well looking into that later
06:19:24FromDiscord<Phil> (edit) "Well" => "Well,"
06:28:28FromDiscord<Elegantbeef> the V3 of nimsuggest hasnt landed in stable right?
06:31:38*pch quit (Remote host closed the connection)
06:35:37FromDiscord<Tanguy> Apparently it's been backported to 1.6
06:36:04FromDiscord<Elegantbeef> Yea but it's not 1.6.8 yet
06:36:17FromDiscord<Prestige> https://github.com/nim-lang/Nim/pull/19892
06:36:48FromDiscord<huantian> does this mean sematic highlighting 🥺
06:37:04FromDiscord<Elegantbeef> Not yea afaik
06:37:37FromDiscord<Phil> Ah so I'll notice any changes once v3 actually starts shipping with nim, or I swap to devel ?
06:37:53FromDiscord<Elegantbeef> And when you enable it in your editor
06:37:57FromDiscord<Phil> Check
06:38:09FromDiscord<Elegantbeef> Presently doesnt seem to work with kate
06:38:46FromDiscord<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:37FromDiscord<Elegantbeef> Works fine here
06:42:43FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/993406486275436554/image.png
06:42:54FromDiscord<Elegantbeef> I had to improvise though
06:45:29FromDiscord<Elegantbeef> Actually the langserver does work with kate just not the typical nimble directory it seems...?
06:49:56FromDiscord<ajusa> In reply to @Elegantbeef "Works fine here": well shoot
06:56:01FromDiscord<demotomohiro> @That error message looks like came from shader. Could you find which shader generating the error?
06:56:19FromDiscord<demotomohiro> @ajusa
06:56:35FromDiscord<ajusa> It's happening somewhere internally in Windy
06:57:00FromDiscord<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:23FromDiscord<ajusa> (edit) "It's happening somewhere internally in Windy ... " added "or Boxy"
06:58:18FromDiscord<Elegantbeef> Is it possible you have a bad version of one of the packages
06:58:26FromDiscord<ajusa> I hope not
06:58:37FromDiscord<ajusa> I install everything at head
06:59:06FromDiscord<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:56FromDiscord<b1rdf00d> Is this the right place to ask for help RE pull requests / failing tests?
07:23:28FromDiscord<Elegantbeef> You can ask and some may help
07:29:44FromDiscord<d4rckh> i cant close a tcp socket while im waiting to receive something?
07:33:45FromDiscord<Elegantbeef> No clue it'd make sense that it'd raise an error and stop it
07:34:52FromDiscord<b1rdf00d> sent a long message, see http://ix.io/41zm
07:35:52FromDiscord<b1rdf00d> actually I'm not sure how to work out which test is failing
07:35:56FromDiscord<Elegantbeef> I just checked and posix isnt enabled with windows yes
07:36:00FromDiscord<Elegantbeef> What's the PR?
07:36:14FromDiscord<Elegantbeef> Oh wait that was the PR i thought that was an issue
07:36:15FromDiscord<Elegantbeef> my bad
07:37:16FromDiscord<Elegantbeef> is that `exit` command windows' shell compliant?
07:38:23FromDiscord<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:52FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=41zn
07:39:59FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=41zo
07:40:48FromDiscord<Elegantbeef> It's clearly searching for a binary
07:41:37FromDiscord<b1rdf00d> ^ is that Windows?
07:41:42FromDiscord<Elegantbeef> Wine
07:41:50FromDiscord<b1rdf00d> _ah_ that's a good idea
07:42:00FromDiscord<Elegantbeef> If you have mingw and wine installed you can do `nim c -r -d:mingw ./test.nim`
07:42:13FromDiscord<Elegantbeef> You want to use `execShellCmd`
07:42:34FromDiscord<Elegantbeef> `execCmd` does not run in the shell
07:43:37FromDiscord<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:48FromDiscord<d4rckh> i closed all the clients connected to the tcp server individually and now i get a different error
07:43:52FromDiscord<Elegantbeef> Remember i was the one that pointed you to the issue?
07:43:55FromDiscord<d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=41zp
07:44:11FromDiscord<b1rdf00d> In reply to @Elegantbeef "Remember i was the": I do yep! But I may not have understood what you meant
07:44:27FromDiscord<b1rdf00d> (I'm surprised you remember given how many issues you field on here)
07:44:28FromDiscord<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:04FromDiscord<Elegantbeef> Welcome to Nim's async
08:02:53FromDiscord<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:37FromDiscord<Phil> That's why async I've seen so far. Stacktraces tend to become useless in its wake in general
08:03:50FromDiscord<Phil> (edit) "why" => "every"
08:04:00FromDiscord<Elegantbeef> Eventually someone will fix it
08:04:12FromDiscord<Phil> Similar issues in java stacktraces
08:04:22FromDiscord<Phil> When dealing with async
08:04:34FromDiscord<Phil> So I'm not holding out hope
08:05:05FromDiscord<Elegantbeef> The difference is Nim's async is in macros so the traces can be cleaned by some brave soul!
08:13:20FromDiscord<zhmtzhmt> How can I debug c++ code compiled by pragma "{.compile: "MapGen2.cpp".}", ↵break point marked in cpp file does not work.
08:27:21FromDiscord<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:16FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=41zu
08:31:34FromDiscord<Elegantbeef> incremental compilation is still very early
08:32:20FromDiscord<jmgomez> do you know if there is a place to track the work done?
08:32:31FromDiscord<Rika> Probably the issues tracker
08:33:48FromDiscord<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:57FromDiscord<Elegantbeef> It probably will but until then the new nimsuggest protocol version will help a lot
08:40:13FromDiscord<jmgomez> Oh didnt know they were already efforts to improve nimsuggest too. That's great
08:47:13FromDiscord<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:10FromDiscord<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:36FromDiscord<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:32FromDiscord<fwsgonzo> which Nim library can help me add a watermark to an image?
09:01:36FromDiscord<fwsgonzo> its a simple blending operation
09:01:41FromDiscord<Elegantbeef> pixie
09:01:51FromDiscord<fwsgonzo> thanks
09:01:54FromDiscord<enthus1ast> @d4rckh\: as far as i know, a so\_linger of 0 forcefully terminates a tcp connection
09:02:55FromDiscord<Luckayla> Did you have to let it linger?
09:04:47FromDiscord<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:15FromDiscord<enthus1ast> and if a participant cannot answer in time you clean up
09:05:45FromDiscord<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:07FromDiscord<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:08FromDiscord<enthus1ast> what i sometimes do to circumvent this is that i just open new connections for a long running task
09:13:30FromDiscord<enthus1ast> another option is to just have one receiver that receives data, then it completes a callback that your initiator set
09:14:08FromDiscord<enthus1ast> then you have another issue though, so that, if not answer was received, the callback is never fullfilled, but stalls, ....
09:14:11FromDiscord<enthus1ast> yeah
09:14:15FromDiscord<enthus1ast> networking is fun
09:17:13FromDiscord<fwsgonzo> which API function in pixie can performan an operation on two images?
09:21:21FromDiscord<enthus1ast> masking mabye? @fwsgonzo https://github.com/treeform/pixie/blob/master/examples/masking.nim
09:23:03FromDiscord<enthus1ast> or blending?
09:23:56FromDiscord<fwsgonzo> thanks, but yeah, exactly - I am trying to blend two images - but the BlendMode is not mentioned much in the API
09:24:08FromDiscord<fwsgonzo> I would have thought (for example) that drawImage could take a BlendMode
09:24:08*CyberTailor quit (Ping timeout: 268 seconds)
09:24:43FromDiscord<enthus1ast> have not used pixie that much to be honest, but could you maybe call draw 2 time?
09:24:53FromDiscord<enthus1ast> one for your background, the other one for your whatermakr
09:25:00FromDiscord<enthus1ast> watermark
09:25:04FromDiscord<fwsgonzo> I am wondering that too, if I start with one image, set a "global" blend mode, and then draw the other
09:26:25FromDiscord<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:57FromDiscord<fwsgonzo> It was masking, I guess: https://nimdocs.com/treeform/pixie/pixie/images.html#draw,Image,Mask
09:31:12FromDiscord<fwsgonzo> not sure why they call it that, afaik masks are binary
09:46:45FromDiscord<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:18FromDiscord<enthus1ast> i came up with that\: https://play.nim-lang.org/#ix=41zJ
09:47:25FromDiscord<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:41FromDiscord<enthus1ast> yeah the exceptions bubble up to runForever↵(@d4rckh)
09:47:58FromDiscord<enthus1ast> but they're raised deeper in your app
09:48:18FromDiscord<d4rckh> well they dont get caught
09:48:24FromDiscord<d4rckh> (edit) "well they dont get caught ... " added "if i wrap the try block around the recvLine"
09:50:24FromDiscord<enthus1ast> can you share the stacktrace?↵(@d4rckh)
09:51:40FromDiscord<d4rckh> sent a code paste, see https://paste.rs/SO2
09:52:49FromDiscord<enthus1ast> okay this does not help \:)
09:52:49FromDiscord<enthus1ast> server.nim 77 is runForever i guess? \:)
09:53:07FromDiscord<d4rckh> correct
09:54:06FromDiscord<enthus1ast> have you also guarded the send?
09:55:32FromDiscord<d4rckh> yes but it probably wont help?
09:55:48FromDiscord<d4rckh> yup it doesnt
09:57:28FromDiscord<enthus1ast> can you share the code?
10:00:45FromDiscord<Prestige> There's no way to set a sort of "global" indentation for subsequent echo calls, is there?
10:01:59FromDiscord<enthus1ast> @Prestige\: no guess you must overload your echo
10:02:05FromDiscord<enthus1ast> or do your own
10:02:25FromDiscord<Prestige> Cool just checking before I do my own thing
10:26:11*lumo_e quit (Ping timeout: 255 seconds)
10:32:03FromDiscord<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:36FromDiscord<Goel> sent a code paste, see https://play.nim-lang.org/#ix=41zW
11:24:35FromDiscord<Rika> k = ($i).cstring
11:25:44FromDiscord<Goel> Oh... i tried that like this: `k = $i.cstring` earlier, i wasn't aware it needs the parenthesis
11:26:31FromDiscord<jan0809> eh https://lunduke.substack.com/p/a-linux-kernel-module-written-in
11:27:25FromDiscord<jan0809> since when scratch compiles to cpp
11:32:36FromDiscord<Rika> #offtopic
11:34:31FromDiscord<jan0809> true
11:42:20*jmd_ quit (Ping timeout: 260 seconds)
11:45:23FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=41A3
11:46:20FromDiscord<TryAngle> ah ok, sets require ordinal types and rune is not rodinal
11:46:26FromDiscord<TryAngle> but why is rune not ordinal?
11:47:59FromDiscord<demotomohiro> https://nim-lang.org/docs/manual.html#types-set-type
11:48:33FromDiscord<demotomohiro> !eval import unicode; var s: set[Rune]
11:48:35NimBotCompile failed: /usercode/in.nim(1, 27) Error: set is too large
11:49:01FromDiscord<Rika> runes are max 32 bit right? i forgot
11:49:03FromDiscord<TryAngle> ah I remember sets are basically big arrays?
11:49:14FromDiscord<TryAngle> (edit) "arrays?" => "arrays that a "prefilled"?"
11:49:16FromDiscord<Rika> sets are bit sets
11:49:23FromDiscord<Rika> so that means it needs as many bits as there are elements
11:49:34FromDiscord<Rika> so if you have a 16 bit value, you need a 2^16 bit set
11:49:46FromDiscord<TryAngle> ye that's what I mean
11:50:07FromDiscord<TryAngle> ok, then I want to use array anyways
11:50:20FromDiscord<demotomohiro> !eval import unicode; echo sizeof(Rune)
11:50:24NimBot4
11:51:05FromDiscord<Rika> use a hashset
11:51:23FromDiscord<xflywind> Internally big sets are arrays, small sets are numbers.
11:53:25FromDiscord<xflywind> !eval var s: set[int32]
11:53:27NimBotCompile failed: /usercode/in.nim(1, 11) Error: set is too large
11:59:37FromDiscord<TryAngle> how can i type unicode characters in nim strings?
11:59:43FromDiscord<TryAngle> (edit) "how can i type unicode characters ... in" added "as id"
12:00:24FromDiscord<TryAngle> I want to add special diacritcs
12:00:33FromDiscord<TryAngle> for example: "a\030"
12:02:49FromDiscord<TryAngle> oh nvm I'm stupid I misstyped .... ...... .... .. .. .. . .. .. .....
12:06:06FromDiscord<planetis> you can get around that by declaring a range
12:06:36FromDiscord<planetis> !eval echo {range[0..2](2)}
12:06:39NimBot{2}
12:09:30FromDiscord<demotomohiro> This keyboard can type any unicode characters! https://twitter.com/hsgw/status/1543866246617526275
12:10:13FromDiscord<jan0809> ergonomic
12:15:41FromDiscord<Emmanuel M. Smith> Will the new Mastering Nim book be available in PDF at some point?
12:33:30FromDiscord<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:49FromDiscord<aph> does staticRead means that the file will be in the binary? thanks
12:42:10FromDiscord<Rika> The file contents will be
12:42:43FromDiscord<aph> oh awesome that's what i want thanks
12:53:22FromDiscord<jan0809> In reply to @planetis "No idea, I am": it used to be at around 40€ some days
12:55:30FromDiscord<fwsgonzo> sent a code paste, see https://play.nim-lang.org/#ix=41Ah
12:55:36FromDiscord<Rika> What is the code
12:56:21FromDiscord<fwsgonzo> sent a code paste, see https://play.nim-lang.org/#ix=41Ai
12:56:59FromDiscord<Rika> And what does callback return
12:57:05FromDiscord<fwsgonzo> int, string, string
12:57:21FromDiscord<Rika> Explicitly convert b into a c string then
12:57:30FromDiscord<fwsgonzo> cstring(a) ?
12:57:33FromDiscord<Rika> B
12:57:41FromDiscord<Rika> And a I guess yeah
12:58:13FromDiscord<fwsgonzo> alright, that was easy 🙂 thanks 👍
13:23:36FromDiscord<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:17FromDiscord<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:08FromDiscord<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:10FromDiscord<ynfle> Are there irc logs for channels other than main?
13:34:33FromDiscord<enthus1ast> [fbpyr](https://matrix.to/#/@fbpyr:tchncs.de)\: https://stackoverflow.com/questions/6924195/get-dll-path-at-runtime
13:36:13FromDiscord<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:18FromDiscord<trevor> lol, found the code. Thanks!
13:40:12FromDiscord<demotomohiro> In reply to @trevor "Ah, so <@288750616510201856> `slot0`,": I think `slot0`, `slot1` is something related to `T`, not language feature.
13:41:36FromDiscord<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:39FromDiscord<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:06FromDiscord<enthus1ast> huh .net?
13:42:45FromDiscord<fbpyr> oh wait they are of different langs..
13:42:55FromDiscord<fbpyr> sry
13:47:08FromDiscord<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:06arkanoiduh? new book?
14:00:56FromDiscord<demotomohiro> @Arkanoid https://forum.nim-lang.org/t/9259
14:03:58FromDiscord<xflywind> And more are to come.
14:03:58arkanoidwow, I will never buy it
14:05:17FromDiscord<!Patitotective> In reply to @Elegantbeef "But arent there also": yea but i dont care about thoes hehe
14:05:23arkanoidI read technical book in my work time, while on the move, and I have space/weight limitations. What a bad decision :(
14:06:12arkanoidxflywind, what do you mean?
14:06:15FromDiscord<planetis> In reply to @flywind "And more are to": more books?
14:09:49FromDiscord<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:32FromDiscord<xflywind> In reply to @planetis "more books?": Yeah https://discord.com/channels/371759389889003530/768367394547957761/991387438062764032
14:14:39FromDiscord<xflywind> https://forum.nim-lang.org/t/9259#60641
14:15:05FromDiscord<xflywind> In reply to @arkanoid "<@658563905425244160>, what do you": https://forum.nim-lang.org/t/9259#60641
14:15:57arkanoidxflywind, oh! planned. Good to know
14:16:01FromDiscord<planetis> Books are cool, but if they are so expensive...
14:16:58arkanoidproblem is not price, is usability
14:17:15FromDiscord<planetis> what usability?
14:18:18FromDiscord<ynfle> Is it better to ask arraymancer questions here of in #science?
14:18:33FromDiscord<planetis> pbl science
14:23:03FromDiscord<ynfle> What are the circumstances where `var a = b` where b is declared as a let object wouldn't produce a copy
14:23:09FromDiscord<ynfle> ?
14:23:40FromDiscord<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:48FromDiscord<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:21FromDiscord<Phil> It would not bea copy of the original data, only the ref I would assume
14:28:14FromDiscord<Rika> In reply to @Isofruit "Wouldn't a ref type": they mean a copy of the stack value
14:28:20FromDiscord<planetis> when is the last read of b, let a = b would create a cursor and that avoids the inc refcount
14:28:21FromDiscord<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:32arkanoidI wish there were something like python's streamlint or R's shiny for Nim
14:35:39FromDiscord<demotomohiro> In reply to @ynfle "What are the circumstances": https://wandbox.org/permlink/WU6OaRLT1AFYQs8f
14:36:37arkanoidnim 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:18FromDiscord<demotomohiro> @Arkanoid He said no for e-book version: https://forum.nim-lang.org/t/9259#60646
14:43:27arkanoiddemotomohiro: 1 is statistically false, 2 is legally false and also much more probable given condition 1, 3 is just patronizing
14:45:32arkanoidalso 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:54Amun-Ragiven the reponses on forum, I'll buy clay table version
14:49:11Amun-Rathose wippersnappers with paper books…
14:49:42FromDiscord<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:53Amun-Ra(I have more than enough physical books, so I'll pass on that one)
14:50:06FromDiscord<pietroppeter> In reply to @pietroppeter "I would love having": (this is not yet officially released but it should be soon enough)
14:50:55arkanoidpietroppeter: I just stumbled on nimib before chatting here, but there were no references to bi-directional interaction!
14:52:02arkanoidAmun-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:14Amun-Raarkanoid: ;)
14:52:18*ehmry quit (Ping timeout: 246 seconds)
14:52:46Amun-Rathat'd be collector's edition, pretty heavy… on the price too
14:53:32FromDiscord<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:39FromDiscord<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:40arkanoidpietroppeter: so this is just js code running on client side, correct? no callback to servers cyphering the text
14:54:46FromDiscord<pietroppeter> yes
14:55:31arkanoidwell, it is still something really cool considering the fact that nim code can be compiled into js
14:56:00arkanoidnot sure how to evole it into server/client thign
14:56:02*ehmry joined #nim
14:57:50FromDiscord<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:00arkanoidpietroppeter: 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:24arkanoidbut there's inim
15:01:16FromDiscord<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:32arkanoidstreamlit has session state. It reruns, yes, but knows a tree of what depends on what, and what can be auto-filled
15:02:34FromDiscord<n00nehere> open discord↵nim is still alive↵vlang is still not number 1 lang↵day ruined
15:03:21arkanoidn00nehere: vlang?
15:03:38FromDiscord<n00nehere> still waiting for the v backend in nim
15:04:00FromDiscord<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:59arkanoidpietroppeter, I smell a general problem behind this. I mean, you know, when you feel this problem has already been solved somewhere
15:06:43FromDiscord<enthus1ast> or i do not understand what nimib is about
15:07:40FromDiscord<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:02arkanoidn00nehere: please expand a bit your idea
15:11:29FromDiscord<n00nehere> nim is making a vlang backend
15:11:42FromDiscord<Rika> okay?
15:11:53FromDiscord<Rika> why're you here if you'd rather v than nim?
15:11:57FromDiscord<n00nehere> nim v -d:release nimble.nim
15:13:00FromDiscord<Alea> Making a V backend implies there's a functional backend to replicate 🤣
15:13:18FromDiscord<n00nehere> In reply to @Alea "Making a V backend": hey, now vlang does not memleak by default
15:13:31FromDiscord<n00nehere> which means it's still possible to memleak
15:15:28FromDiscord<Rika> it does tho
15:18:07arkanoidoh, is this one of those religious wars?
15:20:55FromDiscord<Rika> idk
15:20:56FromDiscord<Rika> prolly
15:24:27FromDiscord<jan0809> are there selenium bindings
15:26:22FromDiscord<planetis> search halonium
15:31:56FromDiscord<jan0809> yus ty
15:32:48FromDiscord<jan0809> aaand i have another pixie question,↵is there anything similar to Pillows `getbbox` ?
15:42:24FromDiscord<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:04FromDiscord<jan0809> m1 is aarch64?
15:45:20FromDiscord<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:39FromDiscord<that_dude> Iirc they are the same, just one is developed by Apple and the other isnt
15:46:42FromDiscord<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:31FromDiscord<that_dude> Arm64 should be the apple version iirc
15:48:04FromDiscord<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:57FromDiscord<jan0809> the question might be if nim is on brew.sh
15:50:13arkanoidjan0809, what's that, termux?
15:51:02*estiquelapice joined #nim
15:51:03FromDiscord<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:04FromDiscord<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:17FromDiscord<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:43arkanoidjan0809 you mean proot?
15:53:39FromDiscord<jan0809> the git says its a chroot, not sure, (using the magisk version of the thing i linked)
15:54:56FromDiscord<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:56FromDiscord<jan0809> sadly termux repos arent as complete as those of the arm versions of real linux distros too
15:58:03arkanoidjan0809 it is not really minimalistic, it's just it has to handle some clib differences and some other cwd differences
15:58:40arkanoidI 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:23FromDiscord<jan0809> yeah nim itself kinda worked well for me too, but installing libs via nimble gave me quite some problems
16:02:54arkanoidjan0809 well yes you need some shared libs
16:03:39FromDiscord<jan0809> lemme see if im able to reproduce the problem quickly
16:08:06FromDiscord<jan0809> dont have the files anymore 😦
16:09:14FromDiscord<jan0809> but i assume youre right, putting enough effort into compiling req libs might have done the job,
16:10:40FromDiscord<lantos> Anybody had successful use with openAPI and nim?
16:13:53FromDiscord<jan0809> which way around?
16:14:07FromDiscord<ajusa> In reply to @lantos "Anybody had successful use": I haven't found anything that can reliably autogenerate a working client
16:14:14FromDiscord<jan0809> generting openapi specs from apis or client code from api specs?
16:14:22FromDiscord<lantos> specs > nim
16:14:49FromDiscord<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:01FromDiscord<jan0809> i saw a lib for that i think but didnt try yet
16:15:05FromDiscord<lantos> seen the one posted to openapi-gen but that is from 2019 and giving disruptek openAPI a test
16:15:18FromDiscord<lantos> (edit) "2019 and giving" => "2019. Some work some fail. Giving"
16:15:23FromDiscord<lantos> (edit) "test" => "shot"
16:17:04FromDiscord<jan0809> https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/nim.md
16:18:12FromDiscord<jan0809> didnt try that one for nim yet, but fot python, i remeber it worked for me
16:19:46FromDiscord<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:59FromDiscord<jan0809> (edit) "a" => "an"
16:28:44FromDiscord<lantos> yeah that worked for petshop example but not stripe bur python worked for both
16:30:53FromDiscord<ajusa> disruptek's only supports OpenAPI 2, but if that works for you that's great!
16:35:21FromDiscord<geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=41Bh
16:39:03*gsalazar quit (Ping timeout: 246 seconds)
16:49:53FromDiscord<jan0809> vscode?
16:50:00FromDiscord<geekrelief> yes vscode
16:51:33FromDiscord<geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=41Bm
16:51:34FromDiscord<jan0809> lets see
16:51:53FromDiscord<jan0809> imma try if i can get it running lol
16:52:01FromDiscord<geekrelief> ok thanks for taking a look
16:54:55FromDiscord<jan0809> but do you mean nimlsp or nimlangserver
16:55:05FromDiscord<geekrelief> nimlangserver
16:55:25FromDiscord<geekrelief> https://github.com/Nim-lang/langserver#configuration-options
16:55:33FromDiscord<geekrelief> (edit) "https://github.com/Nim-lang/langserver#configuration-options" => "https://github.com/Nim-lang/langserver"
16:55:53FromDiscord<geekrelief> https://github.com/saem/vscode-nim#nim-lanugage-server-integration-experimental
16:56:32FromDiscord<geekrelief> Just double checking, but did you see this announcement? https://www.reddit.com/r/nim/comments/vr0aql/nimlangserver_announcement/
17:03:14arkanoidspeaking of nimlangserver, it says it needs 1.6+, I guess it means 1.6.6 stable is ok?
17:03:34FromDiscord<geekrelief> I'd assume so
17:04:00arkanoidtime to try it
17:04:03FromDiscord<geekrelief> well I don't know.. as long as the build contains 19892
17:05:39arkanoid1.6.6 stable has git hash 0565a70eab02122ce278b98181c7d1170870865c
17:07:33FromDiscord<jan0809> In reply to @geekrelief "Just double checking, but": yes
17:10:17FromDiscord<voidwalker> How can I parse string to int, without crash if string is not valid, using shorter code than this :
17:10:24FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=41Br
17:11:17FromDiscord<voidwalker> it's annoying i have to use 4 lines :\
17:11:28FromDiscord<geekrelief> make a function? 🤷
17:12:16FromDiscord<voidwalker> function would be called millions of times.. adding overhead
17:12:24FromDiscord<geekrelief> a template?
17:12:39FromDiscord<voidwalker> Too noob for templates atm : )
17:12:55FromDiscord<voidwalker> but yeah probably a good idea, templates
17:13:07FromDiscord<geekrelief> you could inline the proc too
17:13:50FromDiscord<voidwalker> The inline convention means the caller should not call the procedure, but inline its code directly.
17:13:52FromDiscord<voidwalker> oh interesting
17:15:50FromDiscord<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:39FromDiscord<geekrelief> yeah. That's what I did. The lsp is the --v3 protocol used by nimsuggest.
17:16:55FromDiscord<Rika> In reply to @voidwalker "function would be called": Premature optimisation. Measure it and evaluate if it is actually impacting you
17:17:53FromDiscord<geekrelief> @voidwalker Rika is right.
17:18:18FromDiscord<jan0809> can i somehow check if nimlangserver itself start properly (without the vscode plugin) to make sure that works?
17:18:22FromDiscord<voidwalker> not premature, it already takes 16 seconds to execute, i want to cut the time shorter, not add extra steps : P
17:21:53FromDiscord<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:33FromDiscord<jan0809> when i run the binary it doesnt say anything
17:22:51FromDiscord<geekrelief> yeah on windows, nimlangserver just opens a blank command prompt
17:23:02FromDiscord<jan0809> linux aswell
17:23:09FromDiscord<jan0809> but thats right?
17:23:19FromDiscord<geekrelief> but I see a several nimlangserver processes open in the task manager. I don't know
17:23:26FromDiscord<geekrelief> I'm trying it for the first time to day.
17:24:11FromDiscord<geekrelief> hmm I closed vscode but all the nimlangserver and nimsuggest processes are still open
17:25:01arkanoidgeekrelief, it works, but I had to install devel
17:25:21FromDiscord<geekrelief> hmm, yeahj I have devel installed
17:25:25FromDiscord<jan0809> what works
17:25:28FromDiscord<geekrelief> (edit) "yeahj" => "yeah"
17:25:41arkanoidnot 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:58FromDiscord<geekrelief> In reply to @jan0809 "what works": he's trying it like us
17:26:21FromDiscord<jan0809> ah ok
17:26:36FromDiscord<jan0809> so `choosenim devel` (?)
17:27:30arkanoidI did "choosenim update devel"
17:28:06arkanoidI'm using vscode extension 0.1.26 (latest) from nimsaem
17:28:35FromDiscord<geekrelief> hmm I'm not using choosenim. I'm compiling from sources. Also running nimsaem 0.1.26
17:28:40arkanoidhad to change "nim.provider" to "nim.provider": "lsp"
17:28:54FromDiscord<geekrelief> yup did that too..
17:29:06FromDiscord<geekrelief> did you do that for the user and or workspace?
17:29:07FromDiscord<jan0809> In reply to @arkanoid "had to change "nim.provider"": as soon as i do that it starts crashing for me
17:29:08arkanoidgeekrelief, whatever, what's important is that you have nimsuggests and nimlangserver in path
17:29:20FromDiscord<geekrelief> yeah both are in the path
17:29:26FromDiscord<geekrelief> I can execute them from the terminal
17:29:29FromDiscord<geekrelief> oh wait..
17:29:36FromDiscord<geekrelief> nimlangserver..
17:29:57FromDiscord<geekrelief> oh crap it's not in the PATH!
17:30:03FromDiscord<geekrelief> going to try adding it
17:30:13arkanoidjan0809, 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:36arkanoidyou get a vscode notification "nimsuggest initialized for ..."
17:31:38arkanoidif I do "ps -ae | grep nim" I see https://termbin.com/flj5
17:31:45FromDiscord<jan0809> In reply to @arkanoid "you get a vscode": yup now i chose devel i get that too
17:32:36arkanoidI'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:05FromDiscord<geekrelief> yeah I just disabled nimsuggest because it would eat up all my memory
17:33:27FromDiscord<geekrelief> no luck even after adding the path to nimlangserver
17:33:51FromDiscord<jan0809> In reply to @geekrelief "no luck even after": what does it say when you start vsc
17:33:52FromDiscord<geekrelief> https://media.discordapp.net/attachments/371759389889003532/993570352645034145/1K9UbkxsyC.png
17:34:00FromDiscord<jan0809> looks good
17:34:16FromDiscord<jan0809> in terms of nimsuggest
17:35:05FromDiscord<geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=41Bu
17:35:27FromDiscord<jan0809> where you got that from?
17:35:35FromDiscord<geekrelief> the OUTPUT panel
17:36:57FromDiscord<jan0809> that look different on my end
17:37:15FromDiscord<jan0809> https://media.discordapp.net/attachments/371759389889003532/993571202478121000/Bildschirmfoto_vom_2022-07-04_19-36-27.png
17:37:32arkanoidgeekrelief your debug output says failed to parse configuration
17:37:40arkanoidcheck your settings.json
17:38:06FromDiscord<geekrelief> right, that's the first thing I did
17:38:23FromDiscord<geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=41Bw
17:38:30FromDiscord<geekrelief> that in my project settings.json
17:38:48FromDiscord<geekrelief> do you see anything wrong with it?
17:39:44FromDiscord<jan0809> i did
17:39:56arkanoidgeekrelief, I've not yet explored the new syntax, but try with the demo one
17:39:58arkanoidhttps://play.nim-lang.org/#ix=41Bx
17:40:08FromDiscord<jan0809> sent a code paste, see https://play.nim-lang.org/#ix=41By
17:40:11arkanoidI just copypasted the section in readme.md
17:40:24FromDiscord<jan0809> i used the gui lol
17:40:28arkanoidguess it's projectPath
17:40:52FromDiscord<jan0809> sent a code paste, see https://play.nim-lang.org/#ix=41Bz
17:41:05FromDiscord<jan0809> just dropping an example
17:41:41FromDiscord<jan0809> ye maybe bc its a list
17:42:08arkanoidjan0809 you can't use the gui afaik. the nim.projectMapping section is editable only in settings.json
17:42:14arkanoidyou can reach it via gui button, yes
17:42:16FromDiscord<jan0809> and ist Path isnt it?
17:42:36FromDiscord<jan0809> In reply to @arkanoid "jan0809 you can't use": oh true but theres a link
17:42:43FromDiscord<jan0809> now that you say it
17:42:48FromDiscord<geekrelief> arkanoid the demo json doesn't work either
17:43:01FromDiscord<geekrelief> I tried moving my code to a tests folder
17:43:19FromDiscord<geekrelief> I don't know why vscode is complaining about the json too
17:43:25FromDiscord<geekrelief> saying it's expecting an object
17:43:28FromDiscord<jan0809> https://media.discordapp.net/attachments/371759389889003532/993572771244298370/Bildschirmfoto_vom_2022-07-04_19-43-20.png
17:43:57FromDiscord<geekrelief> https://media.discordapp.net/attachments/371759389889003532/993572886755430530/qBhTe69ijC.mp4
17:44:05arkanoidgeekrelief, 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:08FromDiscord<jan0809> can `projectFIle` workj?
17:44:20FromDiscord<jan0809> (edit) "`projectFIle` workj?" => "`projectFile` work?"
17:44:31FromDiscord<jan0809> maybe its worth to try path
17:44:56arkanoidI suggest to just copypaste what's here https://github.com/Nim-lang/langserver#configuration-options
17:45:16FromDiscord<geekrelief> alright, I have to assume, I've configured everything correctly and it's something else that isn't in the readme
17:45:18FromDiscord<jan0809> see
17:45:25FromDiscord<jan0809> its path there aswell
17:45:48arkanoidmy project folder tree is https://termbin.com/s5ltq
17:46:33FromDiscord<geekrelief> I guess I should try on an even simpler project
17:46:47FromDiscord<jan0809> sent a code paste, see https://play.nim-lang.org/#ix=41BB
17:46:49FromDiscord<jan0809> did you try that
17:47:48FromDiscord<geekrelief> oh good catch
17:48:03FromDiscord<geekrelief> just got a crash after the change
17:48:04FromDiscord<jan0809> saying that the third or fourth time lol
17:48:06FromDiscord<geekrelief> I think that's progress?
17:48:11FromDiscord<geekrelief> lol
17:48:15FromDiscord<jan0809> however
17:48:41FromDiscord<jan0809> so for the project i used one created normally with nimble init
17:49:01FromDiscord<jan0809> binary
17:49:56FromDiscord<jan0809> In reply to @geekrelief "just got a crash": what does it say btw
17:50:10FromDiscord<geekrelief> hmm using projectPath but still getting a failed parse configuration..
17:51:50FromDiscord<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:03FromDiscord<jan0809> the underlined part
17:52:15FromDiscord<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:02FromDiscord<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:53rockcaverageekrelief, are you on Windows?
18:03:47FromDiscord<geekrelief> Yes I'm on Windows
18:04:28rockcaveraI ran the nimlangserver tests and they are not passing.
18:04:39FromDiscord<geekrelief> ahh ok 😄
18:04:46rockcaveraI'm on Windows too
18:04:55FromDiscord<geekrelief> thanks for checking!
18:05:05FromDiscord<geekrelief> how did you do run the tests?
18:05:20rockcaveragit clone https://github.com/nim-lang/langserver.git
18:05:23rockcaveranimble tests
18:05:34rockcaveraops
18:05:36rockcaveranimble test
18:06:40rockcavera[OK] Parsing qualified path
18:06:43rockcavera[OK] Parsing Suggest
18:06:47rockcavera[FAILED] test Nimsuggest.call
18:06:53rockcavera[FAILED] test Nimsuggest.def
18:06:58rockcavera[FAILED] test Nimsuggest.sug
18:07:00arkanoidjust checked out https://github.com/nim-lang/langserver.git on my ubuntu machine and "nimble test" failed too
18:07:03rockcavera[FAILED] test Nimsuggest.known
18:07:14arkanoid/home/jack/.nimble/pkgs/stew-0.1.0/stew/ptrops.nim(39, 11) Error: invalid pragma: checks: off
18:07:49rockcaveraI also couldn't get nimlangserver to work in vscode, windows.
18:07:58arkanoidwith nim 1.6.6 test fails in some other places
18:08:04FromDiscord<geekrelief> rockcavera thanks for the confirmation
18:08:21rockcaveraI believe that the problem is still in nimlangserver, since the tests do not pass.
18:08:27arkanoidfrom what I see on linux, it works even if test seems failing
18:08:39rockcaverahowever I'm out of another OS to test if it works
18:09:53rockcaverahttps://pastebin.com/fj9S3bUH
18:10:05rockcaveraapparently my faults are different from yours, arkanoid
18:11:43arkanoidok I had to do "nimble install stew" and not nimble test succeeds
18:12:26FromDiscord<geekrelief> hmm i'm getting a different error for nimble test
18:12:34FromDiscord<geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=41BD
18:12:39arkanoidafter 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:47rockcaveraI 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:05FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=41BE
18:13:39rockcaverai'm use nim devel
18:14:04arkanoidrockcavera: 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:07FromDiscord<geekrelief> I'm on nim devel as well
18:16:24rockcaveraDBG New document opened for URI: uri=file:///e%3A/langserver/tests/test_suggestapi.nim
18:16:28rockcaveraError: unhandled exception: Invalid scheme: , only "file" is supported [UriParseError]
18:16:51rockcaveraerror 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:06FromDiscord<jan0809> im going to try if langserver works on windows for me
20:46:51FromDiscord<voidwalker> anyone used db_sqlite lib ? I need an extensive example for the UPDATE command. I am new to anything sql
20:47:26FromDiscord<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:59FromDiscord<voidwalker> how would I update more than one column ?
20:48:14FromDiscord<enthus1ast> ? is a placeholder for the varargs after the sql string
20:48:16FromDiscord<enthus1ast> you can use multiple
20:49:01FromDiscord<voidwalker> like this ? `dbsql.exec(sql"UPDATE my_table SET rating = ? WHERE id = ?", theid)`
20:49:26FromDiscord<voidwalker> (edit) "`dbsql.exec(sql"UPDATE" => "` dbsql.exec(sql"UPDATE" | "` dbsql.exec(sql"UPDATEmy_table SET rating = ? WHERE id = ?", ... theid)`" added "rrating,"
20:49:30FromDiscord<enthus1ast> yes
20:49:37FromDiscord<enthus1ast> https://www.sqlitetutorial.net/sqlite-update/
20:55:27FromDiscord<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:44FromDiscord<jan0809> In reply to @jan0809 "im going to try": just realized that id run nim on windows via wsl anyways
20:56:55FromDiscord<jan0809> does it really need mingw?
21:06:14FromDiscord<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:25FromDiscord<voidwalker> in nim standard libs
21:07:54FromDiscord<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:36FromDiscord<enthus1ast> for a more "orm" way, we also have norm https://github.com/moigagoo/norm
21:51:39FromDiscord<jan0809> imagine prisma-nim
21:53:00FromDiscord<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:32FromDiscord<enthus1ast> i find it easier to use joins, computed colums, more exotic sql features etc
21:55:37FromDiscord<voidwalker> how would you do string search in an sqlite db ?
21:56:04FromDiscord<enthus1ast> for simple stuff there is like
21:56:11FromDiscord<enthus1ast> `like`
21:56:28FromDiscord<enthus1ast> for real text search there is the more complex full text search
21:57:03FromDiscord<voidwalker> just in titles for the moment
21:58:46FromDiscord<enthus1ast> `select lower(title) as something where something like %foo` maybe
21:59:07FromDiscord<enthus1ast> would find all title that ends with foo
21:59:57FromDiscord<enthus1ast> but maybe have a look at https://www.sqlitetutorial.net/sqlite-full-text-search/
22:04:38FromDiscord<voidwalker> dbsql.exec(sql"SELECT title FROM imdb_movies WHERE name LIKE '%?%'", query) this valid ?
22:05:27FromDiscord<enthus1ast> could work
22:05:30FromDiscord<enthus1ast> try it \:)
22:06:47FromDiscord<enthus1ast> for playing with sqlite i can recommend https://sqlitebrowser.org/
22:06:55FromDiscord<enthus1ast> (or dbeaver)
22:07:06FromDiscord<enthus1ast> so you can quickly test your sql
22:11:33FromDiscord<voidwalker> https://nim-lang.org/docs/db_sqlite.html - there's no example for LIKE
22:12:07FromDiscord<voidwalker> proc getAllRows Executes the query and returns the whole result dataset., maybe?
22:12:30FromDiscord<ynfle> Is there a way to due `mod` with float?
22:36:03FromDiscord<enthus1ast> @voidwalker\: you can execute your sql with eg getAllRows (which actually means, get all the rows that your sql query selected)
22:36:17FromDiscord<enthus1ast> if it returns data you can get it with this
22:36:20FromDiscord<voidwalker> for x in dbsql.fastRows(sql"SELECT id,title FROM imdb_movies WHERE title LIKE '%?%'",query):↵ echo x
22:36:24FromDiscord<voidwalker> tried this, errors :[
22:36:26FromDiscord<voidwalker> any idea why ?
22:36:33FromDiscord<enthus1ast> show the error pelase
22:36:34FromDiscord<enthus1ast> please
22:36:41FromDiscord<voidwalker> Error: unhandled exception: near "Ketamin": syntax error [DbError]
22:37:00FromDiscord<NotFlawffles> Hi! I'm building Nim, i will use Nim for the first time, it sounds interesting
22:37:05FromDiscord<enthus1ast> yeah ketamin makes a lot of iccues
22:37:11FromDiscord<enthus1ast> issues
22:37:19FromDiscord<Elegantbeef> Still drinking ehtus?
22:37:27FromDiscord<enthus1ast> nah
22:37:34FromDiscord<Elegantbeef> Shit i might be drinking with that typo
22:37:44FromDiscord<NotFlawffles> lol
22:38:26FromDiscord<enthus1ast> i think the issue(!) is with the quotes↵(@voidwalker)
22:38:35FromDiscord<enthus1ast> around the '%?%'
22:38:49FromDiscord<enthus1ast> and i think this is a problem
22:39:31FromDiscord<NotFlawffles> who is building from source code takes forever, always
22:39:39FromDiscord<NotFlawffles> shit I'm lagging
22:39:41FromDiscord<NotFlawffles> lmao
22:40:06FromDiscord<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:14FromDiscord<NotFlawffles> (edit) "who" => "wwhy"
22:40:21FromDiscord<NotFlawffles> (edit) "wwhy" => "why"
22:40:37FromDiscord<Elegantbeef> Depending on your CPU nim's from source only takes like 2 minutes
22:40:42FromDiscord<Elegantbeef> Also is there a reason you're building from source?
22:42:08FromDiscord<voidwalker> for x in dbsql.fastRows(sql"SELECT id,title FROM imdb_movies WHERE title LIKE %?%",query):
22:42:20FromDiscord<voidwalker> Error: unhandled exception: near "%": syntax error [DbError]
22:43:21FromDiscord<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:14FromDiscord<enthus1ast> i don't know an other way to make this work
22:49:13FromDiscord<voidwalker> That worked, but is suboptimal, elegance wise : )
22:49:19FromDiscord<enthus1ast> yeah
22:49:48FromDiscord<enthus1ast> imho a strange design decision
22:50:21FromDiscord<voidwalker> I still don't understand what the issue is here
22:50:42FromDiscord<voidwalker> something particular about fastrows?
22:51:08FromDiscord<enthus1ast> sql wants this\: "%foo%" , nim accepts only this ? but then you cannot do % around ?
22:51:25FromDiscord<enthus1ast> because nim wants to quote the value itself
22:52:09FromDiscord<enthus1ast> maybe we should open an issue in the issue tracker
22:52:53FromDiscord<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:35FromDiscord<enthus1ast> @voidwalker\: this works↵`echo db.getAllRows(sql"""select from my_table where name like ? ;""", "Item#98%")`
23:05:07FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=41CN
23:05:42FromDiscord<enthus1ast> (strange i think i tried this syntax last time....)
23:06:02FromDiscord<voidwalker> so i have to % wrap the query string ? :\
23:07:41FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=41CP
23:16:57FromDiscord<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:16FromDiscord<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:36FromDiscord<retkid> how do instantiate an iterator to a sequence
23:37:38FromDiscord<retkid> where you like
23:37:48FromDiscord<retkid> bla() = next iteration
23:38:00FromDiscord<retkid> <@&371760044473319454> also
23:38:08FromDiscord<Elegantbeef> You can make your own closure generator or use slierators' `asClosure`
23:38:12FromDiscord<Elegantbeef> slicerator rather
23:38:28FromDiscord<retkid> i wanna do it for other iterators tho
23:38:30FromDiscord<retkid> I
23:38:33FromDiscord<retkid> I've seen it done .-.
23:38:38FromDiscord<Elegantbeef> What?
23:38:46FromDiscord<retkid> iterators i did not write
23:38:48FromDiscord<retkid> or is it like
23:39:09FromDiscord<Elegantbeef> You need to use closure iterators to have the abillity incrementally yield code
23:39:32FromDiscord<retkid> sent a code paste, see https://play.nim-lang.org/#ix=41CY
23:39:40FromDiscord<Elegantbeef> Not how slicerator's' closure works
23:39:46FromDiscord<retkid> i was asking
23:39:48FromDiscord<Elegantbeef> it'd be `asClosure(0..100)`
23:39:52FromDiscord<retkid> OH OK
23:39:55FromDiscord<Elegantbeef> Yep
23:40:40FromDiscord<retkid> im seeing to remove collect(...)[it] from my code
23:40:49FromDiscord<retkid> which i have to do sometimes
23:40:54FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=41CZ
23:41:01FromDiscord<retkid> so im gonna start using closures
23:41:06FromDiscord<Elegantbeef> That shows a manual closure generator
23:41:11FromDiscord<Elegantbeef> Rather a manual closure
23:44:05FromDiscord<retkid> asClosure is from what packagw in the stdlib
23:44:08FromDiscord<retkid> (edit) "packagw" => "package"
23:44:18FromDiscord<Elegantbeef> it's not in the stdlib
23:44:22FromDiscord<Elegantbeef> It's in my slicerator package
23:45:11FromDiscord<retkid> :|
23:45:19FromDiscord<retkid> maybe tell me that
23:45:25FromDiscord<retkid> before get me lookin
23:58:20FromDiscord<retkid> how can i check if a closure is empty
23:58:59FromDiscord<Elegantbeef> `finished`
23:59:35FromDiscord<Elegantbeef> For finished to be true you do need to call the closure one more time after it's finished