00:22:31 | FromDiscord | <!&luke> sent a code paste, see https://play.nim-lang.org/#ix=4cYP |
00:23:28 | FromDiscord | <Rika> I assume the path you pass doesn’t assume that it’s relative to the file |
00:24:37 | FromDiscord | <!&luke> pretty sure it is at i adapted the code above from the example |
00:25:15 | FromDiscord | <!&luke> sent a code paste, see https://play.nim-lang.org/#ix=4cYQ |
00:26:16 | FromDiscord | <!&luke> what are some good futhark alternatives |
00:37:36 | FromDiscord | <auxym> c2nim or hand writing importc defs I guess |
00:47:18 | FromDiscord | <StarSox> sent a code paste, see https://play.nim-lang.org/#ix=4cYT |
00:49:41 | FromDiscord | <Patitotective> In reply to @ripluke "Whats wrong with this": upload a repository |
00:50:05 | FromDiscord | <!&luke> What? |
00:50:21 | FromDiscord | <!&luke> In reply to @Patitotective "upload a repository": What? |
00:52:10 | FromDiscord | <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:00 | FromDiscord | <Elegantbeef> You may need `--passL:"-L/path/to/your/panda/lib"`↵(@StarSox) |
01:08:08 | FromDiscord | <!&luke> In reply to @Patitotective "upload the code to": Can isend u a tree view of the whole project |
01:08:16 | FromDiscord | <!&luke> (edit) "isend" => "i send" | "i sendu a tree view of the whole project ... " added "instead" |
01:10:54 | FromDiscord | <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:49 | FromDiscord | <Patitotective> In reply to @ripluke "Can i send u": if you want to |
01:12:28 | FromDiscord | <StarSox> sent a code paste, see https://play.nim-lang.org/#ix=4cYY |
01:13:27 | FromDiscord | <Elegantbeef> you can do `--listCmd` to see what Nim is running |
01:15:34 | FromDiscord | <StarSox> In reply to @Elegantbeef "you can do `--listCmd`": Doing this repeats the log I sent earlier (https://pastebin.com/raw/amUZUrvu) |
01:16:34 | FromDiscord | <!&luke> In reply to @Patitotective "if you want to": It's fine lol I solved the problem (by doing it another way) |
01:17:28 | FromDiscord | <Elegantbeef> Can i see the files inside your panda lib folder? |
01:17:44 | FromDiscord | <Elegantbeef> \I dont recall if gcc requires `-L` before `-l` 😄 |
01:19:49 | FromDiscord | <StarSox> In reply to @Elegantbeef "Can i see the": https://pastebin.com/raw/BKpAnNw0 |
01:24:11 | FromDiscord | <Elegantbeef> those are `.lib` so i think someone forgot `-static` |
01:34:04 | FromDiscord | <StarSox> In reply to @Elegantbeef "those are `.lib` so": Tried a few ways and am still receiving the error. |
01:35:23 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cZ0 |
01:37:12 | FromDiscord | <StarSox> That's exactly what I changed |
01:37:20 | FromDiscord | <Elegantbeef> Ok just making ssure |
01:37:52 | FromDiscord | <StarSox> In reply to @Elegantbeef "Ok just making ssure": I appreciate the help a lot |
01:38:12 | FromDiscord | <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:59 | FromDiscord | <Elegantbeef> Uhh this might just be a mingw on windows thing |
01:39:22 | FromDiscord | <Elegantbeef> `.a` is a \nix static lib iirc |
01:41:27 | FromDiscord | <StarSox> In reply to @Elegantbeef "Uhh this might just": How should I figure this out then? |
01:46:23 | FromDiscord | <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:44 | FromDiscord | <auxym> @StarSox can you `dir` your `C:\Panda3D-1.10.13-x64\lib` folder? Does pandaexpress.lib exist in there? |
01:48:00 | FromDiscord | <StarSox> In reply to @auxym "<@318779065563611137> can you `dir`": https://pastebin.com/raw/BKpAnNw0 |
01:48:28 | FromDiscord | <StarSox> No but libpandaexpress.lib does |
01:49:49 | FromDiscord | <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:34 | FromDiscord | <auxym> or call `-llibpandaexpress`? |
01:50:42 | FromDiscord | <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:48 | FromDiscord | <auxym> yeah |
01:52:18 | FromDiscord | <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:56 | FromDiscord | <wick3dr0se> (edit) "downloadFile("url/$1"," => "downloadFile("url/stdin"," |
01:53:10 | FromDiscord | <Elegantbeef> `&` |
01:53:17 | FromDiscord | <Elegantbeef> `"hello" & " world"` |
01:53:36 | FromDiscord | <wick3dr0se> oh thats nice |
01:53:46 | FromDiscord | <auxym> .add should work too, is your `url` actually a `string` though? |
01:54:28 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cZ2 |
01:54:45 | FromDiscord | <auxym> yeah that, has to be var |
01:55:40 | FromDiscord | <wick3dr0se> Oh thats the issue |
01:56:11 | FromDiscord | <wick3dr0se> I had it like above but I had to give define if as a string |
01:56:18 | FromDiscord | <wick3dr0se> (edit) "if" => "it" |
01:56:28 | FromDiscord | <wick3dr0se> (edit) removed "give" |
01:57:03 | FromDiscord | <wick3dr0se> Maybe didnt space right because it works without type |
01:57:50 | FromDiscord | <StarSox> In reply to @auxym "yeah": New errors 😊 |
02:02:01 | FromDiscord | <wick3dr0se> What naming convention do you guys use for vars/procs? |
02:02:08 | FromDiscord | <StarSox> I think I may be at my end with trying this |
02:02:09 | FromDiscord | <StarSox> https://pastes.io/k0xik10j7n / https://pastes.io/raw/k0xik10j7n |
02:02:19 | FromDiscord | <Patitotective> In reply to @wick3dr0se "What naming convention do": camelCase |
02:02:29 | FromDiscord | <Patitotective> and PascalCase for types |
02:02:32 | FromDiscord | <Elegantbeef> camel case for procs/variables, pascal case for Types |
02:02:53 | FromDiscord | <wick3dr0se> Ok cool thanks guys |
02:02:56 | FromDiscord | <Elegantbeef> Constants are whatever you little heart desires, i generally do lowercase aswell |
02:03:12 | FromDiscord | <Patitotective> In reply to @Elegantbeef "Constants are whatever you": constants are camel case, dont trust him |
02:03:21 | FromDiscord | <wick3dr0se> Lmao |
02:03:31 | FromDiscord | <Elegantbeef> Pascal case actually means both |
02:03:43 | FromDiscord | <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:44 | FromDiscord | <Arathanis> Consistency is probably more important than anything though. Pick a convention for your project and then adhere to it.. |
02:03:52 | FromDiscord | <Elegantbeef> One is lower pascalcase the other is upper pascal case |
02:03:54 | FromDiscord | <Arathanis> (edit) "it.." => "it." |
02:05:00 | FromDiscord | <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:30 | FromDiscord | <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:31 | FromDiscord | <Patitotective> (edit) "`UnusedImport`)," => "`UnusedImport`)" |
02:08:56 | FromDiscord | <wick3dr0se> sent a code paste, see https://paste.rs/6Uv |
02:09:36 | FromDiscord | <wick3dr0se> (edit) "https://play.nim-lang.org/#ix=4cZ8" => "https://play.nim-lang.org/#ix=4cZ7" |
02:09:55 | FromDiscord | <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:17 | FromDiscord | <wick3dr0se> Instead of spawning a line with readLine |
02:11:19 | FromDiscord | <ChocolettePalette> https://stackoverflow.com/questions/43368284/how-to-get-access-to-command-line-arguments-in-nim |
02:16:32 | FromDiscord | <wick3dr0se> In reply to @ChocolettePalette "https://stackoverflow.com/questions/43368284/how-to": Thanks, exactly what I needed |
02:35:54 | FromDiscord | <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:15 | FromDiscord | <wick3dr0se> Otherwise works well to get just 1 arg |
02:38:04 | FromDiscord | <wick3dr0se> I found it |
02:38:14 | FromDiscord | <wick3dr0se> commandLineParams |
03:42:09 | FromDiscord | <Girvo> Question! Does bitwise rotation/circular shift exist anywhere in the stdlib? |
03:42:17 | FromDiscord | <Girvo> (Before I go and implement it myself) |
03:42:20 | FromDiscord | <Elegantbeef> bitops |
03:43:17 | FromDiscord | <Girvo> Sweet I'll go digging |
03:43:41 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/theindex.html is nice if you havent visited 😄 |
03:44:24 | FromDiscord | <Girvo> Pfffffft that's what _you_ are for right? 😉 |
03:44:34 | FromDiscord | <Elegantbeef> That's what my parents tell me |
03:45:32 | FromDiscord | <Girvo> Modbus does some absolutely _silly_ stuff with regards to byte layouts |
03:46:06 | FromDiscord | <Girvo> They swap bytes, swap words, and swap words and bytes sometimes 😄 _and_ you need to handle endianness too yay |
03:46:20 | FromDiscord | <Girvo> Oh and the floatreverse stuff they do is _also_ silly |
03:56:13 | FromDiscord | <jos> does nim's quasi quotation stuff support sequences |
03:56:24 | FromDiscord | <jos> (edit) "sequences" => "repetition" |
03:56:28 | FromDiscord | <jos> like in rust you can do something like |
03:56:55 | FromDiscord | <jos> let x = [1, 2, 3]; quote((echo $x)) |
03:57:05 | FromDiscord | <jos> and it would generate echo 1 echo 2 echo 3 |
03:57:47 | FromDiscord | <Elegantbeef> Nope |
04:04:40 | FromDiscord | <jos> ty |
04:30:22 | FromDiscord | <Patitotective> im going to get roasted after this, beef https://github.com/Patitotective/kdl-nim/blob/devel/src/kdl/decoder.nim |
04:31:02 | FromDiscord | <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:39 | FromDiscord | <Elegantbeef> Pleasue usue a different error type then `ValueError` |
04:31:55 | FromDiscord | <Elegantbeef> Make your own `KdlError` |
04:33:31 | FromDiscord | <Elegantbeef> ` let nodes = doc.filterIt(it.name.eqIdent field)` is slow as hell |
04:36:07 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cZx |
04:36:47 | FromDiscord | <Elegantbeef> Or thereabouts |
04:37:26 | FromDiscord | <Elegantbeef> It'll be much faster |
04:37:41 | FromDiscord | <Elegantbeef> Anywhere you use the filterit do the above method |
04:37:48 | FromDiscord | <Elegantbeef> If you care about speed |
04:38:04 | FromDiscord | <Patitotective> :] |
04:39:39 | FromDiscord | <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:20 | FromDiscord | <Elegantbeef> There is also https://nim-lang.org/docs/strutils.html#cmpIgnoreCase%2Cstring%2Cstring you can base off of if you want |
04:40:38 | FromDiscord | <Elegantbeef> Make whole new strings to compare is a warcrime i think |
04:41:32 | FromDiscord | <Elegantbeef> Also your usage of naked `try: except:` is horrid |
04:42:24 | FromDiscord | <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:43 | FromDiscord | <Elegantbeef> Finally you know i have to say use `openarray[char]` instead of `string` |
04:43:00 | FromDiscord | <Elegantbeef> If it doesnt need to be a string dont make it one |
05:00:46 | FromDiscord | <Patitotective> btw apparently `Object = object or tuple` does not work for generics like `T: Object` |
05:07:29 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4cZC |
05:09:17 | FromDiscord | <Patitotective> anyway |
05:09:19 | FromDiscord | <Patitotective> 🌃 |
05:10:21 | FromDiscord | <Elegantbeef> `(object or tuple)` likely↵(@Patitotective) |
05:47:40 | FromDiscord | <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:57 | FromDiscord | <untoreh> In reply to @untoreh "why do all the": `--mm:orc -d:useMalloc` does that |
06:38:19 | FromDiscord | <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:22 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1030044313767378985/unknown.png |
09:09:09 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4d0r |
09:49:14 | FromDiscord | <Phil> You will find me very ambivalent.↵prefixing the string with "fmt" is just another python-reminiscent syntax thing |
09:50:52 | FromDiscord | <ChocolettePalette> Operator & can be literally anything even without overloading it |
09:51:14 | FromDiscord | <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:35 | FromDiscord | <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:27 | FromDiscord | <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:49 | qwr | Phil: perl6 would give you nightmares forever :) |
10:02:39 | FromDiscord | <Phil> In reply to @qwr "<@180601887916163073>: perl6 would give": The first language I wrote code in was Perl |
10:02:50 | FromDiscord | <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:57 | NimEventer | New 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:59 | FromDiscord | <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:36 | FromDiscord | <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:04 | FromDiscord | <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:10 | FromDiscord | <albassort> i would like a library for trigonometric iterators |
11:15:16 | FromDiscord | <albassort> i would like to iterate over a sine wave |
11:16:25 | FromDiscord | <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:09 | FromDiscord | <ChocolettePalette> sent a code paste, see https://play.nim-lang.org/#ix=4d14 |
11:28:12 | * | TrueBlue[m] joined #nim |
11:28:25 | FromDiscord | <albassort> In reply to @ChocolettePalette "You can define your": i feel like there should be a library that is prettier |
11:28:42 | FromDiscord | <albassort> 180 being the frequency or amplitude |
11:29:13 | FromDiscord | <Rika> What does that mean |
11:29:36 | FromDiscord | <ChocolettePalette> You can be the first person to have such a library↵(@albassort) |
11:29:52 | Amun-Ra | frequency of amplitude? |
11:30:09 | FromDiscord | <ChocolettePalette> You can be the first person to implement such a library |
11:30:18 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4d16 |
11:30:18 | FromDiscord | <albassort> In reply to @Amun-Ra "frequency of amplitude?": i typoed |
11:30:27 | Amun-Ra | k |
11:30:40 | FromDiscord | <albassort> but then how do i do phase |
11:30:41 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4d17 |
11:30:43 | FromDiscord | <albassort> i never took trig |
11:30:52 | FromDiscord | <albassort> just a lowly sound designer |
11:32:40 | FromDiscord | <ChocolettePalette> material-yrcpaghn.png https://media.discordapp.net/attachments/371759389889003532/1030080629246803968/material-yrcpaghn.png |
11:34:40 | FromDiscord | <albassort> In reply to @ChocolettePalette "material-yrcpaghn.png": gimme the link |
11:34:55 | FromDiscord | <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:57 | FromDiscord | <albassort> i guess i could just start implementing the 3 basic shapes from mathmatical functions |
11:36:16 | FromDiscord | <ChocolettePalette> It's a picture from google images, you can fiddle with those functions here\: https\://www.geogebra.org/↵(@albassort) |
11:47:23 | FromDiscord | <albassort> whats the terminal graphinc library yard made |
11:47:32 | FromDiscord | <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:19 | FromDiscord | <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:23 | FromDiscord | <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:21 | FromDiscord | <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:35 | FromDiscord | <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:43 | NimEventer | New thread by Araq: NimConf 2022, see https://forum.nim-lang.org/t/9526 |
14:46:10 | NimEventer | New Nimble package! emath - math parser/evaluator library, see https://github.com/hamidb80/emath |
14:48:20 | FromDiscord | <Takemichi Hanagaki> How can I disable Nimpretty at VsCodium? |
14:50:10 | FromDiscord | <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:44 | FromDiscord | <auxym> i use the nimsaem extension and I'm pretty sure it doesn't run nimpretty at all, at least by default |
15:42:34 | FromDiscord | <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:16 | FromDiscord | <auxym> (ie, can someone way smarter than me please fix nimpretty?) |
15:49:37 | FromDiscord | <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:42 | FromDiscord | <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:17 | FromDiscord | <Takemichi Hanagaki> I resolved. 😄 ↵I configured formatOnSave as false in .vscode/settings.json |
15:58:29 | FromDiscord | <Takemichi Hanagaki> In reply to @Jiezron "How do you compile": I compile with command line. |
15:59:03 | FromDiscord | <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:19 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4d3n |
16:01:36 | FromDiscord | <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:07 | FromDiscord | <Takemichi Hanagaki> But, in this project specif it was breaking indentation.↵But I resolved it. |
16:02:18 | FromDiscord | <Takemichi Hanagaki> (edit) "specif" => "specifc" |
16:02:33 | FromDiscord | <Takemichi Hanagaki> (edit) "specifc" => "in special" |
16:02:48 | FromDiscord | <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:19 | FromDiscord | <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:41 | FromDiscord | <albassort> is there a float version of countuop |
16:37:43 | FromDiscord | <albassort> (edit) "countuop" => "countup" |
16:47:10 | * | fallback joined #nim |
16:49:42 | FromDiscord | <auxym> no but should be pretty straightforward to implement your own |
16:57:15 | FromDiscord | <can.l> sent a code paste, see https://play.nim-lang.org/#ix=4d3Q |
17:09:14 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1030165325364334762/unknown.png |
17:09:17 | FromDiscord | <albassort> turns out mine is much fater |
17:09:24 | FromDiscord | <albassort> (edit) "fater" => "faster" |
17:09:28 | FromDiscord | <albassort> take that cpp nerd |
17:10:02 | FromDiscord | <Patitotective> In reply to @albassort "": why not rainbow :[ |
17:10:09 | FromDiscord | <albassort> what? |
17:10:19 | FromDiscord | <Patitotective> thats not the rainbow colors |
17:10:22 | FromDiscord | <albassort> it is |
17:10:23 | FromDiscord | <Patitotective> (edit) "thats" => "those are" |
17:10:24 | FromDiscord | <albassort> i modified it |
17:10:37 | FromDiscord | <Patitotective> In reply to @albassort "i modified it": which means theyre not |
17:10:45 | FromDiscord | <albassort> i like my colors a bit brigher and thicker |
17:10:51 | FromDiscord | <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:54 | Amun-Ra | that'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:51 | FromDiscord | <Bung> https://github.com/nim-lang/Nim/issues/20152 is this legal |
19:41:17 | * | kenran joined #nim |
19:55:03 | FromDiscord | <Patitotective> what should i use then? https://media.discordapp.net/attachments/371759389889003532/1030207057627988108/unknown.png |
20:10:52 | Amun-Ra | I guess https://nim-lang.org/docs/times.html#initTime%2Cint64%2CNanosecondRange |
20:15:27 | * | LuxuryMode joined #nim |
20:34:56 | NimEventer | New 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:44 | FromDiscord | <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:33 | FromDiscord | <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:37 | FromDiscord | <impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=4d5B |
22:29:25 | FromDiscord | <impbox [ftsf]> oooh got it to work, had to pass `--exceptions:setjmp` |
22:29:31 | FromDiscord | <impbox [ftsf]> not sure why the default doesn't work |
22:29:50 | FromDiscord | <impbox [ftsf]> ahh maybe because threads |
22:41:34 | * | strogon14 joined #nim |
22:44:41 | strogon14 | I 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:52 | FromDiscord | <Patitotective> In reply to @strogon14 "I have a C": `msg[0].addr` is fine |
22:46:09 | strogon14 | ok, good to know. |
22:46:10 | FromDiscord | <Patitotective> though i think `cstring`s work better |
22:48:37 | strogon14 | I 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:26 | FromDiscord | <Patitotective> In reply to @strogon14 "I need to collect": don't really know |
22:50:42 | FromDiscord | <Patitotective> In reply to @strogon14 "I have a C": you can do `msg: string`, `msg[0].addr` and `msg.len` though |
22:51:21 | strogon14 | The buffer can have nulls in it, so string is out. |
22:51:59 | FromDiscord | <Patitotective> nulls like `\0`? |
22:53:27 | strogon14 | yes |
22:59:07 | FromDiscord | <Patitotective> whats the exact problem with nulls? wouldnt `str[0..<str.find('\0')]` work? |
23:02:02 | FromDiscord | <Bung> @ElegantBeef https://github.com/nim-lang/Nim/issues/20152 is this legal |
23:04:20 | FromDiscord | <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:46 | strogon14 | But 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:06 | strogon14 | sorry for all the typos :( |
23:07:31 | strogon14 | I'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:45 | strogon14 | Or can I? Indeed I can: https://play.nim-lang.org/#ix=4d5P I got confused by the way echo handles strings. |
23:17:04 | FromDiscord | <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:34 | strogon14 | I'm not sure for what I would need 'find'? |
23:21:01 | strogon14 | Anyway, my example works with 'string' too: https://play.nim-lang.org/#ix=4d5R |
23:22:40 | FromDiscord | <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:32 | strogon14 | ah, ok, now I understand. |
23:42:05 | FromDiscord | <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:34 | FromDiscord | <Patitotective> and if you can, save some memory `str.toOpenArray(0, str.find('\0')-1)` |
23:49:14 | * | neceve joined #nim |