02:05:11 | * | FromDiscord quit (Remote host closed the connection) |
02:05:34 | * | FromDiscord joined #nim |
02:40:55 | * | def- quit (Quit: -) |
02:42:17 | * | def- joined #nim |
02:56:57 | * | SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev) |
02:57:19 | * | SchweinDeBurg joined #nim |
04:28:41 | * | def- quit (Quit: -) |
04:30:39 | * | def- joined #nim |
04:35:25 | FromDiscord | <weltraumpert> sent a long message, see https://pasty.ee/HnfYapGK |
04:39:50 | FromDiscord | <user2m> In reply to @weltraumpert "im new in nim,": yes that's correct, but the best way to get a feel for let, var and const is simply to play with the language . also id look @ this book in conjunction with cgpt https://ssalewski.de/nimprogramming.html |
04:41:37 | NimEventer | New thread by weltraumpert: Nim logo, see https://forum.nim-lang.org/t/11608 |
04:46:47 | * | cm quit (Quit: Bye.) |
04:47:07 | * | cm joined #nim |
04:53:58 | FromDiscord | <kots> Uh, let is a variable whose value cannot be changed, isn't it? |
04:58:44 | FromDiscord | <odexine> In reply to @Elegantbeef "Yes": I HELPED YOU WITH THAT NAME |
05:01:25 | FromDiscord | <user2m> In reply to @k0ts "Uh, let is a": yeah lol I totally missed that ! |
05:02:55 | FromDiscord | <kots> There's a perfectly good manual right here that explains, among other things, the difference between let and var: https://nim-lang.org/docs/manual.html |
05:03:23 | FromDiscord | <kots> There's no need to resort to things like chatgpt which are known to produce complete nonsense 90% of the time |
05:16:12 | FromDiscord | <Elegantbeef> Who is @odexine ? |
05:16:30 | FromDiscord | <Elegantbeef> They have this weird notion that they helped with "Traitor" |
05:17:50 | FromDiscord | <odexine> 💀 |
05:20:15 | FromDiscord | <Elegantbeef> I'm just playing into the name |
05:25:24 | * | madprops_ is now known as madprops |
05:25:25 | * | madprops quit (Changing host) |
05:25:25 | * | madprops joined #nim |
05:41:37 | FromDiscord | <morgan> In reply to @k0ts "There's a perfectly good": yeah read the manual instead of asking the incorrect plagiarism machine |
05:43:08 | FromDiscord | <morgan> In reply to @strogon14 "<@145405730571288577>: btw, VST is": yeah when people join the logic discord and ask about vsts (logic only supports au) when they mean plugins in general |
05:43:12 | FromDiscord | <Elegantbeef> I have a name! |
05:43:17 | FromDiscord | <morgan> lol |
06:25:55 | * | rockcavera quit (Remote host closed the connection) |
06:37:21 | FromDiscord | <misigomartin> hey guys so i cant see my nim tokens on my dym wallet despite the explorer saying that the tokens are there what could be the problem? |
06:38:07 | FromDiscord | <Elegantbeef> Damn this is a first |
06:38:15 | FromDiscord | <Elegantbeef> Nim is a programming language not a shitcoin |
06:46:03 | FromDiscord | <af0rg> Liar. It's a shitcoin. |
06:46:55 | FromDiscord | <Elegantbeef> Have I been writing in shitcoin this entire time |
06:46:58 | FromDiscord | <Elegantbeef> I knew something was sticky |
06:53:44 | FromDiscord | <af0rg> That's just my gum. |
06:56:55 | FromDiscord | <Robyn [She/Her]> In reply to @misigomartin "hey guys so i": This is the Nim programming server, not the cryptocurrency, sorry! |
06:57:03 | FromDiscord | <solitudesf> In reply to @misigomartin "hey guys so i": i stole it |
06:57:41 | FromDiscord | <Elegantbeef> I thought I stole it |
06:58:07 | FromDiscord | <af0rg> I stole this honey. |
06:58:27 | FromDiscord | <Elegantbeef> Your name is aforg but you're clearly abaer |
07:03:28 | FromDiscord | <af0rg> I'm just going to borrow that now. Thank you for a new username idea. |
07:08:57 | * | Guest85 joined #nim |
07:09:21 | * | Guest85 quit (Client Quit) |
07:41:46 | FromDiscord | <odexine> its not the first time beef lol |
07:42:06 | FromDiscord | <odexine> been a few times someone has asked about a cryptocurrency called NIM (this time all caps iirc) |
07:42:33 | FromDiscord | <odexine> ah, the shortcut (ticker?) is NIM, full name is Nimiq it seems |
07:46:57 | FromDiscord | <Robyn [She/Her]> Honestly wondering if it'd be worth wrapping the Python library 'Langchain' in Nim |
07:47:01 | FromDiscord | <Robyn [She/Her]> It probably isn't but idk |
07:47:15 | FromDiscord | <Robyn [She/Her]> May just be better to wrap the REST API |
08:07:55 | * | krux02__ quit (Remote host closed the connection) |
08:18:58 | * | redj quit (Quit: No Ping reply in 180 seconds.) |
08:20:31 | * | redj joined #nim |
08:24:52 | FromDiscord | <weltraumpert> In reply to @user2m "yes that's correct, but": I don't really understand about "the similar aspect" between var and let, var value can be change while let can't, for me it's like a const, not a var. |
08:30:47 | FromDiscord | <Elegantbeef> Except const exists and is a compile time constant |
08:42:39 | FromDiscord | <weltraumpert> In reply to @Elegantbeef "Except const exists and": So, "let" is more like "const" instead of "var," right? The only difference is that "const" is evaluated at compile time, whereas "let" is evaluated at run time. Or is there something wrong in my understanding? |
08:42:58 | FromDiscord | <Elegantbeef> `let` and `var` are similar cause they're runtime values |
08:43:07 | FromDiscord | <Elegantbeef> `const` is a static value and the most different |
08:43:34 | FromDiscord | <Elegantbeef> Since `let` is at runtime it's totally possible to mutate using unsafe mechanisms |
08:44:30 | * | gst joined #nim |
08:44:30 | FromDiscord | <weltraumpert> ok now I'm understand 🤣, The book I read was too long-winded, I was almost confused because of it |
08:48:25 | FromDiscord | <griffith1deadly> In reply to @Elegantbeef "Since `let` is at": `const` also can be mutated with some unsafe mechanisms (in C for sure, in Nim idk) |
08:48:59 | FromDiscord | <Elegantbeef> Const does not have an address in Nim |
08:49:12 | FromDiscord | <Elegantbeef> So to change it you have to write in the `.data` segment |
08:49:19 | FromDiscord | <Elegantbeef> So whilst you can do it... good luck |
08:50:52 | FromDiscord | <griffith1deadly> In reply to @Elegantbeef "So to change it": `.data` also can be mofidied in runtime |
08:50:53 | FromDiscord | <griffith1deadly> so.. |
08:51:07 | FromDiscord | <Elegantbeef> Sure |
08:51:07 | FromDiscord | <griffith1deadly> atleast on windows |
08:51:31 | FromDiscord | <griffith1deadly> (edit) "mofidied" => "modified" |
08:51:34 | FromDiscord | <Elegantbeef> The amount of work you have to do to change a const is more complex than `myLet.addr[] = ...` |
08:51:44 | FromDiscord | <griffith1deadly> sure |
09:09:05 | * | beholders_eye joined #nim |
09:18:42 | * | beholders_eye quit (Ping timeout: 268 seconds) |
09:25:44 | Amun-Ra | const often can't be mutated in any way in C |
09:42:25 | FromDiscord | <tamada_.> Hello, is nim stable? |
09:46:11 | FromDiscord | <solitudesf> In reply to @tamada_. "Hello, is nim stable?": ~~yeah, just dont use async, orc, threading or nimble~~↵↵stable enough |
09:54:22 | FromDiscord | <horizonrce> In reply to @tamada_. "Hello, is nim stable?": Is anything stable |
09:54:31 | FromDiscord | <horizonrce> Define "stable" |
09:54:42 | FromDiscord | <horizonrce> A lot of things are unpredictable |
09:59:13 | Amun-Ra | stable? a house full of horses |
10:20:13 | FromDiscord | <abaer> dont use pointers or fuck your mother and you should be good.↵(@tamada_.) |
10:21:48 | FromDiscord | <abaer> i need a drink after reading backlog. |
10:22:26 | Amun-Ra | try not to use cast[]() |
10:29:38 | FromDiscord | <abaer> or double pointers or triple pointers. \shudders\ |
10:31:50 | FromDiscord | <Phil> quadruple pointers is where the money's at |
10:49:17 | * | def- quit (Quit: -) |
10:50:41 | * | def- joined #nim |
11:01:02 | * | xutaxkamay joined #nim |
11:12:15 | FromDiscord | <goerge_lsd> anyone got a lib/project to do parallel httpget/scrape ? I did it with async and it takes 10-15 min for 18k requests.. not acceptable |
11:23:24 | FromDiscord | <griffith1deadly> In reply to @goerge_lsd "anyone got a lib/project": https://github.com/guzba/curly |
11:52:19 | FromDiscord | <nervecenter> In reply to @tamada_. "Hello, is nim stable?": Very |
12:04:14 | FromDiscord | <mobius771> Is mastering nim available in pdf or ebook? I can only find a hard copy |
12:36:17 | * | krux02 joined #nim |
12:38:03 | strogon14 | you can get the amazon kindle edition |
12:59:56 | * | def- quit (Quit: -) |
13:00:37 | * | def- joined #nim |
13:02:14 | FromDiscord | <mobius771> In reply to @strogon14 "you can get the": You mean Amazon's proprietary format? No thanks |
13:13:16 | * | rockcavera joined #nim |
13:14:07 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#pasty=yGLGUCEj |
13:20:21 | FromDiscord | <abaer> you forgot to do the daily sacrifice of a new born baby.↵(@sOkam! 🫐) |
13:20:46 | strogon14 | mobius771: between us: there are tools to convert kindle formats to proper epub :-) |
13:21:51 | FromDiscord | <abaer> 10 to 15 minutes is not that long.↵(@goerge_lsd) |
13:24:55 | FromDiscord | <abaer> probably can find it already in pdf format uploaded to a ftp server somewhere.↵(<@709044657232936960_strogon14=5b=49=52=43=5d>) |
13:26:15 | * | lucasta joined #nim |
13:40:54 | FromDiscord | <mobius771> In reply to @strogon14 "<@1056036702789054465>: between us: there": I don't give amazon any of my $$$ |
13:43:09 | FromDiscord | <mobius771> In reply to @strogon14 "<@1056036702789054465>: between us: there": Just between us though, I'd be happy to give to to Andreas or the nim community if I could purchase it from the website 😉 |
13:43:31 | * | ntat joined #nim |
13:53:52 | FromDiscord | <starkiller1493> In reply to @goerge_lsd "anyone got a lib/project": https://nimble.directory/pkg/malebolgia |
13:53:58 | FromDiscord | <michaelb.eth> In reply to @mobius771 "Just between us though,": Other folks said the same in the forum when the book was first announced, and then again when there was a 2nd printing announced, but that’s not a direction the author want/ed/s to go |
14:04:45 | FromDiscord | <solitudesf> sent a code paste, see https://play.nim-lang.org/#pasty=KhyFKZBy |
14:10:09 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#pasty=WSrOTBUU |
15:56:32 | * | Figworm joined #nim |
16:06:11 | * | Figworm left #nim (#nim) |
16:07:30 | FromDiscord | <morgan> cmp has three possible return values iirc, less than, equal, or greater than |
16:07:41 | FromDiscord | <morgan> idk if sort actually uses that tho |
16:11:25 | FromDiscord | <odexine> its used for the sort order parameter |
17:59:05 | * | lucasta quit (Quit: Leaving) |
18:38:51 | FromDiscord | <haywiressc> simple question but how do i print a int as binary |
18:50:05 | * | def- quit (Quit: -) |
18:50:22 | * | def- joined #nim |
18:57:58 | FromDiscord | <Robyn [She/Her]> In reply to @haywiressc "simple question but how": `std/strutils` has `toBin` |
20:04:32 | * | jmdaemon joined #nim |
20:09:58 | * | craigbro quit (Remote host closed the connection) |
20:18:04 | * | ntat quit (Quit: Leaving) |
20:30:07 | * | jmdaemon quit (Ping timeout: 260 seconds) |
20:49:40 | FromDiscord | <bulletxbt> Nim equivalent to `str.encode("utf-8")`? |
20:54:35 | FromDiscord | <threefour> Looks like Unicode strings are handled with `std/unicode`. You'd convert a string to Unicode runes via the `toRunes(s: string): seq[Rune]` proc. |
20:59:21 | * | jmdaemon joined #nim |
21:02:37 | FromDiscord | <haywiressc> In reply to @chronos.vitaqua "`std/strutils` has `toBin`": only acceps biggestint for some reason |
21:02:42 | FromDiscord | <haywiressc> (edit) removed "for some reason" |
21:03:00 | FromDiscord | <Robyn [She/Her]> In reply to @haywiressc "only acceps biggestint": And what's the issue with that? |
21:03:09 | FromDiscord | <haywiressc> i have a uint64 and want to convert to binary |
21:03:17 | FromDiscord | <bulletxbt> `json.dumps(header, sort_keys=True, separators=(',', ':')).encode('utf-8')`↵Having trouble translating this to nim, especially the encoding part |
21:03:17 | FromDiscord | <Robyn [She/Her]> https://nim-lang.org/docs/ctypes.html#BiggestInt |
21:03:21 | FromDiscord | <haywiressc> but casting it to int64 it gets values out of range |
21:03:29 | FromDiscord | <haywiressc> cuz the bit used for sign |
21:04:39 | FromDiscord | <Robyn [She/Her]> In reply to @haywiressc "i have a uint64": Aaah, well this is the code here if you want to tweak it slightly? https://github.com/nim-lang/Nim/blob/version-2-0/lib/pure/strutils.nim#L908-L928 |
21:04:51 | FromDiscord | <haywiressc> ahh may be a good idea |
21:05:07 | FromDiscord | <haywiressc> I think there is conversion to binary with string formatting somehow but im not sure |
21:06:01 | * | jmdaemon quit (Ping timeout: 268 seconds) |
21:06:49 | FromDiscord | <haywiressc> feels wrong having to copy and change code of a system library idk |
21:07:42 | FromDiscord | <Robyn [She/Her]> https://play.nim-lang.org/#pasty=NoxNVywl This small modification worked easily |
21:07:51 | FromDiscord | <Robyn [She/Her]> In reply to @haywiressc "feels wrong having to": Could always submit a PR? :P |
21:08:37 | Amun-Ra | haywiressc: this is my implementation: https://play.nim-lang.org/#pasty=wCrPYQcb |
21:09:12 | FromDiscord | <haywiressc> In reply to @Amun-Ra "<@536164435136479232>: this is my": thanks |
21:09:34 | FromDiscord | <haywiressc> In reply to @chronos.vitaqua "Could always submit a": i think i will copy paste code from you guys for now |
21:09:37 | FromDiscord | <Robyn [She/Her]> In reply to @Amun-Ra "<@536164435136479232>: this is my": Only for uints? |
21:09:43 | FromDiscord | <Robyn [She/Her]> In reply to @haywiressc "i think i will": No sweat! |
21:09:45 | Amun-Ra | Robyn: yes |
21:10:23 | * | jmdaemon joined #nim |
21:10:32 | FromDiscord | <Robyn [She/Her]> `SomeInteger` works perfectly fine though, any reason you didn't support it by default? |
21:11:09 | Amun-Ra | tbh I don't remember ;) |
21:13:18 | FromDiscord | <Robyn [She/Her]> Fair enough haha |
21:26:55 | * | beholders_eye joined #nim |
21:32:45 | * | lucasta joined #nim |
21:58:48 | * | gst quit (Quit: Client closed) |
22:16:31 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=FvloiLyd |
22:26:51 | FromDiscord | <bulletxbt> sent a code paste, see https://play.nim-lang.org/#pasty=NjsDuvdm |
22:29:13 | * | def- quit (Quit: -) |
22:29:36 | * | def- joined #nim |
22:31:07 | * | jmdaemon quit (Ping timeout: 268 seconds) |
22:54:45 | FromDiscord | <Elegantbeef> I do not recall if `stream.write(string)` works as one expects or if it writes a pointer |
22:54:59 | FromDiscord | <Elegantbeef> I know sequences write a pointer |
23:07:47 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "I do not recall": String is the only one with an overload, iirc |
23:09:25 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=buNMzBFH |
23:14:48 | FromDiscord | <bulletxbt> sent a code paste, see https://play.nim-lang.org/#pasty=MLRhswuW |
23:15:02 | FromDiscord | <bulletxbt> (edit) "https://play.nim-lang.org/#pasty=Euphrkny" => "https://play.nim-lang.org/#pasty=ROiefHrn" |
23:16:02 | FromDiscord | <Elegantbeef> yep there's the pointer issue |
23:16:22 | FromDiscord | <Elegantbeef> you want to do `stream.write $myJsonNode` |
23:16:34 | FromDiscord | <bulletxbt> So I don't need to encode it? |
23:17:09 | FromDiscord | <bulletxbt> I forgot to add that I redefine headerJson before writing it: `headerJson = toRunes($headerJson & repeat(0'u8.char, diff))` |
23:17:14 | FromDiscord | <bulletxbt> Does that affect anything |
23:17:17 | FromDiscord | <Elegantbeef> Nim strings are encodeless |
23:17:43 | FromDiscord | <bulletxbt> I'll try it |
23:19:16 | FromDiscord | <Elegantbeef> Most people write ascii or utf8 to them, but they have no forced encoding |
23:29:12 | * | beholders_eye quit (Read error: Connection reset by peer) |
23:35:09 | * | beholders_eye joined #nim |
23:47:58 | FromDiscord | <sOkam! 🫐> do sets qualify as `openArray[T]`? |
23:56:45 | FromDiscord | <Elegantbeef> no |
23:57:02 | FromDiscord | <Elegantbeef> Nore can they |
23:57:05 | FromDiscord | <Elegantbeef> nor\ |
23:57:33 | FromDiscord | <Elegantbeef> Hashsets do not store data contiguously there are empty slots. `set`s are not arrays of values they're bits |