<< 08-05-2022 >>

00:02:55FromDiscord<sOkam!> If you have a proc that reads something like `proc doThing(val1:string, val2:bool):string`↵What's the syntax for calling it without brackets?↵I thought it was possible to do `let newThing = doThing "one", true`, but its complaining of wrong indentation at the `,` 🤔
00:03:32FromDiscord<Elegantbeef> That is the syntax so i can only reason you're doing something mildly off
00:03:48FromDiscord<Elegantbeef> You dont have chained command syntax do you?
00:04:51FromDiscord<sOkam!> dunno what chained command means. does `/` operand from `os` count as another command? https://media.discordapp.net/attachments/371759389889003532/972650248403058688/unknown.png
00:05:50FromDiscord<Elegantbeef> i dont recall how that's going to bind but yea do md(rlsDir / modVers, true)\`
00:28:19FromDiscord<ajusa> oh hey beef could nimscripter be used to provide something like hot reloading?
00:28:52FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3Xgd
00:29:01FromDiscord<sOkam!> (edit) "https://play.nim-lang.org/#ix=3Xgd" => "https://play.nim-lang.org/#ix=3Xge"
00:29:46FromDiscord<sOkam!> (edit) "https://play.nim-lang.org/#ix=3Xge" => "https://play.nim-lang.org/#ix=3Xgf"
00:30:32FromDiscord<Yardanico> @sOkam! you didn't export it
00:30:33FromDiscord<Yardanico> 🤷
00:30:53FromDiscord<sOkam!> F, how many times do I have to read that to remember it 🙈
00:30:59FromDiscord<sOkam!> my god men 😄
00:56:24FromDiscord<Elegantbeef> @ajusa\: it could of course 😄
00:56:32FromDiscord<Elegantbeef> Have you not seen my snake example?
00:56:39FromDiscord<ajusa> nope, is it on github?
00:57:00FromDiscord<Elegantbeef> It's not i've been meaning of making an example on github
00:57:17FromDiscord<Elegantbeef> https://www.jasonbeetham.com/snake/nicoscripter.html is where it's at if curious
00:57:37FromDiscord<Elegantbeef> I'm personally investigating using wasm for gameplay scripting of my next project
00:58:48FromDiscord<Elegantbeef> The benefit of wasm is it allows you a plugin system that is language agnostic and sandboxed
00:59:29FromDiscord<Elegantbeef> So you can write your code in any wasm compilable language and distribute it safely with user generated content
01:00:57FromDiscord<Elegantbeef> Ajusa regrets asking
01:01:24*duuuuuude quit (Ping timeout: 248 seconds)
01:02:50FromDiscord<ajusa> well uh
01:03:02FromDiscord<creikey> In reply to @Elegantbeef "The benefit of wasm": kinda curious what does the abi of wasm look like
01:03:09FromDiscord<creikey> like is there a standard way to "call a function" in wasm
01:03:33FromDiscord<ajusa> what I was looking to use it for was (slightly) better hot reloading for something like nimja, but I'm not sure if nimscripter would be a good fit for that
01:03:37FromDiscord<Elegantbeef> `i32, f32 i64, f64, v128, externRef, funcRef, tableRef, memoryRef`
01:03:46FromDiscord<Elegantbeef> That's all that WASM has
01:04:12FromDiscord<Elegantbeef> the `ref`s are safe integers that just give you a sort of key to do things on the native side
01:04:18FromDiscord<Elegantbeef> Atleast as i understand it
01:04:25FromDiscord<ajusa> (edit) "nimja," => "nimja templates,"
01:04:55FromDiscord<Elegantbeef> Ajusa have you looked at this example? https://github.com/beef331/nimscripter/tree/master/examples/macrorepl
01:05:12FromDiscord<Elegantbeef> This is it in use https://streamable.com/c6farb
01:06:52FromDiscord<Elegantbeef> Creikey the way it works from host -\> runtime is you grab the function by name and pass the arguements and get an array of return values back
01:07:16FromDiscord<Elegantbeef> Runtime -\> Host, the host makes a module adds it to the vm context and then the runtime code just imports it afaik
01:07:27FromDiscord<Elegantbeef> I'm using wasmedge which is where this happens
01:07:41NimEventerNew Nimble package! tmpnim - Create and remove ramdisks easily, see https://github.com/ment1na/tmpnim
01:07:59FromDiscord<Elegantbeef> I'm very very chuffed with how simple it is to make primtive modules to run inside wasmedge https://github.com/beef331/wasmedge_playground/blob/master/wasmsources/maths.nim this is all that's required
01:08:37FromDiscord<Elegantbeef> there is also a config.nims and it requires emcc but i mean that's just nothing
01:08:48FromDiscord<Elegantbeef> I can put a file in that folder and compile it and get a .wasm out
01:09:57FromDiscord<Andreas> sent a code paste, see https://play.nim-lang.org/#ix=3Xgk
01:10:02FromDiscord<Elegantbeef> Dont know if i answered your question crieikey i dont really know much about it as i havent toyed with it much
01:10:07FromDiscord<Yardanico> In reply to @Andreas "Is it possible to": nope, not possible
01:10:24FromDiscord<Andreas> In reply to @Yardanico "nope, not possible": thx,
01:10:32FromDiscord<Yardanico> Andreas asking Nim questions :DD
01:10:46FromDiscord<Yardanico> glitch in the matrix
01:10:48FromDiscord<Elegantbeef> You do `Node` and if you want to be certain put a `assert Node.kind == leaf` at the end
01:11:01FromDiscord<Elegantbeef> Yea the irony hit me aswell 😄
01:11:46FromDiscord<Andreas> In reply to @Elegantbeef "You do `Node` and": hey, you macro/template-tigers - what about some magic here >
01:12:07FromDiscord<Andreas> (edit) ">" => "?"
01:12:12FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/D5Z
01:12:28FromDiscord<Yardanico> @Beef i think they want other code to know that this proc returns a specific branch
01:12:36FromDiscord<Yardanico> @Andreas there's no type narrowing for object variants generally in Nim
01:12:46FromDiscord<Yardanico> even if you switch through object variant kinds with `case`
01:12:57FromDiscord<Elegantbeef> I mean you can make macro that is `{.ensureKind: Leaf.}` and annotate the proc, but yea it's just complexity for no reward
01:13:06FromDiscord<Andreas> @Yardanico you read my mind,, it want to save the pattern-check in the receivinf-proc
01:13:18FromDiscord<Andreas> (edit) "receivinf-proc" => "receiving-proc"
01:13:36FromDiscord<Elegantbeef> You could fusion/matching for some pattern matching
01:13:48FromDiscord<Elegantbeef> There are also ADT-esque macro packages
01:14:00FromDiscord<Yardanico> In reply to @Elegantbeef "You could fusion/matching for": the updated version is in hmisc
01:14:01FromDiscord<Yardanico> https://haxscramper.github.io/hmisc/hmisc/macros/matching.html
01:14:05FromDiscord<Yardanico> since fusion is abandoned
01:14:37FromDiscord<Andreas> great, i'll stay with the std-lib for now... ty again..
01:14:40FromDiscord<Elegantbeef> Nim compatibility is not a concern there
01:17:33FromDiscord<Yardanico> In reply to @Andreas "great, i'll stay with": btw, just to let you know about the joke above (or for others who might be reading) - Nim's creator is named Andreas Rumpf, so it's a bit ironic to see Andreas asking Nim questions :)
01:17:50FromDiscord<Elegantbeef> It's as ironic as me not using beef-lang
01:20:00FromDiscord<Andreas> In reply to @Yardanico "btw, just to let": yeah, but i'm no the teacher here - just to get this straight 😉 If my google-results are correct the Arak is a working-teacher, isn't he ?
01:20:09FromDiscord<Yardanico> huh, no?
01:20:19FromDiscord<Yardanico> he works on Nim, "Araq" is just his nickname
01:20:29FromDiscord<Andreas> (edit) "Arak" => "Araq-Andreas"
01:20:47FromDiscord<Yardanico> a reference to StarCraft's lore
01:20:55FromDiscord<Yardanico> (so is "karax" by the way)
01:21:05FromDiscord<Elegantbeef> Fucking protos
01:21:24FromDiscord<Yardanico> In reply to @Elegantbeef "Fucking protos": zerg all the way
01:21:38FromDiscord<Elegantbeef> I only play coop and only really play Mensk/Zeratul
01:22:11FromDiscord<Elegantbeef> The starcraft and BSG references, but no SG-1 he's literally satan
01:22:34FromDiscord<Andreas> ic, theres a admirable guy here in germany who is the Dean of a school and works exclusivly with Sandras, Stefanies there - he's the only male at school - and his name is Andreas Rumpf
01:22:41FromDiscord<Yardanico> heh
01:22:50FromDiscord<Yardanico> a lot of Andreas Rumpfs in Germany :P
01:23:06FromDiscord<Andreas> (edit) "Rumpf" => "Rumpf.↵But that might be another guy.."
01:23:21FromDiscord<Elegantbeef> John Smith is a unique name trust me
01:23:41FromDiscord<Andreas> Andreas is/was a common name in germany during the 70'ties. Thesedays not so much..
01:23:44FromDiscord<Yardanico> sadly araq doesn't have a wikipedia article about him, but at least there's a wikidata entry
01:23:47FromDiscord<Yardanico> https://www.wikidata.org/wiki/Q60678874
01:23:55FromDiscord<Yardanico> "instance of human" lies
01:24:34FromDiscord<Andreas> yeah, the german Wikipedia has no entry on Nim - the englich has.. strange
01:24:43FromDiscord<Yardanico> no, I mean about Andreas himself :)
01:24:49FromDiscord<Andreas> (edit) "englich" => "english"
01:25:09FromDiscord<Elegantbeef> Software is only written in english
01:25:19FromDiscord<Elegantbeef> Everything else is a poor substitute of english
01:27:20FromDiscord<Andreas> you know, evrbd. is so crazy about germany lagging behind in tech-stuff - and there you have a pretty competitive language, i'd say way ahead of zig, more mature than Go, and thats great that it's not from SF thistime..
01:27:41FromDiscord<Andreas> (edit) "thistime.." => "this time.."
01:27:43FromDiscord<Elegantbeef> Except it has the adoption of oberon
01:27:48FromDiscord<Alea> In reply to @Elegantbeef "Software is only written": So everything is written in prolog :hmm:
01:28:19FromDiscord<Alea> I might be mixing that up
01:28:28FromDiscord<Alea> Whatever lang has 'is' keywords
01:28:35FromDiscord<Elegantbeef> Nim
01:28:36FromDiscord<Andreas> i'd call it a 'sleeping giant', just be patient
01:28:53FromDiscord<Yardanico> interesting, contributing to wikidata is really easy
01:29:12FromDiscord<Yardanico> I made it so that Nim entry is also an instance of "free software" (it weren't for some reason)
01:29:29FromDiscord<!Patitotective> In reply to @Elegantbeef "Everything else is a": yea https://github.com/UltiRequiem/rustico
01:53:13FromDiscord<konsumlamm> In reply to @Andreas "you know, evrbd. is": "more mature than Go" is a huge overstatement imo
01:56:33FromDiscord<Andreas> In reply to @konsumlamm ""more mature than Go"": ok, how about more elegant :]
01:57:01FromDiscord<Andreas> (edit) "In reply to @konsumlamm ""more mature than Go"": ok, how about more elegant :] ... " added ", but less hip"
01:58:11FromDiscord<konsumlamm> sure
01:58:34FromDiscord<Elegantbeef> I'd also argue it's better designed but the bar is low in mo 😄
01:58:46FromDiscord<konsumlamm> but maturity and elegance are completely unrelated
01:58:50FromDiscord<Elegantbeef> "in my opinion" is probably more sany to write brain 😄
02:03:08FromDiscord<Andreas> there are 'advanced-concepts', e.g. did u guys know that CoffeeScript had hygienic-macros in a earlier version ? And then there are 'well done advanced concepts'=mature & reliable. The hygienic-macros did not make it, cos the CS-creator did not like it.. Looking at Scala, hmm very advanced-stuff and well-done, too. But these days they'll reduce features, subtract them from the language, because, hmm. too complicated for the users ? maybe,
02:04:14FromDiscord<Andreas> (edit) "there are 'advanced-concepts', e.g. did u guys know that CoffeeScript had hygienic-macros in a earlier version ? And then there are 'well done advanced concepts'=mature & reliable. The hygienic-macros did not make it, cos the ... CS-creator" added "Jeremy,"
02:18:22FromDiscord<Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=3Xgt
02:18:35FromDiscord<Elegantbeef> you can use a foraward declaration
02:18:37FromDiscord<Yardanico> you need to forward declare a procedure
02:18:57FromDiscord<Yardanico> sent a code paste, see https://paste.rs/eFV
02:19:15FromDiscord<Yardanico> a forward declaration should basically be just the signature of the proc without the body
02:19:26FromDiscord<Yardanico> with all the types/export symbol/etc being the same as the actual implementation that is defined later
02:19:31FromDiscord<Bubblie> oh, that is a bit odd this is the first time ive seen something like this
02:19:48FromDiscord<Elegantbeef> Well top to bottom compiler issue 😄
02:19:58FromDiscord<Bubblie> ah, I see
02:20:41FromDiscord<Elegantbeef> Order independent compilation is a goal eventually
02:20:58FromDiscord<Bubblie> is it planned for the big nim update thats happening, forgot the number
02:21:17FromDiscord<Elegantbeef> v2
02:21:31FromDiscord<Bubblie> yeah
02:21:44FromDiscord<Elegantbeef> I think it's a desire but dont think it's a hard goal
02:22:55FromDiscord<Bubblie> ah okay, I hope it does happen at some point then
02:23:22FromDiscord<Elegantbeef> That and cyclical dependancies are both desired
02:33:42*Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in)
02:45:02*Gustavo6046 joined #nim
02:53:43*arkurious quit (Quit: Leaving)
03:23:15FromDiscord<Elegantbeef> Araq is zerg leader
03:23:33FromDiscord<Mike> Oh thank god
03:23:42FromDiscord<Yardanico> In reply to @Elegantbeef "Araq is zerg leader": one of
03:23:57FromDiscord<Yardanico> "Araq was the cerebrate of the Jormungand Brood.[1]"
03:23:58FromDiscord<Elegantbeef> or 'a' 😄
03:24:20FromDiscord<Mike> My SC1 lore is fuzzy. I just play PvP SC2 all the time
03:24:36FromDiscord<Yardanico> i added even more stuff to the nim wikidata entry for no reason :P
03:24:52FromDiscord<Yardanico> i think it's quite complete now, more complete than most other proglangs (if we exclude all the different DB IDs)
03:25:19FromDiscord<Elegantbeef> Yard you have the weirdest hobby 😄
03:25:27FromDiscord<Elegantbeef> "Oh here is a random thing to toy around with for a few hours"
03:25:30FromDiscord<Yardanico> yes
03:25:35FromDiscord<Yardanico> is that weird? i think it's normal
03:26:58FromDiscord<Yardanico> i'm just preparing for the future where skynet takes over the world - they'll use wikidata as their source of truth, so I'm just making sure Nim is properly represented
03:35:12*noeontheend quit (Ping timeout: 276 seconds)
03:47:14FromDiscord<Bubblie> sent a code paste, see https://paste.rs/Hgu
03:47:56FromDiscord<Yardanico> In reply to @Bubblie "okay so for glfwExtensions": you do `getRequiredInstanceExtensions(addr glfwExtensionCount)`
03:48:02FromDiscord<Bubblie> thanks!
03:49:39FromDiscord<Bubblie> huh it's still not working wtf
03:49:53FromDiscord<Elegantbeef> If compilers could speak they'd say the issue
03:50:52FromDiscord<Bubblie> got it nvm it was me being an absolute idiot
04:22:08*slowButPresent quit (Quit: leaving)
04:25:03*Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in - Stopping for maintenance... Leave messages at my XMPP ([email protected]), or my Discord (Gustavo6046#9009), or possibly my Mastodon [email protected]), or email ([email protected]).)
04:31:12FromDiscord<Bubblie> how do I use a null pointer in nim like null pointers in c
04:33:25*Gustavo6046 joined #nim
04:35:57FromDiscord<Bubblie> what does nim have instead for this
04:39:04FromDiscord<Yardanico> `nil`
04:43:12FromDiscord<Bubblie> oh its just nil? god I feel like an idiot
06:18:49*duuuuuude joined #nim
06:49:15*jmdaemon quit (Ping timeout: 260 seconds)
06:55:48*kenran joined #nim
07:41:19*Zectbumo joined #nim
08:35:35*jjido joined #nim
08:38:45om3gaHello! Error: invalid command line option: '--gcc' - --gcc.exe:musl-gcc..... - static compilation no longer works?
08:45:28FromDiscord<Elegantbeef> om3ga are you sure you have a modern Nim version?
08:45:51FromDiscord<Elegantbeef> And are you properly calling the compiler
08:46:11om3gaElegantbeef: Nim Compiler Version 1.6.2
08:46:19om3ganot too old I think
08:46:56om3gaI used nim.cfg for specifying options. Previously it worked as I remember
08:51:06FromDiscord<Elegantbeef> Based off the shipped `nim.cfg` i dont know if you can just do `gcc.exe =`
08:54:18om3gaElegantbeef, the same error I get by executing using command line: nim --gcc.exe:"musl-gcc" --gcc.linkerexe:"musl-gcc" --passL:-static -d:release c ......
08:54:41om3gawith quotes or not, it throws the same err
08:55:03FromDiscord<Elegantbeef> Yea the issue is that you cannot do `gcc.exe` it's not specific enough i think
08:55:45FromDiscord<Elegantbeef> you have to do `amd64.linux.gcc.exe` or `arm.linux.gcc.exe` i think
08:56:10om3gabut that is for cross compilation if I not mistaken
08:56:29om3gaby providing full path to the compiler I get that: Error: unknown C compiler: 'musl'. Available options are: gcc, switch_gcc, llvm_gcc, clang, bcc, vcc, tcc, env, icl, icc, clang_cl
08:57:08FromDiscord<Elegantbeef> Looks like i'm wrong
08:57:52FromDiscord<Elegantbeef> inside a `config.nims` `--gcc.exe:musl-gcc` works
08:58:13om3gayeah, I remember it worked before
08:58:24om3gastrange...
08:59:53FromDiscord<Elegantbeef> All i can say is i get a successful compile with `--gcc.exe:"musl-gcc"` inside a `config.nims` so i suggest using that instead
09:00:31FromDiscord<Elegantbeef> Actually i dont know if it's properly using musl 😄
09:00:53om3gahmm, let me try.. just a moment...
09:03:16FromDiscord<Elegantbeef> Ah yes it works
09:03:21om3gaElegantbeef, thanks! it works
09:03:37om3gais that new thing? should I avoid using nim.cfg?
09:03:38FromDiscord<Elegantbeef> Lol i make good time apparently 😄
09:03:54FromDiscord<Elegantbeef> It's not that new but yea nimscript is preferred
09:04:15om3gaawesome, without your help I would spend a lot time by finding that
09:04:19om3gathanks a lot!
09:04:41FromDiscord<Elegantbeef> That's what i do, say 1000 wrong things before 1 right one
09:05:34om3gawe all do that :)
09:10:11*lumo_e joined #nim
09:26:06*Zectbumo quit (Remote host closed the connection)
09:38:11*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
10:08:59*smvg joined #nim
10:28:49*smvg quit (Changing host)
10:28:49*smvg joined #nim
10:30:28*xet7 quit (Ping timeout: 248 seconds)
10:44:09*jjido joined #nim
10:45:07FromDiscord<deadmeme77> In reply to @deadmeme77 "someone already reported it": if anyone is interested, I managed to solve this issue (same issue occured with r-studio) by doing this:↵`wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1l-1ubuntu1.3_amd64.deb↵↵sudo dpkg -i libssl1.1_1.1.1l-1ubuntu1.3_amd64.deb`
11:05:12*pch quit (Quit: Leaving)
11:16:17*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
11:17:11*vicecea quit (Remote host closed the connection)
11:17:42*vicecea joined #nim
11:18:02*smvg quit (Quit: smvg)
11:19:00*smvg joined #nim
11:59:15*PMunch joined #nim
12:01:00*slowButPresent joined #nim
12:03:27FromDiscord<d4rckh> is there any quick and easy way of converting a sequence of tuples to a json node using std/json?
12:03:34FromDiscord<d4rckh> (edit) "is there any quick and easy way of converting a sequence of tuples to a json node ... using" added "array"
12:04:13FromDiscord<enthus1ast> does %\ work?
12:04:27FromDiscord<enthus1ast> var myJs = %\ yourSeq
12:04:30FromDiscord<d4rckh> nope
12:04:42FromDiscord<d4rckh> thats what i tried
12:05:05FromDiscord<enthus1ast> what does it say?
12:05:49FromDiscord<d4rckh> https://www.toptal.com/developers/hastebin/ihuxovirov.go
12:07:28FromDiscord<d4rckh> (put in a hastebin so i dont spam the chat)
12:13:31FromDiscord<Yardanico> In reply to @d4rckh "is there any quick": don't think so, however you can easily do it with a loop
12:14:07FromDiscord<Rika> Why not? I feel like it should have worked normally
12:14:16FromDiscord<Yardanico> In reply to @Rika "Why not? I feel": because it's just not there?
12:14:17FromDiscord<amadan> Seems it's a known issue https://github.com/nim-lang/Nim/issues/12290↵Using `toJson` from `std/jsonutils` would also work
12:14:41FromDiscord<Yardanico> In reply to @amadan "Seems it's a known": oh yeah i wanted to try jsonutils, nice that it works there
12:14:55FromDiscord<d4rckh> yup, did it thanks
12:14:56FromDiscord<Yardanico> sent a code paste, see https://paste.rs/R3j
12:15:12FromDiscord<Yardanico> and btw, you generally don't have to post the long part of that error message where it just lists all possible proc overloads
12:15:29FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3XhJ
12:15:38FromDiscord<d4rckh> good to know
12:20:31*smvg quit (Quit: smvg)
12:57:46*smvg joined #nim
13:40:53*smvg quit (Quit: smvg)
14:17:23*arkurious joined #nim
15:34:00*jjido joined #nim
15:44:40*lumo_e quit (Remote host closed the connection)
15:53:27FromDiscord<d4rckh> why does here markAsComplete run before the case finished? https://media.discordapp.net/attachments/371759389889003532/972888974139994122/unknown.png
15:53:52FromDiscord<d4rckh> markAsComplete just completes a future
15:53:52FromDiscord<Yardanico> how do you know that "before teh case finished"?
15:54:00FromDiscord<d4rckh> good question
15:54:02FromDiscord<d4rckh> well
15:54:04FromDiscord<Yardanico> (edit) "teh" => "the"
15:54:20FromDiscord<Yardanico> this really can't be true, try adding more `echo`s around to see what's actually going on
15:54:28FromDiscord<d4rckh> i think i found the problem
15:54:32FromDiscord<Rika> congrats
16:00:08FromDiscord<d4rckh> i cant write `"\t"` using styledWrite?
16:00:11FromDiscord<d4rckh> (edit) "write" => "print"
16:01:11FromDiscord<d4rckh> ah, nvm
16:04:18FromDiscord<sOkam!> Total newb Q: ↵How does one convert a seq to a string containing a comma separated list of each element of the seq?↵So, going from `@["one", "two", "three"]` to `"one, two, three`
16:04:40FromDiscord<d4rckh> mySeq.join(", ")
16:04:42FromDiscord<Rika> join in strutils
16:05:03FromDiscord<sOkam!> oh join can take a separator input, tyty
16:05:14FromDiscord<sOkam!> does join include a whitespace between values by default?
16:05:19FromDiscord<Yardanico> no
16:05:22FromDiscord<Yardanico> you just add a space to the string
16:08:34FromDiscord<!Patitotective> is elegant the surname or beef? 🤔
16:09:32FromDiscord<Rika> what?
16:10:41FromDiscord<!Patitotective> what surname do you want? rika https://media.discordapp.net/attachments/371759389889003532/972893309326487602/unknown.png
16:10:50*lumo_e joined #nim
16:12:30FromDiscord<Rika> idk nanakusa?
16:17:32FromDiscord<hmmm> its rika-sama
16:19:05FromDiscord<Rika> ok
16:21:52FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3XiS
16:23:32FromDiscord<Yardanico> In reply to @sOkam! "How would you filter": `in` checks if `a` is in b
16:23:41FromDiscord<Yardanico> you're checking if your filename is in the ".so" string, you need to do the reverse
16:23:44FromDiscord<Yardanico> `".so" in it`
16:24:36FromDiscord<sOkam!> 👌
16:27:28*smvg joined #nim
16:34:07*duuuuuude quit (Ping timeout: 246 seconds)
16:47:11*duuuuuude joined #nim
16:51:04FromDiscord<huantian> I would probably use str.endsWith() personally
16:51:04FromDiscord<d4rckh> id actually only check if the last 3 characters are equal to ".20"
16:51:05FromDiscord<d4rckh> (edit) "".20"" => "".so""
16:51:13FromDiscord<d4rckh> or endsWith
16:54:01FromDiscord<huantian> Though with .so there could be version numbers after the .so part
17:14:23Amun-Rathere should be .so symlink in that case somewhere
17:17:22FromDiscord<huantian> That’s true, ig it just depends on what they’re trying to do with this
17:23:00FromDiscord<Rika> usually there are symlinks that "reduce a level of its version"
17:23:20FromDiscord<Rika> that is, 5.5.5.so -> 5.5.so -> 5.so -> .so if its the latest ver
17:23:42FromDiscord<Rika> though actually omit the 5.so if semantic ver.
17:39:32FromDiscord<d4rckh> is there any way to make running programs using execCmdEx not block the program? (without using threads)
17:39:56FromDiscord<huantian> I think it’s startProcess?
17:40:17FromDiscord<d4rckh> yes `execCmdEx` uses startProcess
17:40:19FromDiscord<sOkam!> In this case, its just three files that are known to end in .so, with a preset name that is always output the same way. No variance, or potential `filething.solarium.exe` kind of stuff happening
17:46:17NimEventerNew post on r/nim by CanMyPro: Redirect input/output using startProcess, see https://reddit.com/r/nim/comments/ul7117/redirect_inputoutput_using_startprocess/
17:51:43FromDiscord<sOkam!> Is there an alternative way to mark procs as "don't use this externally", other than using `_theProc`?
17:52:31FromDiscord<sOkam!> I know procs that are not exported are not known externally, its more as a note to future self reading it
17:56:06FromDiscord<Rika> put internal in the name?
17:56:26FromDiscord<Rika> make a dummy pragma `{.pragma internal.}` then annotate the procs with it
17:56:57FromDiscord<Rika> sorry, `{.pragma: internal.}`
17:57:22FromDiscord<sOkam!> does that prevent procs with the same name to be considered equal and raise an error?
17:57:31FromDiscord<Rika> no
17:57:34FromDiscord<Rika> wait
17:57:44FromDiscord<Rika> what do you meant
17:57:45FromDiscord<Rika> (edit) "meant" => "mean"
17:57:50FromDiscord<Rika> im not sure
17:58:39FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3Xj9
17:58:47*duuuuuude quit (Ping timeout: 240 seconds)
17:59:02FromDiscord<sOkam!> (edit) "https://play.nim-lang.org/#ix=3Xj9" => "https://play.nim-lang.org/#ix=3Xja"
17:59:07FromDiscord<Rika> no, names must be different
17:59:19FromDiscord<Rika> btw leading/trailing underscores are disallowed
17:59:31FromDiscord<Rika> consecutive underscores as well
17:59:56FromDiscord<sOkam!> oh 😦
18:00:42FromDiscord<Rika> if you really want to avoid renaming, separate them by module i believe would work? i dont recall too well
18:01:03FromDiscord<sOkam!> i guess ill stick with renaming
18:07:31*duuuuuude joined #nim
18:08:29FromDiscord<sOkam!> How would you safely split a string, that contains a space separated list of files, into a sequence containing each file?
18:09:11FromDiscord<sOkam!> Worried about folders or filenames with spaces getting in the way, else I would just use `split(" ")`... but dunno if there is a better way
18:12:09*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
18:12:38FromDiscord<Yardanico> In reply to @sOkam! "Worried about folders or": but then how do you distinguish between a file with a space or a new entry?
18:12:46FromDiscord<Yardanico> then you should quote file paths or something
18:13:00FromDiscord<Yardanico> In reply to @sOkam! "How would you filter": and if you get it from here, then you can just add that quoting right there
18:13:48FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3Xjd
18:13:50FromDiscord<sOkam!> ah no, this is something difference
18:13:59FromDiscord<sOkam!> (edit) "difference" => "different"
18:14:22FromDiscord<sOkam!> this is tied to the zip command, that takes a space separated list of files
18:15:13FromDiscord<sOkam!> basically trying to create a replacement for the usual bash scripting stuff that I was using, so that I can stop using bash at all where possible (which is gonna be like 99% of my usecases)
18:17:48FromDiscord<sOkam!> In reply to @Yardanico "but then how do": how would you separate the files into a sequence, when they are using quotes? just doing `split("" "")`? or how do you signal a double quote inside a string?
18:18:16FromDiscord<Yardanico> well it really depends, what if the file also has " in the name?
18:18:29FromDiscord<Yardanico> where do you get this string anyway?
18:18:49FromDiscord<sOkam!> can they? i thought quotes were not allowed in filenames
18:19:56FromDiscord<Yardanico> In reply to @sOkam! "can they? i thought": they are
18:20:10FromDiscord<Yardanico> not on windows, but on linux
18:20:23FromDiscord<sOkam!> i see
18:21:03FromDiscord<sOkam!> I think I will stick to spaces, and disallow space separated filenames. I never use them anyway, so should be good for this
18:21:38FromDiscord<sOkam!> (edit) "space separated filenames." => "filenames containing spaces."
18:22:35FromDiscord<Rika> quoting and escaping rules are more complex to implement so yeah
18:31:47*jjido joined #nim
18:32:27FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3Xjh
18:39:41FromDiscord<Zectbumo> I think you are looking for the index
18:40:40FromDiscord<sOkam!> Is that like a property that you can call in any seq? If yes, I don't know how to call for it
18:41:28FromDiscord<sOkam!> seq1[it] maybe? do they work as arrays too, or is there another way?
18:42:41FromDiscord<sOkam!> (edit) "way?" => "way?↵_just found it on a g-search, that seems to work_"
18:47:16FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3Xjn
18:48:30FromDiscord<Zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=3Xjo
18:49:07FromDiscord<sOkam!> what do the separated iterators mean?
18:49:21FromDiscord<Zectbumo> i is the index
18:50:16*duuuuuude quit (Ping timeout: 246 seconds)
18:50:16FromDiscord<sOkam!> so seq1 is split into `index, value` when doing an iteration like that?
18:50:22FromDiscord<Zectbumo> Yes
18:50:50FromDiscord<sOkam!> kk. Need to read about iterators, it seems ✍️
18:51:23FromDiscord<huantian> You can also probably use mitems
18:54:39FromDiscord<Zectbumo> Hmm, i don't actually see it mentioned in the manual in the for statement section
18:54:45FromDiscord<theangryepicbanana> is there a way to declare a type as `not nil` like `type Foo = ref object not nil ...`?
18:55:06FromDiscord<huantian> Look at experimental flag strictNotNil
18:55:09FromDiscord<theangryepicbanana> I did
18:55:56FromDiscord<theangryepicbanana> I'm fully aware that it's not documented nor directly useable like my example
18:56:13FromDiscord<Elegantbeef> It's not usable that way you need to use it on an alias
18:56:14FromDiscord<theangryepicbanana> I'm just wondering if there's some other way to do it without declaring 2 types
18:56:34FromDiscord<sOkam!> In reply to @huantian "You can also probably": its forcing me to declare a new variable to store the input of the function, since its considered a let
18:56:46FromDiscord<sOkam!> (edit) "variable" => "var"
18:57:08FromDiscord<sOkam!> looks handy though, will try to remember its existence
18:57:39FromDiscord<theangryepicbanana> In reply to @Elegantbeef "It's not usable that": how hard would it be to add this to the language grammar? it seems pretty straightforward to me
18:58:09FromDiscord<Elegantbeef> I'm not a real compiler dev but you're proobably right
18:58:38FromDiscord<Elegantbeef> remove the `not` infix, make the left hand the actual type and add `sfNotNil` to the symbol
18:59:17FromDiscord<theangryepicbanana> example? `not nil` is the notation used to describe a non-null type
18:59:27FromDiscord<theangryepicbanana> ideally it would still be used
19:00:22FromDiscord<theangryepicbanana> since `nil` as a modifier does the opposite
19:01:13FromDiscord<huantian> sent a code paste, see https://play.nim-lang.org/#ix=3Xjt
19:09:16FromDiscord<sOkam!> Genious, hahaha 😄↵Am I using the wrong proc or something? https://media.discordapp.net/attachments/371759389889003532/972938250329149460/unknown.png https://media.discordapp.net/attachments/371759389889003532/972938250715017276/unknown.png
19:13:03FromDiscord<sOkam!> I'm calling it from a `withDir theFolder:` block, in case this changes things https://media.discordapp.net/attachments/371759389889003532/972939204168392704/unknown.png
19:13:06*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
19:13:33FromDiscord<huantian> Or just use applyIt https://nim-lang.org/docs/sequtils.html#applyIt.t,untyped,untyped
19:13:47FromDiscord<huantian> Wups my wife dird
19:14:15FromDiscord<huantian> Are you converting a seq of absolute paths to relative paths ?
19:14:22FromDiscord<huantian> (edit) "wife dird" => "wifi died"
19:15:07FromDiscord<sOkam!> yep
19:16:53FromDiscord<huantian> Try using relativePath, then normalizePath
19:17:03*duuuuuude joined #nim
19:17:07FromDiscord<huantian> Maybe??
19:17:13FromDiscord<huantian> No that’ll just make it absolute again
19:17:52FromDiscord<huantian> Actually no it should work
19:18:33FromDiscord<sOkam!> shouldn't `relativePath` actually output the expected relative path, without all the silliness?
19:18:49FromDiscord<sOkam!> Maybe I'm not understanding what the proc is meant to do?
19:20:46FromDiscord<huantian> I haven’t used that proc before tbh
19:21:20FromDiscord<sOkam!> ohhh waaait https://media.discordapp.net/attachments/371759389889003532/972941289127575652/unknown.png
19:21:40FromDiscord<sOkam!> what's that `/` doing there? that's implied, I didn't add it
19:22:12FromDiscord<sOkam!> (edit) "waaait" => "waaait↵what's that `/` doing there? that's implied, I didn't add it↵I guess I'll reread the manual, might have missed something"
19:23:16FromDiscord<huantian> You want normalizedPath for the not in place version
19:25:38FromDiscord<sOkam!> In reply to @huantian "You want normalizedPath for": wdym by "not in place"?
19:28:27FromDiscord<huantian> look at the examples for each proc
19:31:03FromDiscord<sOkam!> didn't seem to work https://media.discordapp.net/attachments/371759389889003532/972943732469022750/unknown.png https://media.discordapp.net/attachments/371759389889003532/972943732687134720/unknown.png
19:48:17FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3XjI
19:54:41PMunchHmm, so Nim doesn't have do-while loops. What's the most efficient way to do those?
19:55:20PMunchA simple template with `body; while condition: body` seems fine, but it essentially duplicates the size of the code
20:01:44FromDiscord<Yardanico> In reply to @PMunch "Hmm, so Nim doesn't": Maybe something like
20:01:52FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3XjN
20:02:32FromDiscord<Yardanico> oh wait wrong i think
20:03:09FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3XjO
20:03:09FromDiscord<Yardanico> yeah, condition should be updated after the body
20:03:11PMunchI did a `while true: body; if not condition: break`
20:03:21PMunchSaves me from using a variable
20:03:40FromDiscord<Yardanico> well, there will be a variable in the compiled C code anyway, so no difference :)
20:04:13PMunchWould it?
20:04:17FromDiscord<Yardanico> yes
20:04:31PMunchI think that's just a goto
20:06:56FromDiscord<Yardanico> oh yeah
20:07:06FromDiscord<Yardanico> but at least for x86_64 for this code C compilers make the exact same assembly
20:07:14FromDiscord<Yardanico> not sure about embedded targets
20:12:50FromDiscord<Yardanico> also a bit funny that C compilers actually optimize "body; while cond: body" into the same construct as mine and your ways
20:13:02FromDiscord<Yardanico> ah no, they don't, sorryu
20:13:03FromDiscord<Yardanico> (edit) "sorryu" => "sorry"
20:13:14FromDiscord<Yardanico> hmm they actually do 🤔
20:13:29FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/972954412114919424/unknown.png
20:13:34FromDiscord<Yardanico> just the order in main3 is a bit different
20:14:30PMunchYardanico, well this is AVR :P
20:15:24FromDiscord<Yardanico> too bad nim on godbolt only has access to GCC :(
20:15:29FromDiscord<Yardanico> the x86_64 gcc
20:15:44FromDiscord<Yardanico> i mean, 32-bit works too, but I don't think others would
20:24:58FromDiscord<planetis> godbolt output is scrambled and useless
20:26:03FromDiscord<Yardanico> In reply to @planetis "godbolt output is scrambled": not useless, it's okay
20:26:12FromDiscord<Yardanico> i know for nim it only shows the main module, but that's enough in some cases
20:29:23FromDiscord<planetis> honestly you make more sense of it, if you use objdump with source code
20:39:34FromDiscord<Elegantbeef> I was more saying what the compiler would need to do↵(@theangryepicbanana)
20:42:00FromDiscord<theangryepicbanana> In reply to @Elegantbeef "I was more saying": ah gotcha
20:45:02*jjido joined #nim
20:48:03*duuuuuude quit (Ping timeout: 276 seconds)
20:48:23*PMunch quit (Quit: leaving)
20:53:57*jmdaemon joined #nim
21:09:26*kenran quit (Quit: WeeChat info:version)
21:16:41*noeontheend joined #nim
21:37:03*duuuuuude joined #nim
21:42:53*smvg quit (Quit: smvg)
22:02:55*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
22:12:32FromDiscord<theangryepicbanana> I'm getting this error when trying to install nim via choosenim on windows https://media.discordapp.net/attachments/371759389889003532/972984369503416400/unknown.png
22:13:25FromDiscord<Elegantbeef> Oh noes we might learn your name! ;D
22:13:30FromDiscord<theangryepicbanana> according to 7zip, the zip isn't corrupted
22:13:40FromDiscord<Elegantbeef> Jokes aside uhh choosenim -v?
22:14:01FromDiscord<theangryepicbanana> choosenim isn't installed so that errors
22:14:43FromDiscord<theangryepicbanana> ahhh it's not in my path
22:14:46FromDiscord<Elegantbeef> What version of windows?
22:14:48FromDiscord<theangryepicbanana> though it's weird that it wouldn't do that first
22:14:53FromDiscord<theangryepicbanana> 10
22:15:16FromDiscord<theangryepicbanana> sent a code paste, see https://play.nim-lang.org/#ix=3Xki
22:16:27FromDiscord<theangryepicbanana> I'll probably just copy the zip contents myself
22:18:44FromDiscord<theangryepicbanana> ok so it seems to be an issue with whatever choosenim uses to extract zip files
22:20:26FromDiscord<dom96> @theangryepicbanana see https://forum.nim-lang.org/t/9144#59753
22:23:36FromDiscord<theangryepicbanana> OHHH does nim actually need gcc?
22:23:42FromDiscord<theangryepicbanana> I assumed I could use msvc
22:34:00*duuuuuude quit (Ping timeout: 276 seconds)
22:38:29FromDiscord<!Patitotective> In reply to @Rika "ok": ok
22:48:13FromDiscord<!Patitotective> do you want to be here? @hmmm https://media.discordapp.net/attachments/371759389889003532/972993353664847872/Captura_de_pantalla_de_2022-05-08_17-47-10.png
23:01:45FromDiscord<theangryepicbanana> well I got it installed but I'm stuck on the 32-bit build because cygwin's website is down and the installation doesn't work on msys2 64bit
23:05:42FromDiscord<theangryepicbanana> ah at least devel worked for some reason
23:09:49FromDiscord<!Patitotective> In reply to @Patitotective "do you want to": h. mmm
23:18:54*Zectbumo joined #nim
23:25:56FromDiscord<theangryepicbanana> sent a code paste, see https://play.nim-lang.org/#ix=3Xky
23:26:13FromDiscord<Elegantbeef> Not parsable
23:26:16FromDiscord<theangryepicbanana> how?
23:26:33FromDiscord<theangryepicbanana> `type` shares the same indentation level as `foo:`, no?
23:26:36FromDiscord<Elegantbeef> type defs have a specific AST that needs to exist
23:26:43FromDiscord<Elegantbeef> Atleast i think
23:27:04FromDiscord<theangryepicbanana> likewise, apparently type defs cannot be passed as regular arguments, so the `:` is required
23:48:27*Zectbumo_ joined #nim
23:49:08*Zectbumo quit (Ping timeout: 260 seconds)
23:57:47FromDiscord<hmmm> In reply to @Patitotective "do you want to": yes pls, uncle hmm for me 😄 👍 😛