<< 13-10-2022 >>

00:22:31FromDiscord<!&luke> sent a code paste, see https://play.nim-lang.org/#ix=4cYP
00:23:28FromDiscord<Rika> I assume the path you pass doesn’t assume that it’s relative to the file
00:24:37FromDiscord<!&luke> pretty sure it is at i adapted the code above from the example
00:25:15FromDiscord<!&luke> sent a code paste, see https://play.nim-lang.org/#ix=4cYQ
00:26:16FromDiscord<!&luke> what are some good futhark alternatives
00:37:36FromDiscord<auxym> c2nim or hand writing importc defs I guess
00:47:18FromDiscord<StarSox> sent a code paste, see https://play.nim-lang.org/#ix=4cYT
00:49:41FromDiscord<Patitotective> In reply to @ripluke "Whats wrong with this": upload a repository
00:50:05FromDiscord<!&luke> What?
00:50:21FromDiscord<!&luke> In reply to @Patitotective "upload a repository": What?
00:52:10FromDiscord<Patitotective> upload the code to a repository so we can see whats wrong with the path
00:54:26*arkurious quit (Quit: Leaving)
01:06:00FromDiscord<Elegantbeef> You may need `--passL:"-L/path/to/your/panda/lib"`↵(@StarSox)
01:08:08FromDiscord<!&luke> In reply to @Patitotective "upload the code to": Can isend u a tree view of the whole project
01:08:16FromDiscord<!&luke> (edit) "isend" => "i send" | "i sendu a tree view of the whole project ... " added "instead"
01:10:54FromDiscord<StarSox> In reply to @Elegantbeef "You may need `--passL:"-L/path/to/your/panda/lib"`": The lib path should be getting passed during make as it's actually part of the building of the project.
01:11:49FromDiscord<Patitotective> In reply to @ripluke "Can i send u": if you want to
01:12:28FromDiscord<StarSox> sent a code paste, see https://play.nim-lang.org/#ix=4cYY
01:13:27FromDiscord<Elegantbeef> you can do `--listCmd` to see what Nim is running
01:15:34FromDiscord<StarSox> In reply to @Elegantbeef "you can do `--listCmd`": Doing this repeats the log I sent earlier (https://pastebin.com/raw/amUZUrvu)
01:16:34FromDiscord<!&luke> In reply to @Patitotective "if you want to": It's fine lol I solved the problem (by doing it another way)
01:17:28FromDiscord<Elegantbeef> Can i see the files inside your panda lib folder?
01:17:44FromDiscord<Elegantbeef> \I dont recall if gcc requires `-L` before `-l` 😄
01:19:49FromDiscord<StarSox> In reply to @Elegantbeef "Can i see the": https://pastebin.com/raw/BKpAnNw0
01:24:11FromDiscord<Elegantbeef> those are `.lib` so i think someone forgot `-static`
01:34:04FromDiscord<StarSox> In reply to @Elegantbeef "those are `.lib` so": Tried a few ways and am still receiving the error.
01:35:23FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cZ0
01:37:12FromDiscord<StarSox> That's exactly what I changed
01:37:20FromDiscord<Elegantbeef> Ok just making ssure
01:37:52FromDiscord<StarSox> In reply to @Elegantbeef "Ok just making ssure": I appreciate the help a lot
01:38:12FromDiscord<StarSox> The part it's failing at is ld. When I do `ld -LC:\Panda3D-1.10.13-x64\lib -lpandaexpress --verbose` to try and find the file in the lib directory specified by the project, it doesn't find it. So maybe I'm trying to figure out what files need to be linked and where they'd be?↵↵Here's the output of that ld:↵https://pastebin.com/raw/iyq68Fxb
01:38:59FromDiscord<Elegantbeef> Uhh this might just be a mingw on windows thing
01:39:22FromDiscord<Elegantbeef> `.a` is a \nix static lib iirc
01:41:27FromDiscord<StarSox> In reply to @Elegantbeef "Uhh this might just": How should I figure this out then?
01:46:23FromDiscord<auxym> In reply to @Elegantbeef "`.a` is a \*nix": yeah a stands for archive, basically a bunch of .o's stuffed into a tarball-ish thing. I think the equivalent on windows is .lib.
01:47:44FromDiscord<auxym> @StarSox can you `dir` your `C:\Panda3D-1.10.13-x64\lib` folder? Does pandaexpress.lib exist in there?
01:48:00FromDiscord<StarSox> In reply to @auxym "<@318779065563611137> can you `dir`": https://pastebin.com/raw/BKpAnNw0
01:48:28FromDiscord<StarSox> No but libpandaexpress.lib does
01:49:49FromDiscord<auxym> In reply to @StarSox "No but libpandaexpress.lib does": yeah, you might have to either rename the file or force the linker to include prefixed .libs in its search, might be some option to do that.
01:50:34FromDiscord<auxym> or call `-llibpandaexpress`?
01:50:42FromDiscord<StarSox> In reply to @auxym "yeah, you might have": `ld -LC:\Panda3D-1.10.13-x64\lib -llibpandaexpress --verbose` passes so I think that should work
01:50:48FromDiscord<auxym> yeah
01:52:18FromDiscord<wick3dr0se> Anyone know how I can concatenate strings in Nim? I just set variable url and then tried url.add("string") and it wont work. I just want to append queries to the end of the url from stdin, not necassarily even store them at variables. If I could just run like downloadFile("url/$1", "file"), that would be even better
01:52:56FromDiscord<wick3dr0se> (edit) "downloadFile("url/$1"," => "downloadFile("url/stdin","
01:53:10FromDiscord<Elegantbeef> `&`
01:53:17FromDiscord<Elegantbeef> `"hello" & " world"`
01:53:36FromDiscord<wick3dr0se> oh thats nice
01:53:46FromDiscord<auxym> .add should work too, is your `url` actually a `string` though?
01:54:28FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cZ2
01:54:45FromDiscord<auxym> yeah that, has to be var
01:55:40FromDiscord<wick3dr0se> Oh thats the issue
01:56:11FromDiscord<wick3dr0se> I had it like above but I had to give define if as a string
01:56:18FromDiscord<wick3dr0se> (edit) "if" => "it"
01:56:28FromDiscord<wick3dr0se> (edit) removed "give"
01:57:03FromDiscord<wick3dr0se> Maybe didnt space right because it works without type
01:57:50FromDiscord<StarSox> In reply to @auxym "yeah": New errors 😊
02:02:01FromDiscord<wick3dr0se> What naming convention do you guys use for vars/procs?
02:02:08FromDiscord<StarSox> I think I may be at my end with trying this
02:02:09FromDiscord<StarSox> https://pastes.io/k0xik10j7n / https://pastes.io/raw/k0xik10j7n
02:02:19FromDiscord<Patitotective> In reply to @wick3dr0se "What naming convention do": camelCase
02:02:29FromDiscord<Patitotective> and PascalCase for types
02:02:32FromDiscord<Elegantbeef> camel case for procs/variables, pascal case for Types
02:02:53FromDiscord<wick3dr0se> Ok cool thanks guys
02:02:56FromDiscord<Elegantbeef> Constants are whatever you little heart desires, i generally do lowercase aswell
02:03:12FromDiscord<Patitotective> In reply to @Elegantbeef "Constants are whatever you": constants are camel case, dont trust him
02:03:21FromDiscord<wick3dr0se> Lmao
02:03:31FromDiscord<Elegantbeef> Pascal case actually means both
02:03:43FromDiscord<StarSox> Any ideas for the undefined references? Thinking I could open an issue and get some help from the author, but would like to really try to solve this first
02:03:44FromDiscord<Arathanis> Consistency is probably more important than anything though. Pick a convention for your project and then adhere to it..
02:03:52FromDiscord<Elegantbeef> One is lower pascalcase the other is upper pascal case
02:03:54FromDiscord<Arathanis> (edit) "it.." => "it."
02:05:00FromDiscord<wick3dr0se> I'll stick to Camel besides Pascal for types. Seems simple enough. I'm used to writing BASH with snake_case for functions and lower/upper for vars
02:06:30FromDiscord<Patitotective> is there a way to pass multiple modules to docgen? i have some modules i want to generate documentation on but they're not imported in the main module of my library (importing them would warn `UnusedImport`),
02:06:31FromDiscord<Patitotective> (edit) "`UnusedImport`)," => "`UnusedImport`)"
02:08:56FromDiscord<wick3dr0se> sent a code paste, see https://paste.rs/6Uv
02:09:36FromDiscord<wick3dr0se> (edit) "https://play.nim-lang.org/#ix=4cZ8" => "https://play.nim-lang.org/#ix=4cZ7"
02:09:55FromDiscord<wick3dr0se> That's the best I got to get an image from query. Is there a way to read like first argument for the query, like $1 in BASH
02:10:17FromDiscord<wick3dr0se> Instead of spawning a line with readLine
02:11:19FromDiscord<ChocolettePalette> https://stackoverflow.com/questions/43368284/how-to-get-access-to-command-line-arguments-in-nim
02:16:32FromDiscord<wick3dr0se> In reply to @ChocolettePalette "https://stackoverflow.com/questions/43368284/how-to": Thanks, exactly what I needed
02:35:54FromDiscord<wick3dr0se> I must be really bad with Googling. There should be a way to get all arguments, like $@/$. I tried `paramStr(0)` among some others
02:36:15FromDiscord<wick3dr0se> Otherwise works well to get just 1 arg
02:38:04FromDiscord<wick3dr0se> I found it
02:38:14FromDiscord<wick3dr0se> commandLineParams
03:42:09FromDiscord<Girvo> Question! Does bitwise rotation/circular shift exist anywhere in the stdlib?
03:42:17FromDiscord<Girvo> (Before I go and implement it myself)
03:42:20FromDiscord<Elegantbeef> bitops
03:43:17FromDiscord<Girvo> Sweet I'll go digging
03:43:41FromDiscord<Elegantbeef> https://nim-lang.org/docs/theindex.html is nice if you havent visited 😄
03:44:24FromDiscord<Girvo> Pfffffft that's what _you_ are for right? 😉
03:44:34FromDiscord<Elegantbeef> That's what my parents tell me
03:45:32FromDiscord<Girvo> Modbus does some absolutely _silly_ stuff with regards to byte layouts
03:46:06FromDiscord<Girvo> They swap bytes, swap words, and swap words and bytes sometimes 😄 _and_ you need to handle endianness too yay
03:46:20FromDiscord<Girvo> Oh and the floatreverse stuff they do is _also_ silly
03:56:13FromDiscord<jos> does nim's quasi quotation stuff support sequences
03:56:24FromDiscord<jos> (edit) "sequences" => "repetition"
03:56:28FromDiscord<jos> like in rust you can do something like
03:56:55FromDiscord<jos> let x = [1, 2, 3]; quote((echo $x))
03:57:05FromDiscord<jos> and it would generate echo 1 echo 2 echo 3
03:57:47FromDiscord<Elegantbeef> Nope
04:04:40FromDiscord<jos> ty
04:30:22FromDiscord<Patitotective> im going to get roasted after this, beef https://github.com/Patitotective/kdl-nim/blob/devel/src/kdl/decoder.nim
04:31:02FromDiscord<Elegantbeef> https://github.com/Patitotective/kdl-nim/blob/devel/src/kdl/decoder.nim#L63-L70 nice you wrote a function inside an if statement
04:31:39FromDiscord<Elegantbeef> Pleasue usue a different error type then `ValueError`
04:31:55FromDiscord<Elegantbeef> Make your own `KdlError`
04:33:31FromDiscord<Elegantbeef> ` let nodes = doc.filterIt(it.name.eqIdent field)` is slow as hell
04:36:07FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cZx
04:36:47FromDiscord<Elegantbeef> Or thereabouts
04:37:26FromDiscord<Elegantbeef> It'll be much faster
04:37:41FromDiscord<Elegantbeef> Anywhere you use the filterit do the above method
04:37:48FromDiscord<Elegantbeef> If you care about speed
04:38:04FromDiscord<Patitotective> :]
04:39:39FromDiscord<Elegantbeef> Also instead of calling `normalize` why not use https://nim-lang.org/docs/strutils.html#cmpIgnoreStyle%2Cstring%2Cstring or your own variant?
04:40:20FromDiscord<Elegantbeef> There is also https://nim-lang.org/docs/strutils.html#cmpIgnoreCase%2Cstring%2Cstring you can base off of if you want
04:40:38FromDiscord<Elegantbeef> Make whole new strings to compare is a warcrime i think
04:41:32FromDiscord<Elegantbeef> Also your usage of naked `try: except:` is horrid
04:42:24FromDiscord<Elegantbeef> While you're at it you can reuse your https://github.com/Patitotective/kdl-nim/blob/devel/src/kdl/decoder.nim#L104-L107
04:42:43FromDiscord<Elegantbeef> Finally you know i have to say use `openarray[char]` instead of `string`
04:43:00FromDiscord<Elegantbeef> If it doesnt need to be a string dont make it one
05:00:46FromDiscord<Patitotective> btw apparently `Object = object or tuple` does not work for generics like `T: Object`
05:07:29FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4cZC
05:09:17FromDiscord<Patitotective> anyway
05:09:19FromDiscord<Patitotective> 🌃
05:10:21FromDiscord<Elegantbeef> `(object or tuple)` likely↵(@Patitotective)
05:47:40FromDiscord<Horizon [She/Her]> In reply to @auxym "<@909883978717204561> Pratt parsing": Reading that already haha
06:04:36*disso_peach joined #nim
06:05:36*kenran joined #nim
06:24:41*CyberTailor joined #nim
06:25:43*CyberTailor left #nim (#nim)
06:37:57FromDiscord<untoreh> In reply to @untoreh "why do all the": `--mm:orc -d:useMalloc` does that
06:38:19FromDiscord<Elegantbeef> Cause it doesnt use Nim's allocator
06:44:01*PMunch joined #nim
08:26:39*tiorock joined #nim
08:26:39*tiorock quit (Changing host)
08:26:39*tiorock joined #nim
08:26:39*rockcavera is now known as Guest2151
08:26:39*Guest2151 quit (Killed (lithium.libera.chat (Nickname regained by services)))
08:26:39*tiorock is now known as rockcavera
08:30:25*rockcavera quit (Remote host closed the connection)
09:08:22FromDiscord<albassort> https://media.discordapp.net/attachments/371759389889003532/1030044313767378985/unknown.png
09:09:09FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4d0r
09:49:14FromDiscord<Phil> You will find me very ambivalent.↵prefixing the string with "fmt" is just another python-reminiscent syntax thing
09:50:52FromDiscord<ChocolettePalette> Operator & can be literally anything even without overloading it
09:51:14FromDiscord<ChocolettePalette> And fmt is a very clear way to show that it's a format string
09:52:01*oprypin quit (Ping timeout: 246 seconds)
09:53:35FromDiscord<Phil> I'm also not entirely comfortable with any of the extra symbols other than $ for toString and "=>" as sugar for anonymous procs
09:54:27FromDiscord<Phil> Ah and of course the symbols that are used for very common ways of accessing seqs/tables such as "{}" for generating sets, "[]" for accessing members of an array/list/table etc.
10:01:20*strogon14 left #nim (Und tschüss!)
10:01:49qwrPhil: perl6 would give you nightmares forever :)
10:02:39FromDiscord<Phil> In reply to @qwr "<@180601887916163073>: perl6 would give": The first language I wrote code in was Perl
10:02:50FromDiscord<Phil> It should be noted that the second language I wrote code in 24h later was java
10:06:37*qwr started with turbo pascal, nim is pretty nostalgic
10:10:57*kenran quit (Remote host closed the connection)
10:14:27*oprypin joined #nim
10:27:57NimEventerNew Nimble package! lodns - Simple DNS server for local development., see https://github.com/vandot/lodns
10:29:30*oprypin quit (Ping timeout: 264 seconds)
10:29:34*oprypin_ joined #nim
10:39:59FromDiscord<MrOkram> Hi, quick question, how would i go about calling functions inside a proprietary shared library (.so) from Nim on Linux ?
10:50:22*vicecea quit (Remote host closed the connection)
10:53:36FromDiscord<demotomohiro> In reply to @MrOkram "Hi, quick question, how": https://nim-lang.org/docs/manual.html#foreign-function-interface-dynlib-pragma-for-import
10:56:04FromDiscord<MrOkram> In reply to @demotomohiro "https://nim-lang.org/docs/manual.html#foreign-funct": Yea, when i try to load the library i'm getting "Dynamic loading not supported" error.
11:06:31*kenran joined #nim
11:12:56*sagax quit (Remote host closed the connection)
11:15:10FromDiscord<albassort> i would like a library for trigonometric iterators
11:15:16FromDiscord<albassort> i would like to iterate over a sine wave
11:16:25FromDiscord<albassort> how do i do dis
11:18:33*reversem3[m] quit (Quit: Bridge terminating on SIGTERM)
11:18:45*TrueBlue[m] quit (Quit: Bridge terminating on SIGTERM)
11:25:11*reversem3[m] joined #nim
11:28:09FromDiscord<ChocolettePalette> sent a code paste, see https://play.nim-lang.org/#ix=4d14
11:28:12*TrueBlue[m] joined #nim
11:28:25FromDiscord<albassort> In reply to @ChocolettePalette "You can define your": i feel like there should be a library that is prettier
11:28:42FromDiscord<albassort> 180 being the frequency or amplitude
11:29:13FromDiscord<Rika> What does that mean
11:29:36FromDiscord<ChocolettePalette> You can be the first person to have such a library↵(@albassort)
11:29:52Amun-Rafrequency of amplitude?
11:30:09FromDiscord<ChocolettePalette> You can be the first person to implement such a library
11:30:18FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4d16
11:30:18FromDiscord<albassort> In reply to @Amun-Ra "frequency of amplitude?": i typoed
11:30:27Amun-Rak
11:30:40FromDiscord<albassort> but then how do i do phase
11:30:41FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4d17
11:30:43FromDiscord<albassort> i never took trig
11:30:52FromDiscord<albassort> just a lowly sound designer
11:32:40FromDiscord<ChocolettePalette> material-yrcpaghn.png https://media.discordapp.net/attachments/371759389889003532/1030080629246803968/material-yrcpaghn.png
11:34:40FromDiscord<albassort> In reply to @ChocolettePalette "material-yrcpaghn.png": gimme the link
11:34:55FromDiscord<ChocolettePalette> You can do all the possible things by yielding smth like `k sin(n x) + m`, idk what the k, n & m quotients mean doe, this is some unfathomable math to me and I don't even know how to google it 😔
11:34:57FromDiscord<albassort> i guess i could just start implementing the 3 basic shapes from mathmatical functions
11:36:16FromDiscord<ChocolettePalette> It's a picture from google images, you can fiddle with those functions here\: https\:&#47;&#47;www.geogebra.org&#47;↵(@albassort)
11:47:23FromDiscord<albassort> whats the terminal graphinc library yard made
11:47:32FromDiscord<albassort> that'll come in handy while i work on this
12:28:20*sagax joined #nim
12:31:00*xet7 quit (Ping timeout: 264 seconds)
12:51:16*derpydoo joined #nim
13:01:50*vicecea joined #nim
13:25:56*oprypin_ quit (Ping timeout: 268 seconds)
13:45:56*arkurious joined #nim
13:46:57*derpydoo quit (Quit: derpydoo)
13:54:19FromDiscord<Phil> I can't write nim code on the go, so quick question: can a pragma be given an object-instance as a value?
13:56:04*oprypin joined #nim
13:59:23FromDiscord<Phil> For more in-depth features of my admin-view thingy I need models to provide more meta-data about a field (e.g. help-text to be shown that explains the meaning of the field, sub-directory names that a media file should be stored in etc.). Now the question is: Do I give the user multiple pragmas to use as needed, or do I allow them to generate an object that they pass to a single pragma
14:01:21FromDiscord<Patitotective> In reply to @albassort "perhaps we should update": `echo &"{person.name} is {person.age} years old"` is sexier if you ask me
14:01:41*neceve quit (*.net *.split)
14:01:41*ttkap quit (*.net *.split)
14:01:41*oz quit (*.net *.split)
14:02:26*neceve joined #nim
14:02:56*neceve quit (Changing host)
14:02:56*neceve joined #nim
14:03:34*ox joined #nim
14:04:26*derpydoo joined #nim
14:06:27*PMunch quit (Ping timeout: 248 seconds)
14:09:19*sagax quit (Remote host closed the connection)
14:21:35FromDiscord<auxym> In reply to @Isofruit "For more in-depth features": I have passed `const` strings to pragmas, so I assume you could if the object is const?
14:33:43NimEventerNew thread by Araq: NimConf 2022, see https://forum.nim-lang.org/t/9526
14:46:10NimEventerNew Nimble package! emath - math parser/evaluator library, see https://github.com/hamidb80/emath
14:48:20FromDiscord<Takemichi Hanagaki> How can I disable Nimpretty at VsCodium?
14:50:10FromDiscord<Takemichi Hanagaki> It's breaking the identation style from a specific project I'm working.
15:38:05*fallback quit (Remote host closed the connection)
15:41:44FromDiscord<auxym> i use the nimsaem extension and I'm pretty sure it doesn't run nimpretty at all, at least by default
15:42:34FromDiscord<auxym> it's a shame code formatters are so hard to get right, they're really nice to use when they work well (black, gofmt etc)
15:43:16FromDiscord<auxym> (ie, can someone way smarter than me please fix nimpretty?)
15:49:37FromDiscord<dlesnoff> In reply to @Isofruit "For more in-depth features": I see pragma as a nice way to apply a template or a macro to a code, doesn't a pragma accept whatever a macro/template would as an input ?
15:53:42FromDiscord<dlesnoff> In reply to @Takemichi Hanagaki "It's breaking the identation": How do you compile your project in VSCodium ? Does it call nimpretty in a conf file ?
15:58:17FromDiscord<Takemichi Hanagaki> I resolved. 😄 ↵I configured formatOnSave as false in .vscode/settings.json
15:58:29FromDiscord<Takemichi Hanagaki> In reply to @Jiezron "How do you compile": I compile with command line.
15:59:03FromDiscord<Takemichi Hanagaki> In reply to @auxym "it's a shame code": I'm using the same extension. Mine was auto-formatting my code.
15:59:19FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4d3n
16:01:36FromDiscord<Takemichi Hanagaki> In reply to @auxym "it's a shame code": Real! I got some problems with some formatters.↵But, I never had any problem using black, because I never used a different code-style beyond default.
16:02:07FromDiscord<Takemichi Hanagaki> But, in this project specif it was breaking indentation.↵But I resolved it.
16:02:18FromDiscord<Takemichi Hanagaki> (edit) "specif" => "specifc"
16:02:33FromDiscord<Takemichi Hanagaki> (edit) "specifc" => "in special"
16:02:48FromDiscord<Patitotective> In reply to @Patitotective "is there way to": `{.used.}` seems to do the trick↵though i cannot `import foo {.used.}` i have to add `{.used.}` to `foo.nim`
16:10:19FromDiscord<Phil> In reply to @Jiezron "I see pragma as": It might, just can't test it out right now because I'm on the go on the phone
16:29:43*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
16:30:02*jmdaemon joined #nim
16:30:25*rockcavera joined #nim
16:30:25*rockcavera quit (Changing host)
16:30:25*rockcavera joined #nim
16:37:41FromDiscord<albassort> is there a float version of countuop
16:37:43FromDiscord<albassort> (edit) "countuop" => "countup"
16:47:10*fallback joined #nim
16:49:42FromDiscord<auxym> no but should be pretty straightforward to implement your own
16:57:15FromDiscord<can.l> sent a code paste, see https://play.nim-lang.org/#ix=4d3Q
17:09:14FromDiscord<albassort> https://media.discordapp.net/attachments/371759389889003532/1030165325364334762/unknown.png
17:09:17FromDiscord<albassort> turns out mine is much fater
17:09:24FromDiscord<albassort> (edit) "fater" => "faster"
17:09:28FromDiscord<albassort> take that cpp nerd
17:10:02FromDiscord<Patitotective> In reply to @albassort "": why not rainbow :[
17:10:09FromDiscord<albassort> what?
17:10:19FromDiscord<Patitotective> thats not the rainbow colors
17:10:22FromDiscord<albassort> it is
17:10:23FromDiscord<Patitotective> (edit) "thats" => "those are"
17:10:24FromDiscord<albassort> i modified it
17:10:37FromDiscord<Patitotective> In reply to @albassort "i modified it": which means theyre not
17:10:45FromDiscord<albassort> i like my colors a bit brigher and thicker
17:10:51FromDiscord<albassort> im a bit blind
17:14:30*oprypin quit (Ping timeout: 264 seconds)
17:32:40*oprypin joined #nim
18:09:05*kenran quit (Quit: ERC 5.4.1 (IRC client for GNU Emacs 29.0.50))
18:43:54Amun-Rathat's quite a usual level of contrast, I feel you're alright
18:48:26*xet7 joined #nim
19:13:50*xet7 quit (Read error: Connection reset by peer)
19:16:51FromDiscord<Bung> https://github.com/nim-lang/Nim/issues/20152 is this legal
19:41:17*kenran joined #nim
19:55:03FromDiscord<Patitotective> what should i use then? https://media.discordapp.net/attachments/371759389889003532/1030207057627988108/unknown.png
20:10:52Amun-RaI guess https://nim-lang.org/docs/times.html#initTime%2Cint64%2CNanosecondRange
20:15:27*LuxuryMode joined #nim
20:34:56NimEventerNew thread by tubbs: How to check if a string is numeric?, see https://forum.nim-lang.org/t/9527
20:53:12*kenran quit (Remote host closed the connection)
21:38:10*derpydoo quit (Quit: derpydoo)
21:38:52*oprypin quit (Quit: Bye)
21:40:39*oprypin joined #nim
21:44:44FromDiscord<Patitotective> its much better now beef https://github.com/Patitotective/kdl-nim/blob/devel/src/kdl/decoder.nim
22:02:33*jjido joined #nim
22:19:33FromDiscord<impbox [ftsf]> hmm, any ideas why raising an IndexDefect wouldn't appear to do anything in a debug build? I'm echoing a line just before it and that prints, but I want my app to exit and give me a stacktrace
22:22:37FromDiscord<impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=4d5B
22:29:25FromDiscord<impbox [ftsf]> oooh got it to work, had to pass `--exceptions:setjmp`
22:29:31FromDiscord<impbox [ftsf]> not sure why the default doesn't work
22:29:50FromDiscord<impbox [ftsf]> ahh maybe because threads
22:41:34*strogon14 joined #nim
22:44:41strogon14I have a C function, which takes a pointer to a buffer (may contain nulls) and a size. To build the buffer I have a var msg: seq[char]. Can I just pass msg[0].addr and msg.len to the C function, or should I convert the seq[char] to an openArray first? https://play.nim-lang.org/#ix=4d5E
22:45:52FromDiscord<Patitotective> In reply to @strogon14 "I have a C": `msg[0].addr` is fine
22:46:09strogon14ok, good to know.
22:46:10FromDiscord<Patitotective> though i think `cstring`s work better
22:48:37strogon14I need to collect the buffer contents from several parts, so I need sth with dynamic allacation. seq handles that for me. cstring wouldn't, would it?
22:50:26FromDiscord<Patitotective> In reply to @strogon14 "I need to collect": don't really know
22:50:42FromDiscord<Patitotective> In reply to @strogon14 "I have a C": you can do `msg: string`, `msg[0].addr` and `msg.len` though
22:51:21strogon14The buffer can have nulls in it, so string is out.
22:51:59FromDiscord<Patitotective> nulls like `\0`?
22:53:27strogon14yes
22:59:07FromDiscord<Patitotective> whats the exact problem with nulls? wouldnt `str[0..<str.find('\0')]` work?
23:02:02FromDiscord<Bung> @ElegantBeef https://github.com/nim-lang/Nim/issues/20152 is this legal
23:04:20FromDiscord<auxym> In reply to @strogon14 "I have a C": msg[0].addr and msg.len sounds fine to me. nulls are perfectly valid in a seq[char] (or even a nim string)
23:05:46strogon14But function like, for example, strutils.alignLeft assuem strngs are null-terminated, so AFAUCS I can't use them to pad my bugger with \0 chars. So I might as well use a seq[char].
23:06:06strogon14sorry for all the typos :(
23:07:31strogon14I'll try again: functions like strutils.alignLeft assume that strings are null-terminated, so AFAICS S I can't use them to pad my buffer with \0 chars
23:13:45strogon14Or can I? Indeed I can: https://play.nim-lang.org/#ix=4d5P I got confused by the way echo handles strings.
23:17:04FromDiscord<auxym> In reply to @strogon14 "But function like, for": does it? I wasn't aware that nulls in nim strings got any special treatment (cstring is different of course). There was a bug in `find` but that got fixed in 1.6.8
23:20:34strogon14I'm not sure for what I would need 'find'?
23:21:01strogon14Anyway, my example works with 'string' too: https://play.nim-lang.org/#ix=4d5R
23:22:40FromDiscord<auxym> you don't need find, just mentioning that it's the only case I know of that cared about nulls, but only because of a bug, which is now fixed
23:23:32strogon14ah, ok, now I understand.
23:42:05FromDiscord<Patitotective> In reply to @strogon14 "But function like, for": just `str[0..<str.find('\0')]`
23:42:34*neceve quit (Ping timeout: 246 seconds)
23:42:34FromDiscord<Patitotective> and if you can, save some memory `str.toOpenArray(0, str.find('\0')-1)`
23:49:14*neceve joined #nim