<< 19-02-2021 >>

00:13:55*Vladar quit (Quit: Leaving)
00:27:47*krux02 quit (Ping timeout: 256 seconds)
00:40:03*abm quit (Read error: Connection reset by peer)
00:42:12*lkjasdf quit (Quit: gone to dinner)
00:42:31*lritter quit (Quit: Leaving)
01:18:24*Tanger joined #nim
01:27:06*asdflkj_ joined #nim
01:51:39*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
01:51:59*njoseph joined #nim
02:00:41*jxy_ quit (Quit: leaving)
02:01:01*jxy joined #nim
02:37:20*Tanger is now known as nohosuro
02:37:31*nohosuro is now known as nohusuro
02:45:39*nohusuro is now known as loggerer
02:52:58*JustASlacker quit (Ping timeout: 272 seconds)
02:54:07ForumUpdaterBotNew thread by Exelotl: How to allow out of bounds access on sized arrays?, see https://forum.nim-lang.org/t/7533
02:55:21*loggerer is now known as Tanger
02:59:35*wasted_youth2 quit (Quit: Leaving)
04:01:13*Evolver quit (Ping timeout: 260 seconds)
04:01:20*kinkinkijkin quit (Read error: Connection reset by peer)
04:02:07*kinkinkijkin joined #nim
04:02:59*Evolver joined #nim
04:03:21*rayman22201 quit (Ping timeout: 268 seconds)
04:04:23*rayman22201 joined #nim
04:18:20*asdflkj_ quit (Ping timeout: 260 seconds)
04:38:03*spiderstew joined #nim
04:39:05*spiderstew_ quit (Ping timeout: 240 seconds)
05:03:32*astronavt___ is now known as astronavt
05:18:48*letto quit (Ping timeout: 246 seconds)
05:21:25*zedeus quit (Ping timeout: 240 seconds)
05:26:16*narimiran joined #nim
06:04:01PrestigeIs there a way to create a table at compile time if it's based on an enum?
06:05:24PrestigeI'm using the string values of the enums to create a lookup (kebab-case string to camelCase, sort of). I'm thinking it can be done but I'm not sure how
06:17:12FromDiscord<ElegantBeef> Just use an `array[enum,T]`
06:22:44narimiran1.2.10 RC and 1.4.4 RC are out! please try them and give us feedback (even if everything works fine :))
06:22:48narimiran1.2.x: https://github.com/nim-lang/nightlies/releases/tag/2021-02-18-version-1-2-a48abc262c843ffacd59d5a412313590e8e319f7
06:22:53narimiran1.4.x: https://github.com/nim-lang/nightlies/releases/tag/2021-02-19-version-1-4-a154acda854ca89fa94e7cabfac2bb4219bfb5de
06:23:37PrestigeI also can't seem to figure out how to mkdir
06:23:54FromDiscord<ElegantBeef> At CT?
06:23:59Prestigeomg it's called createDir
06:24:23*vicfred quit (Quit: Leaving)
06:25:40Prestigetook me way too long to find that
06:30:56FromDiscord<ElegantBeef> Did you resolve your table?
06:31:13Prestigenah idk if I'll even do that yet
06:31:41PrestigeAdding an ipc cli client to nimdow, my function names are camelCase. Might just have the cli client do the same
06:32:20Prestigelike `nimdow --command toggleFullscreen` or whatever
06:32:39FromDiscord<ElegantBeef> just remove `-` and `normalizeNimIdent` it πŸ˜„
06:33:22PrestigeHaven't heard of that last one. Link?
06:33:41FromDiscord<ElegantBeef> https://nim-lang.org/docs/strutils.html#nimIdentNormalize%2Cstring
06:35:06Prestigehm so it'd be like togglefullscreen after that eh?
06:35:50Prestigemaybe I could use cmpIgnoreStyle
06:36:24FromDiscord<ElegantBeef> Yea, just make it style insensitive like nim πŸ˜„
06:36:37Prestigeoh then I can't do a lookup actually. hmm
06:37:12FromDiscord<ElegantBeef> Yea you can if you have it matching the enum in the end
06:38:03PrestigeI mean the func just compares two strings, so it'd be O(N) because I'd need to check every command string
06:38:45Prestigenot that it'd be very slow
06:39:47PrestigeYeah I think I'll just do that, will be nice for the users
06:46:53FromDiscord<ElegantBeef> Your enum could be like `toggleFullscreen = "togglefullscreen"` then you could just convert the input string to unstyled lowercase and then just `parseEnum` πŸ˜„
06:49:31PrestigeYeah that was sort of my original plan.. sounds better actually. I'm not sure what you meant about the array thing earlier
06:49:55FromDiscord<ElegantBeef> You can make enum indexed arrays in Nim
06:50:01*JustASlacker joined #nim
06:50:07FromDiscord<ElegantBeef> So depending on what you were doing it's simpler than a table but works the same
06:50:09Prestigeoh that's different though, that works too
06:50:39FromDiscord<ElegantBeef> Yea i didnt know you goal, you just asked about enums + tables πŸ˜›
06:51:12FromDiscord<ElegantBeef> Enum indexed arrays are one of my favourite "hidden" features, so i have to bring them up a lot
06:56:32FromDiscord<hamidb80> this article is too old↡https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html#using-gdb-lldb
06:58:21FromDiscord<hamidb80> gdb doesn't stop on breakpoint
06:58:28FromDiscord<hamidb80> https://media.discordapp.net/attachments/371759389889003532/812216516002578452/unknown.png
06:58:36FromDiscord<ElegantBeef> Saem where are you?!
06:59:21FromDiscord<ElegantBeef> If saem's about they might be to explain how to use gdb
07:03:09*krux02 joined #nim
07:04:20FromDiscord<hamidb80> πŸ˜• https://media.discordapp.net/attachments/371759389889003532/812217987309371412/unknown.png
07:04:27*letto joined #nim
07:07:07FromDiscord<ElegantBeef> Yea i think saem worked on the experience + the gdb script
07:07:09FromDiscord<ElegantBeef> Could be wrong
07:07:48Prestigehm walkFiles only works on the current directory? I tried passing it an absolute path and it doesn't find anything
07:08:03FromDiscord<ElegantBeef> `relative = true`
07:08:30Prestigeah yeah that exists for walkDir, cool
07:08:31FromDiscord<ElegantBeef> Oh nvm i was thinking walkdirs
07:08:49FromDiscord<ElegantBeef> I also was wrong about it being default true
07:09:04FromDiscord<ElegantBeef> So... i guess i'm just on a streak of bad advice πŸ˜„
07:09:17Prestigenah you got me to where I needed to be, haha
07:09:19Prestigety
07:09:20FromDiscord<ElegantBeef> @hamidb80 https://github.com/saem/vscode-nim#debugging
07:11:15PrestigeActually never mind, it did not work
07:11:55FromDiscord<ElegantBeef> I generally just use `walkDir` so yea not a clue
07:16:04Prestigeaha, got it. Man I missed Nim
07:37:03*filcuc joined #nim
08:03:54FromDiscord<hamidb80> It's interesting, though, `gdb` doesn't show all local variables
08:04:01FromDiscord<hamidb80> (edit) "interesting," => "interesting"
08:04:25*JustASlacker quit (Ping timeout: 240 seconds)
08:04:35FromDiscord<hamidb80> seems like they're not store in the scope
08:04:44FromDiscord<hamidb80> (edit) "store" => "stored"
08:05:14FromDiscord<hamidb80> they're stored in upper scopes
08:12:33*koltrast quit (*.net *.split)
08:12:34*Avahe[m] quit (*.net *.split)
08:12:34*reversem3 quit (*.net *.split)
08:12:35*wiltzutm[m] quit (*.net *.split)
08:12:35*Zoom[m] quit (*.net *.split)
08:21:31FromDiscord<hamidb80> they're available out of the scope
08:23:02*koltrast joined #nim
08:23:02*Avahe[m] joined #nim
08:23:02*reversem3 joined #nim
08:23:02*wiltzutm[m] joined #nim
08:23:02*Zoom[m] joined #nim
08:23:57saemSup?
08:24:35saemI use gdb, vscode, and ms cppdbg all the time to debug the compiler.
08:25:45*Q-Master quit (Quit: УшСл)
08:25:56*alex[m]3 quit (Ping timeout: 240 seconds)
08:25:58*BitPuffin quit (Ping timeout: 240 seconds)
08:25:59*FlammableDuck[m] quit (Ping timeout: 240 seconds)
08:26:08FromDiscord<ElegantBeef> Eh your saviour is here! πŸ˜„
08:26:15*Clonkk[m] quit (Ping timeout: 246 seconds)
08:26:15*liblq-dev quit (Ping timeout: 246 seconds)
08:26:16*antholop[m] quit (Ping timeout: 246 seconds)
08:26:16*sekao[m] quit (Ping timeout: 250 seconds)
08:26:16*stisa quit (Ping timeout: 250 seconds)
08:26:17*matthias[m]5 quit (Ping timeout: 250 seconds)
08:26:17*Avahe[m] quit (Ping timeout: 258 seconds)
08:26:17*reversem3 quit (Ping timeout: 258 seconds)
08:26:18*wiltzutm[m] quit (Ping timeout: 258 seconds)
08:26:18*Zoom[m] quit (Ping timeout: 258 seconds)
08:26:19*watzon quit (Ping timeout: 244 seconds)
08:26:19*vindaar[m] quit (Ping timeout: 244 seconds)
08:26:19*Benjamin[m]2 quit (Ping timeout: 244 seconds)
08:26:20*lnxw37d4 quit (Ping timeout: 244 seconds)
08:26:20*leorize[m] quit (Ping timeout: 244 seconds)
08:26:20*gollark[m]1 quit (Ping timeout: 244 seconds)
08:26:20*kaputse[m] quit (Ping timeout: 244 seconds)
08:26:20*i_use_arch_btw[m quit (Ping timeout: 250 seconds)
08:26:22*j-james[m] quit (Ping timeout: 250 seconds)
08:26:25FromDiscord<hamidb80> In reply to @saem "I use gdb, vscode,": do you use your extenstion?https://github.com/saem/vscode-nim#debugging
08:26:40*Yardanico[m] quit (Ping timeout: 268 seconds)
08:26:40*Avatarfighter[m] quit (Ping timeout: 268 seconds)
08:26:40*headache quit (Ping timeout: 268 seconds)
08:26:41saemOh wait, are you using choosenim?
08:26:45*zazi[m] quit (Ping timeout: 265 seconds)
08:26:45*oswin[m] quit (Ping timeout: 265 seconds)
08:26:45*MTRNord quit (Ping timeout: 265 seconds)
08:26:45*ee7[m] quit (Ping timeout: 265 seconds)
08:26:46*jk13579[m] quit (Ping timeout: 265 seconds)
08:26:46*vycb[m] quit (Ping timeout: 265 seconds)
08:26:55saemWhat else would I use?
08:26:55FromDiscord<hamidb80> In reply to @saem "Oh wait, are you": yes
08:27:07saemYeah, that's broken
08:27:13saemIt ships broken
08:27:30saemSo anyways you have to symlink or some crap to fix it
08:28:34saemIf you open the nim-gdb.py file or whatever it's called and look at the logic as to how the nim home dir or whatever it's called works it looks up the nim binary and then looks for a tools directory relative to that
08:28:41*unclechu quit (Ping timeout: 265 seconds)
08:28:41saemThat doesn't exist
08:28:56saemI had to symlink it
08:29:01saemIt's silly
08:29:06FromDiscord<hamidb80> In reply to @saem "That doesn't exist": i personalyy downloaded nim-gdb.py
08:29:25saemI dunno know if that works
08:30:17saemCan you post your config from vscode for debugging?
08:31:17saemAlso, depends which py file you downloaded can't remember if that file has some dependencies as well
08:31:37FromDiscord<hamidb80> In reply to @saem "Can you post your": to be honest, i was trying to connect `nim-gdb` from my code
08:31:53saemI just remember sighing a lot, swearing, and then symlinking.
08:32:07saem...
08:32:36saemIt's late, but I can't figure out what that means.
08:33:18FromDiscord<hamidb80> In reply to @saem "It's late, but I": ok, so do you think not using `nim-gdb` is a better approach?
08:33:55saemThat file just proxies to the Python file right?
08:34:15saemI'm going by memory, on my phone
08:34:23FromDiscord<hamidb80> In reply to @saem "That file just proxies": to a nim file
08:35:13saemI just remember it's a bunch of hoops, but at the end of the day gdb needs to load up that Python file
08:35:13*Tanger quit (Quit: Leaving)
08:35:35saemI think everything else is trying to help
08:35:51FromDiscord<hamidb80> thanks
08:36:21saemIt's frustrating, I sympathize
08:38:08saemUntil I read all that code I too wanted to try and do everything in Nim. Then learned about gdb's limitations. Didn't want to learn all about gdb-mi and writing a proxy and all that. Have up, made the symlink, cleaned up the Python script a little bit and moved on.
08:39:48FromGitter<xflywind> https://github.com/timotheecour/Nim/issues/599
08:39:51saemI also don't have time to dig into NDI and name mangling enough to make a wrapper around lldb which would be the future.
08:41:03*Q-Master joined #nim
08:47:30*MarderIII joined #nim
08:58:54*abm joined #nim
09:24:44*Yardanico[m] joined #nim
09:34:34*Tanger joined #nim
09:48:23*Benjamin[m]2 joined #nim
09:48:24Benjamin[m]2I've stumbled upon spam/links edited into older posts on the Nim forum several times now. Should I just post the links here or contact someone specific about it?
09:50:11FromDiscord<mratsim> post the link I willcleanup
09:50:40*Benjamin[m]2 sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/RLpHJNyIOlXDazNJQtbHcWrS/message.txt >
09:52:02*Clonkk[m] joined #nim
09:52:02Clonkk[m].
09:52:35Clonkk[m] * How does that happens ? It doesn't make sense to do a manual edit on several years old post to post spam
09:57:09FromDiscord<mratsim> The first 4 are copy-pasta from questions on Reddit or older questions on the forum I think that elicited a lot of responses.
09:57:23FromDiscord<mratsim> they make the same and just wait for a while before editing the post.
10:02:31*filcuc quit (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/)
10:07:04*Q-Master quit (Ping timeout: 240 seconds)
10:10:00*headache joined #nim
10:10:00*lnxw37d4 joined #nim
10:10:01*BitPuffin joined #nim
10:10:01*watzon joined #nim
10:10:01*kaputse[m] joined #nim
10:10:02*antholop[m] joined #nim
10:10:02*gollark[m]1 joined #nim
10:10:02*stisa joined #nim
10:10:02*GitterIntegratio joined #nim
10:10:02*Avahe[m] joined #nim
10:10:02*i_use_arch_btw[4 joined #nim
10:10:02*FlammableDuck[m] joined #nim
10:10:02*MTRNord joined #nim
10:10:02*j-james[m] joined #nim
10:10:02*reversem3 joined #nim
10:10:03*Avatarfighter[m] joined #nim
10:10:04*vindaar[m] joined #nim
10:10:04*unclechu joined #nim
10:10:04*leorize[m] joined #nim
10:10:04*liblq-dev joined #nim
10:10:04*oswin[m] joined #nim
10:10:08*jk13579[m] joined #nim
10:10:09*zazi[m] joined #nim
10:10:09*vycb[m] joined #nim
10:10:10*wiltzutm[m] joined #nim
10:10:10*Zoom[m] joined #nim
10:10:11*sekao[m] joined #nim
10:10:11*ee7[m] joined #nim
10:10:32*alex[m]28 joined #nim
10:21:33*tane joined #nim
10:22:44*d_ment joined #nim
10:24:11*d_ment quit (Client Quit)
10:34:41FromDiscord<mratsim> @narimiran, don't forget my blog post.
10:35:15narimiran@mratsim i didn't. it is in my drafts, but we're now preparing the release so it got postponed (again). sorry
10:36:56FromDiscord<mratsim> btw @Araq, are you there, can you tell me if the `{.goto.}` pragma works on JS, is that what's preventing closure iterators to work on JS? Because for the serializable state that you mentioned yesterday for continuations, it's either JS+functions or noJS+{.goto.}.
10:37:19FromDiscord<mratsim> not yesterday, on Monday, don't remember exactly.
10:38:02FromDiscord<mratsim> I think it's more important to have continuations work at compile-time or in javascript than the serializable part.
10:42:07*Q-Master joined #nim
10:42:09FromDiscord<0ffh> Hi I tried to use a "convert on assignment" procedure with the Signature "proc `=`(lval:var MyFloat, rval:float) =" but it seems Nim doesn't like that.↡Any hints on how I could achieve the desired effect?
10:43:00FromDiscord<0ffh> (edit) "use" => "create"
10:47:06*Q-Master quit (Ping timeout: 246 seconds)
10:49:23FromDiscord<dom96> Huh. Spammers sure are sneaky
10:49:37FromDiscord<dom96> But it pays to get higher page rank
10:55:28FromDiscord<mratsim> In reply to @0ffh "Hi I tried to": use a converter
10:57:06FromDiscord<0ffh> Okay thanks i'll search on that keyword!↡It seems like often it's really hard to find the relevant bit of documentation unless you already kind-of-know what you're looking for. Cheers!
11:10:32*Q-Master joined #nim
11:12:06FromDiscord<mratsim> In reply to @0ffh "Okay thanks i'll search": This is true in general, not just Nim or even programming, and Nim does help by avoiding operators and using words as much as possible
11:12:12FromDiscord<mratsim> what keywords did you search for?
11:16:11*MarderIII quit (Quit: Leaving)
11:16:22FromDiscord<0ffh> Yes, I meant it in general! πŸ™‚β†΅I looked for converter and landed there:↡https://nim-lang.org/docs/manual.html#converters
11:16:44FromDiscord<0ffh> Not exactly what I was looking for but close enough for govt work.
11:17:00FromDiscord<0ffh> (edit) "close" => "good"
11:17:21ForumUpdaterBotNew thread by Sekao: Building games for the web with Emscripten, see https://forum.nim-lang.org/t/7534
11:26:25FromDiscord<dom96> I wonder if we need to be more explicit about what arc/orc is exactly, I'm not sure myself whether what floatboth says is correct or not https://news.ycombinator.com/item?id=26180270
11:29:07*NimBot joined #nim
11:38:46qwrit is true, but the ARC/ORC runtime should be quite lightweight... for example libc and malloc/free can be considered to be part of C runtime :)
11:41:41qwrwhat really matters is how particular memory management system behaves and what overheads they'll produce
11:43:03FromDiscord<konsumlamm> you may consider ARC to be no GC, but i don't see why ORC wouldn't be a GC
12:01:10FromDiscord<aolko> so, community is still half-assing helping others, i presume?
12:01:30FromDiscord<aolko> how's the situation with the tutorials? Still terrible?
12:03:15FromDiscord<Solitude> yes
12:03:39FromDiscord<aolko> talk about actual improvements, huh
12:06:51FromDiscord<FromIDF> the manual is good and most libs source code are readable, good enough
12:07:18FromDiscord<Solitude> In reply to @FromIDF "the manual is good": is your code readable?
12:07:23FromDiscord<Solitude> thats what i thought
12:07:25FromDiscord<aolko> oh, alright, let me stump you in an instant
12:07:38FromDiscord<FromIDF> do it
12:07:44FromDiscord<aolko> "How do i write a php interpreter?"
12:07:46FromDiscord<FromIDF> In reply to @Solitude "is your code readable?": no because i cant read
12:08:01FromDiscord<aolko> (edit) "interpreter?"" => "interpreter? Explain in detail""
12:08:22FromDiscord<FromIDF> In reply to @aolko ""How do i write": document on lexing and parsing, document on php syntax, and write the interpreter
12:08:22liblq-devwhat does writing a php interpreter have to do with our tutorials
12:08:23FromDiscord<Solitude> In reply to @aolko ""How do i write": you are welcome https://craftinginterpreters.com/introduction.html
12:08:36*Evolver quit (Remote host closed the connection)
12:08:36*nikki93 quit (Remote host closed the connection)
12:08:36*zielmicha__ quit (Remote host closed the connection)
12:08:37*kinkinkijkin quit (Write error: Broken pipe)
12:08:37*saem quit (Remote host closed the connection)
12:08:37*rayman22201 quit (Remote host closed the connection)
12:09:01FromDiscord<aolko> In reply to @Solitude "you are welcome https://craftinginterpreters.com/in": "I want to use my own grammar notation"
12:09:27FromDiscord<Solitude> find tutorials for that
12:09:28FromDiscord<aolko> In reply to @liblq-dev "what does writing a": target language and build-your-own-x style ones
12:09:32FromDiscord<Solitude> the heck this has to do with nim
12:09:41FromDiscord<aolko> In reply to @Solitude "find tutorials for that": there's none, stumped
12:09:51FromDiscord<Solitude> again, how is that our problem?
12:09:53FromDiscord<aolko> (edit) "none, stumped" => "none, stumped"
12:09:59FromDiscord<aolko> target language
12:10:09FromDiscord<aolko> (edit) "target" => "~~target~~ source"
12:10:16FromDiscord<Solitude> you want all learning material in existence to be replicated for every language?
12:10:25FromDiscord<FromIDF> if you need tutorial for absolutely every specific thing then uhhh, you're doing it wrong, to say it lightly
12:10:28liblq-deveh i feel like they're trolling
12:10:32FromDiscord<konsumlamm> oh rly
12:10:37FromDiscord<Solitude> he is not, hes just attention hungry
12:10:39FromDiscord<aolko> In reply to @Solitude "you want all learning": no, just a base language kit will do
12:10:51FromDiscord<konsumlamm> In reply to @Solitude "he is not, hes": where's the difference?
12:11:15FromDiscord<FromIDF> mfw i have been trolled
12:11:22FromDiscord<aolko> In reply to @Solitude "he is not, hes": nope
12:11:41liblq-dev@Solitude that's like the same thing isn't it
12:11:49FromDiscord<Rika> Essentially
12:11:52FromDiscord<Solitude> In reply to @liblq-dev "<@104136074569211904> that's like the": not in my head
12:11:55FromDiscord<Rika> Who are you again?
12:12:13liblq-devi'd categorize trolling as a subset of attention whoring but ok
12:12:15FromDiscord<Rika> Legit question, I forget people a lot
12:12:30liblq-devdoesn't matter
12:12:41FromDiscord<aolko> obviously a male, direct, straightforward male
12:13:28FromDiscord<Rika> Okay, what’s up with the attitude then
12:13:32FromDiscord<Solitude> if by direct you mean, "i refuse to do my own research and want everything given to me", yeah that fits
12:13:50FromDiscord<FromIDF> why is your nickname be nice
12:14:01FromDiscord<Solitude> i am nice and want everybody to be nice
12:14:05FromDiscord<Rika> Something to do with a few hours ago haha
12:14:10FromDiscord<Rika> Happened in off topic
12:14:13liblq-devmaybe they are just having trouble with wording, not everyone has to be fluent in english
12:14:34FromDiscord<Solitude> lqdev, its not his first time here
12:14:37FromDiscord<aolko> In reply to @Rika "Okay, what’s up with": there's no attitude
12:14:37FromDiscord<Rika> Yes
12:14:46FromDiscord<Rika> I remember the name but not what he did
12:14:47FromDiscord<konsumlamm> "so, community is still half-assing helping others, i presume? how's the situation with the tutorials? Still terrible?"
12:14:53FromDiscord<konsumlamm> definitely sounds like language problems
12:14:54liblq-dev@Solutide i'm not that active in the community so how would i know
12:15:00FromDiscord<aolko> yup, asked as plainly as i can
12:15:03Clonkk[m]Hey guys is there a Nim tutorial to tell me how to do my day to day job ? If it could teach fluid mechanics and tell me how to do my taxes as well that'd be great, thanks !
12:15:12FromDiscord<FromIDF> kek
12:15:15FromDiscord<Rika> Lol
12:15:19FromDiscord<aolko> the most straightfaced emotionless question
12:15:31FromDiscord<FromIDF> today im going to make a tutorial on how to write a quantum mechanics calculator in nim
12:15:46FromDiscord<aolko> that's a `build-your-own-x` material
12:15:53Clonkk[m]Oh and I also need a Nim tutorial to prove P=NP
12:16:03FromDiscord<Rika> How to run 15 billion threads in Nim with a single core processor
12:16:13FromDiscord<aolko> and now you are deviating
12:16:14*zielmicha__ joined #nim
12:16:41FromDiscord<kaletaa> is there a tutorial on shitting my pants
12:16:45Clonkk[m]<FromDiscord "<aolko> and now you are deviatin"> No, i'm just mocking your ridiculous assumptions of what should be in a programming language tutoriam.
12:16:46FromDiscord<kaletaa> i think i've been doing it wrong
12:16:48FromDiscord<Rika> Because we don’t think your messages were worth dealing with seriously
12:16:49*Evolver joined #nim
12:16:58Clonkk[m]* No, i'm just mocking your ridiculous assumptions of what should be in a programming language tutorial.
12:17:09FromDiscord<aolko> In reply to @Clonkk "<FromDiscord "<aolko> and now": too bad you can cursive the shit out of it so it's obvious
12:17:18FromDiscord<aolko> or can't you?
12:17:26FromDiscord<Solitude> be nice, guys
12:17:29FromDiscord<Rika> Lmao
12:17:31FromDiscord<kaletaa> shut up sol
12:17:36FromDiscord<Solitude> BE NICE OR ELSE
12:17:38FromDiscord<kaletaa> 😎
12:17:40FromDiscord<Rika> The one time we actually need don
12:17:43FromDiscord<Rika> Dom
12:17:54FromDiscord<aolko> i'm not nice because peeps here are not helpful
12:18:16FromDiscord<kaletaa> we're not helpful because you're not nice
12:18:24FromDiscord<aolko> what a loop
12:18:30*saem joined #nim
12:18:32FromDiscord<FromIDF> do you need a tutorial for this loop too?
12:18:44FromDiscord<aolko> i suggest reading into my post history here
12:18:44FromDiscord<kaletaa> im not sure if we have a tutorial on the break keyword
12:18:57FromDiscord<aolko> maybe you'll discover that i was hanging for a long while
12:19:00FromDiscord<Solitude> In reply to @aolko "i suggest reading into": dont, worst mistake of my life
12:19:02FromDiscord<aolko> waiting for answers
12:19:06FromDiscord<kaletaa> In reply to @Solitude "dont, worst mistake of": .
12:19:33*nikki93 joined #nim
12:19:35FromDiscord<aolko> and yet you dips didn't even care enough
12:19:44FromDiscord<Rika> Oh wait are you that troll whom I called similar to disruptek yet not as fun
12:19:55FromDiscord<aolko> i am not a troll
12:19:56FromDiscord<FromIDF> why would you insult disruptek by doing such comparasion
12:19:57FromDiscord<Solitude> no, thats me
12:20:06FromDiscord<aolko> i am a legitimately frustrated guy
12:20:13FromDiscord<FromIDF> yes
12:20:16FromDiscord<kaletaa> yes
12:20:16FromDiscord<Rika> I don’t remember you fucks 😦 I’ve worse memory than a rock
12:20:30FromDiscord<aolko> read the fucking logs will ye
12:20:35FromDiscord<Solitude> In reply to @aolko "i am a legitimately": are you unironically want a php interpreter tutorial?
12:20:37FromDiscord<konsumlamm> are you really expecting anyone to take you serious with how you act?
12:20:38FromDiscord<FromIDF> do you have a tutorial for that
12:20:41FromDiscord<FromIDF> for reading logs
12:20:44FromDiscord<aolko> In reply to @Solitude "are you unironically want": no shit, mate
12:20:46FromDiscord<FromIDF> otherwise your solution is half-assed
12:21:01*rayman22201 joined #nim
12:21:03FromDiscord<Solitude> no shit what? because its not obvious if thats a joke or not
12:21:06FromDiscord<aolko> leave your irony in javascript realm
12:21:19FromDiscord<aolko> In reply to @Solitude "no shit what? because": obviously i need that thing
12:21:26Clonkk[m]<FromDiscord "<aolko> maybe you'll discover th"> I waited 5 minutes and you still haven't given me a P=NP tutorials πŸ˜”
12:21:28FromDiscord<kaletaa> just read an interpreter tutorial
12:21:39FromDiscord<kaletaa> language-agnostic guides do exist
12:21:41*kinkinkijkin joined #nim
12:21:50FromDiscord<aolko> yes, but language kits don't
12:21:59FromDiscord<FromIDF> good
12:22:47FromDiscord<aolko> mentioning this since i don't want to fuck around with EBNF bullshit
12:22:57FromDiscord<kaletaa> just handwrite a parser
12:23:01FromDiscord<kaletaa> loe
12:23:02FromDiscord<aolko> (edit) "bullshit" => "bullshit, i have my own notation for that"
12:23:03FromDiscord<kaletaa> (edit) "loe" => "lole"
12:23:06FromDiscord<Rika> Dude would you bitch and moan about the same thing to a rust server instead or something
12:23:06FromDiscord<Solitude> write your own parser generator?
12:23:29FromDiscord<aolko> i wonder where do i find nim-specific tutorial for that πŸ€”
12:23:33FromDiscord<kaletaa> you dont
12:23:36FromDiscord<Solitude> you dont
12:23:38liblq-devthe second part of crafting interpreters shows you how to write a parser from scratch, without using any parsing library
12:23:39liblq-devand also a bytecode interpreter
12:23:39FromDiscord<aolko> there you go
12:23:46FromDiscord<kaletaa> why would you need a nim-specific tutorial
12:23:46FromDiscord<aolko> and that's your fuckup
12:23:53FromDiscord<kaletaa> it's just an imperative language
12:24:00FromDiscord<kaletaa> it's not hard to apply ideas from other languages
12:24:04FromDiscord<Solitude> how is that our fuckup?
12:24:13FromDiscord<FromIDF> bro its not our problem you are functionally illiterate
12:24:19FromDiscord<aolko> community should have such tutorials
12:24:19FromDiscord<kaletaa> ^
12:24:23FromDiscord<kaletaa> In reply to @aolko "community should have such": no
12:24:24liblq-devdude it's not like nim's that different from [insert popular language here]
12:24:26FromDiscord<aolko> yes
12:24:36FromDiscord<kaletaa> because you can't think for yourself?
12:24:49liblq-devpeople target more popular languages because knowledge from them can be carried over to basically everything else
12:25:21FromDiscord<Rika> Okay wait up sometimes some kinds of applications need a language specific tutorial but not everything needs one
12:25:28FromDiscord<Rika> What kind of thing are you making
12:26:01FromDiscord<aolko> In reply to @liblq-dev "dude it's not like": sure, it sure isn't https://github.com/textX/textX
12:26:11FromDiscord<kaletaa> that's a library
12:26:16FromDiscord<aolko> there's tons of similar libs & tutorials
12:26:24FromDiscord<FromIDF> ok just make one for nim
12:26:24FromDiscord<aolko> for nim
12:26:26FromDiscord<Rika> Check the community size
12:26:28FromDiscord<Clyybber> @aolko nobody ows you anything, you are as much part of the community as everyone else here
12:26:35FromDiscord<Rika> Scale the number by community size
12:26:41FromDiscord<aolko> In reply to @Clyybber "<@!84714234855821312> nobody ows you": not quite
12:26:49liblq-devhave you seen https://github.com/zevv/npeg ?
12:26:53FromDiscord<Rika> Not quite what??
12:27:13FromDiscord<aolko> i do not quite consider myself part of such a community
12:27:32FromDiscord<Rika> Doesn’t change the fact that no one owes you anything
12:28:07liblq-devwell if you want such a tutorial you can pay someone to make it
12:28:25FromDiscord<aolko> In reply to @liblq-dev "have you seen https://github.com/zevv/npeg": not even remotely close to the desired http://cjheath.github.io/treetop/
12:28:49FromDiscord<Rika> Christ
12:28:51liblq-devit's basically the same thing but more compact lmao
12:28:52FromDiscord<aolko> In reply to @liblq-dev "well if you want": there's no transparency on pricing
12:28:54FromDiscord<kaletaa> you know you could just stop crying and write it yourself
12:29:08FromDiscord<kaletaa> a community isn't there to spoonfeed you
12:29:15FromDiscord<Rika> You will get nothing out of whining like this
12:29:19FromDiscord<aolko> it kinda is to be honest
12:29:23FromDiscord<kaletaa> lol
12:29:28FromDiscord<FromIDF> amazing thought process
12:29:44*superbia joined #nim
12:29:45FromDiscord<kaletaa> average 12 year old who looks up "free hacking tutorial" on youtube
12:29:50FromDiscord<aolko> look, every community spoonfeeds noobs by providing tutorials and examples
12:29:52liblq-devguys just stop feeding the troll
12:29:55FromDiscord<Rika> Installs Kali on a prod server
12:29:57liblq-devit doesn't get you anywhere
12:29:59FromDiscord<kaletaa> Yep.
12:30:06FromDiscord<kaletaa> pentoo in prod
12:30:09FromDiscord<konsumlamm> stop spoonfeeding the troll
12:30:21FromDiscord<aolko> In reply to @liblq-dev "guys just stop feeding": just stop being a cunt who can't distinguish genuine reactions from trolling
12:30:36FromDiscord<Rika> Do you know what a troll is
12:30:38liblq-dev@aolko mate it's you who's a cunt not us
12:30:56liblq-devyou started acting toxic, don't be surprised it's backfiring
12:30:58FromDiscord<Rika> I legit wish Dom was here
12:31:01FromDiscord<aolko> amazing excuse, too bad it's not truthful
12:31:13FromDiscord<Rika> Amazing rebuttal, very strong argument
12:31:21liblq-devyou could've just asked politely "are there any good parsing tutorials" but you used provocative wording
12:31:29FromDiscord<Solitude> Dom, there is a guy that feels entitled to maintainers/community free time
12:31:34FromDiscord<kaletaa> GIVE ME PHP PARSE TUTORIAL
12:31:34FromDiscord<FromIDF> .
12:31:44FromDiscord<kaletaa> In reply to @Solitude "Dom, there is a": you dont own my time....
12:32:02liblq-devplease guys let's just shut up because we all know this conversation is a waste of everybody's time
12:32:10FromDiscord<kaletaa> im watching family guy
12:33:22FromDiscord<aolko> In reply to @liblq-dev "you could've just asked": well, i could've if i'd have a swell time indulging in actually helpful atmosphere with actually helpful people helping out with a project, but alas, that is a non-realistic outcome currently, since it requires actual care and full-assing it.
12:33:35FromDiscord<kaletaa> spoonfeeding isn't helpful
12:33:48FromDiscord<aolko> starving isn't either
12:34:06FromDiscord<kaletaa> if you actually had a functioning brain you wouldn't be starving
12:34:48FromDiscord<konsumlamm> In reply to @aolko "well, i could've if": do you really expect anyone to be helpful when you start with "so, community is still half-assing helping others, i presume? how's the situation with the tutorials? Still terrible?"?
12:35:11FromDiscord<konsumlamm> you came here with the expectation of not getting help
12:35:18FromDiscord<aolko> In reply to @kaletaa "if you actually had": that reminds me, what was written on page 123 of the first volume of Encyclopedia Britannica?
12:35:57FromDiscord<FromIDF> page 123
12:36:09*superbia quit (Quit: WeeChat 3.0)
12:36:11FromDiscord<aolko> you won't be able to tell, since you would've read it whole, yet someone else would since he would've read only that single section
12:36:23FromDiscord<aolko> that is a domain-specific knowledge
12:37:18FromDiscord<FromIDF> do you have any tutorial for reading said book
12:37:32FromDiscord<FromIDF> if not then the writers of it are idiots
12:37:47FromDiscord<FromIDF> and everybody that ever read it once
12:37:51FromDiscord<FromIDF> (edit) "and everybody that ever read it ... once" added "atleast"
12:37:52FromDiscord<aolko> you are trying to link me to the general ass tutorials and magically figure out how to write an interpreter in nim, however i'd argue that domain-specific knowledge of actually providing a specific explanations would be much better
12:38:25FromDiscord<kaletaa> we literally sent you a parser library
12:38:26FromDiscord<konsumlamm> are you seriously expecting there to be a PHP parsing tutorial in Nim?
12:38:36FromDiscord<aolko> In reply to @konsumlamm "do you really expect": you know, my reference to reading logs isn't baseless
12:38:39FromDiscord<FromIDF> how much will you pay me if i write a php parser in nim
12:38:52FromDiscord<FromIDF> legit question
12:38:53FromDiscord<aolko> In reply to @kaletaa "we literally sent you": to magically figure out the rest
12:38:55FromDiscord<FromIDF> im willing to do it if you pay me
12:38:57FromDiscord<aolko> (edit) "rest" => "rest...great"
12:39:03FromDiscord<konsumlamm> In reply to @aolko "you know, my reference": you know, my question about you expecting help aren't baseless either
12:39:28FromDiscord<kaletaa> In reply to @aolko "to magically figure out": yes, read an interpreter book
12:39:40FromDiscord<kaletaa> you don't need a language specific book to learn about interpreters
12:39:45FromDiscord<aolko> In reply to @kaletaa "yes, read an interpreter": nope, domain-specific knowledge
12:39:57FromDiscord<kaletaa> how is writing interpreters domain specific
12:40:02FromDiscord<FromIDF> you need to go to a person that has domain-specific knoweldge of psychology and psychiatry
12:40:04FromDiscord<aolko> in nim
12:40:08FromDiscord<aolko> that specific
12:40:10FromDiscord<kaletaa> In reply to @aolko "**in nim**": you're braindead
12:40:14FromDiscord<kaletaa> in nim
12:40:22FromDiscord<FromIDF> rude
12:40:25FromDiscord<Rika> Jesus I thought we weren’t supposed to be spoon feeding the fuck
12:40:42FromDiscord<kaletaa> i will stop communicating with the one-cell organism
12:40:51FromDiscord<aolko> great, fuck off then
12:41:09FromDiscord<apollo> please #offtopic
12:41:11FromDiscord<aolko> i'd rather hear out anyone willing to give the domain-specific knowledge
12:41:13FromDiscord<FromIDF> so lets get back to bussiness, how much will you pay me if i write a php parser
12:41:18FromDiscord<apollo> this is for serious shit
12:41:30FromDiscord<aolko> i am always serious
12:41:31FromDiscord<Clyybber> if there was a tutorial for a php interpreter in nim then you wouldn't have to make one, because there would be one already...
12:41:41FromDiscord<aolko> i'd argue here
12:41:47Clonkk[m]There is a block user guys
12:41:57Clonkk[m]* There is a block user button guys
12:42:22FromDiscord<Rika> Blocking is awfully implemented in discord lol
12:42:23FromDiscord<Solitude> in discord it leaves a bigass box with messages hidden
12:42:45liblq-devthat was entertaining.
12:42:49FromDiscord<kaletaa> yeah it's quite uhhh inadequate
12:42:53FromDiscord<kaletaa> blocking in discord
12:42:56FromDiscord<FromIDF> quirky, if you will
12:42:58FromDiscord<aolko> In reply to @aolko "i'd argue here": since y'all stepping on the same set of rakes when it comes to, let's say, game engines, same engine - different games
12:42:59FromDiscord<kaletaa> yeah bro uhh btw there are some blocked messages here
12:43:13Clonkk[m]<liblq-dev "that was entertaining."> Trolls are funny 5 minutes but gets annoying after that
12:44:18FromDiscord<aolko> for the dips who still think that i'm a troll, i'm not purposefully misleading people in my expressions, i am legitimate about my expressions
12:44:40FromDiscord<kaletaa> apollo do not reply
12:44:44FromDiscord<aolko> it's not "ironic" or "sarcastic" here
12:44:54FromDiscord<apollo> In reply to @kaletaa "apollo do not reply": aren't you a bot
12:45:05FromDiscord<apollo> u human
12:45:17FromDiscord<kaletaa> i'm a cyborg
12:45:25FromDiscord<apollo> cyberpunk more like
12:46:06FromDiscord<aolko> well, on the other hand at least my expectations weren't high to begin with
12:47:55FromDiscord<konsumlamm> "so, community is still half-assing helping others, i presume? how's the situation with the tutorials? Still terrible?" <- those were your expectations
12:48:25FromDiscord<aolko> compared to 2019, nothing changed much
12:48:58FromDiscord<aolko> my expectations were the same
12:49:18FromDiscord<Solitude> In reply to @aolko "compared to 2019, nothing": we are gigastable
12:50:29FromDiscord<aolko> right, so perhaps i'll break down my question to more manageable steps, since you can't handle it coupled with accumulated frustration since 2019
12:50:30FromDiscord<Rika> What the fuck happened to not interacting
12:50:39FromDiscord<kaletaa> autism
12:51:39FromDiscord<aolko> so, perhaps you can manage it that way?
12:51:55FromDiscord<aolko> since you are currently pretty butthurt
12:51:56FromDiscord<kaletaa> we will not manage it if it's from you, you clearly are too smart for this community
12:52:04FromDiscord<kaletaa> please join a rust server, they might understand you
12:52:15FromDiscord<aolko> oh, okay, point me to the one that is also as smart
12:52:25FromDiscord<aolko> In reply to @kaletaa "please join a rust": i'm afraid it's too gay
12:52:42FromDiscord<kaletaa> i think the batch community is willing to take you in
12:52:45FromDiscord<kaletaa> you seem to be on their level
12:52:59FromDiscord<aolko> In reply to @kaletaa "i think the batch": they didn't migrate to powershell
12:53:08FromDiscord<kaletaa> batch is clearly superior
12:53:31FromDiscord<Rika> Please leave the server, we clearly are not up to your expectations and you would probably benefit most to leaving
12:53:33FromDiscord<Rika> Thanks
12:53:41FromDiscord<Solitude> In reply to @aolko "i'm afraid it's too": you afraid of little bit of gay?
12:53:50FromDiscord<aolko> so insensitive
12:54:30FromDiscord<aolko> In reply to @Solitude "you afraid of little": and so are you
12:55:09FromDiscord<FromIDF> homophobes
12:55:58*aolko[m] joined #nim
12:56:01FromDiscord<apollo> yes
12:56:22aolko[m]hey, ever studied law of conservation of mass?
12:57:28aolko[m]i'd still would rather like to see a list of nim community alternatives before i can yeet myself outta here
12:57:42FromDiscord<kaletaa> there are no alternatives to the nim community
12:57:56FromDiscord<Clyybber> I would rather you not bother any other community with your bullshit
12:57:58aolko[m]then don't push me out
12:57:59*krux02 quit (Remote host closed the connection)
12:58:13FromDiscord<Clyybber> (edit) "I would rather you not bother any other community with your bullshit ... " added "either"
12:58:20FromDiscord<kaletaa> then evolve further than a single-cell organism
12:58:43aolko[m]yeah, i do not care about your point either
12:59:17*krux02 joined #nim
12:59:30ForumUpdaterBotNew thread by Kcvinu: How to declare function pointer type ?, see https://forum.nim-lang.org/t/7535
13:01:20aolko[m]i will wait a couple of hours if you are still willing to give me alternatives, otherwise i guarantee you there will be one and it will be publically shared
13:01:48FromDiscord<kaletaa> you will be excluded from the public which we share it with
13:02:05aolko[m]i see no bottlenecks so far
13:02:19FromDiscord<DARTHVADER NAXXX> Ok
13:02:42FromDiscord<DARTHVADER NAXXX> what happened here
13:02:49FromDiscord<mratsim> aolko is bored
13:02:51aolko[m]butthurt from the peeps
13:03:30aolko[m](kinda works both ways here)
13:04:00Clonkk[m]<FromDiscord "<DARTHVADER NAXXX> what happened"> A troll wanted attention
13:04:33aolko[m]dips can't even tell where's a troll and where's a legit person
13:04:36Clonkk[m]He was nice enough to move to matrix so I could block him there as well
13:04:39FromDiscord<DARTHVADER NAXXX> Bots?
13:06:14FromDiscord<DARTHVADER NAXXX> In reply to @Clonkk "He was nice enough": But serious, how you and aolko talk?
13:06:25Clonkk[m]You see "bots" next to my name because I'm using Matrix and my message are posted on discord through a bridge bot
13:06:43aolko[m]"begrudgingly"
13:06:46FromDiscord<SneakyBaguette> But I'm a real user ;)
13:07:09FromDiscord<DARTHVADER NAXXX> ok
13:07:13Clonkk[m]I just prefer Matrix
13:09:34*wasted_youth2 joined #nim
13:10:06*PMunch joined #nim
13:15:45*asdflkj_ joined #nim
13:17:05*PMunch quit (Ping timeout: 240 seconds)
13:25:02*lritter joined #nim
13:28:05*dom96__ joined #nim
13:29:55dom96__For reference, this specifically is not okay. But mostly banning for consistency with Discord. I trust whoever banned there did their due dilligence https://irclogs.nim-lang.org/19-02-2021.html#12:30:21
13:30:49*dom96__ quit (Client Quit)
13:30:59*PMunch joined #nim
13:40:20PMunchWhy isn't there a set of printables here? https://nim-lang.org/docs/strutils.html#10
13:40:23FromDiscord<mratsim> It's not just this, their first sentence today was basically trollbaits owards the Nim community and then homophoby
13:41:15Clonkk[m]You missed the homophobic insult as well https://irclogs.nim-lang.org/19-02-2021.html#12:52:25
13:41:27FromDiscord<dom96> Yes. I’m sure there is other stuff too
13:42:06FromDiscord<dom96> And yeah. Those examples are even worse
13:43:47PMunchAaw, did I miss a troll?
13:45:57FromDiscord<flywind> Punctuation tables PR is rejected but I think Printable chars PR could be accepted.
13:46:05FromDiscord<flywind> https://github.com/nim-lang/Nim/pull/16708
13:46:39FromDiscord<Clyybber> printable sounds reasonable
13:46:45FromDiscord<Clyybber> and useful
13:47:20PMunchI mean it's basically just the ASCII table from 32..255 minus 127
13:48:12*Tanger quit (Quit: Leaving)
13:50:07FromDiscord<konsumlamm> @flywind will you make follow-up PRs to https://github.com/nim-lang/Nim/pull/17041 soon?
13:50:48FromDiscord<flywind> I will make it in the following days.
13:51:08FromDiscord<flywind> https://github.com/nim-lang/Nim/pull/17100
13:51:39FromDiscord<konsumlamm> ah nice, you already started
13:51:45FromDiscord<flywind> yeah
14:00:31asdflkj_PMunch: you can read the linked logs if you really want (he wasn't a particularly entertaining one)
14:02:34FromDiscord<Rika> Has anyone tried making more human readable JS output from Nim’s output? I just want to know
14:07:29PMunchasdflkj_, yeah I started looking at it but got bored
14:08:54*mmohammadi9812 joined #nim
14:09:21*mmohammadi9812 quit (Max SendQ exceeded)
14:09:53*mmohammadi9812 joined #nim
14:11:03*mmohammadi9812 quit (Read error: Connection reset by peer)
14:11:21*mmohammadi9812 joined #nim
14:11:58*mmohammadi9812 quit (Remote host closed the connection)
14:14:46*haxscramper joined #nim
14:46:58haxscrampernarimiran: could you please add something like this: https://gist.github.com/haxscramper/95b149c16f58d7662402b9e833f775ec to changelog/release notes for next version. I wanted to write a separate article for fusion but couldn't manage to produce anything notably interesting, so instead this could be just a listing of existing libraries. I also double-checked article for any possible example regressions (against fusion/#61) - there are
14:46:58haxscrampernone, so I think the article can be released any time you see fit, though I would *strongly prefer* to do this after #61 will be merged into fusion
14:48:11haxscramperI merged fix for `match` and `case` into my fixup branch so there are no conflicts as of now, CI is green, and it can also be merged any time
14:48:49narimiranhaxscramper: so, can i safely merge #61? do i need to review it?
14:51:04haxscramperIt does not have any breaking changes, so I think it is generally safe
14:51:08FromDiscord<krisppurg> Is there any way to set a string length range type for example `string[1..100]` (limits the length of characters to 100 and minimum to 1)?
14:51:45haxscramperThere were some changes wrt. to `is` operator, but those are only related to documentation/example uses
14:52:05FromDiscord<mratsim> In reply to @krisppurg "Is there any way": length is not part of a string type
14:52:29FromDiscord<mratsim> so you would need a distinct string with range checks on add, setLen and delete.
14:53:08FromDiscord<krisppurg> Ah, alright thanks.
14:54:09FromGitter<Araq> you can also write a custom string type that exploits the fact that a short string can be kept on the stack
14:56:22FromDiscord<mratsim> sent a long message, see http://ix.io/2PXR
14:57:23FromGitter<Araq> the .goto pragma doesn't work for JS but our closure iterators do not use .goto anyway
14:57:37FromDiscord<mratsim> what's this nkGotoState then?
14:57:38PrestigeIs there a way to get commandLineParams as a single string, or do I just have to join this seq?
14:57:41FromGitter<Araq> we're talking about 2 separate features here, neither is supported for JS
14:58:06FromDiscord<mratsim> so nkGotoState != {.goto.} ?
14:58:11FromGitter<Araq> nkGotoState is for closure iterators but not used for .goto variables
14:58:29FromGitter<Araq> and also, omg .goto is such an incredible hack
14:58:30FromDiscord<mratsim> do we want continuations on JS?
14:58:55FromDiscord<mratsim> for some reasons I have no bug with it in Weave: Synthesis :p
14:59:20FromDiscord<mratsim> JS and in the VM
14:59:37FromGitter<Araq> sure, continuations on JS are fine
14:59:47FromDiscord<konsumlamm> @haxscramper some suggestions for your summary: there are some articles missing ("the" before "`fusion`", "an" before "extension", "the" before "modules", "an" before "AST"), i'd say "sorted" instead of "ordered" for `btreetables`, "HTML" instead of "html" and i'd put a dot at the end
14:59:49FromGitter<Araq> we can use the classic "relooper" algorithm
15:01:05FromDiscord<mratsim> functions seem simple
15:06:46FromDiscord<konsumlamm> @haxscramper your forgot the "an" before "extension" :p
15:15:43*vicfred joined #nim
15:25:11FromDiscord<haxscramper> @konsumlamm when you were testing pattern matching - you used `#61` fix, or main version?
15:26:24FromDiscord<konsumlamm> the current version
15:34:06*zedeus joined #nim
15:48:50FromDiscord<konsumlamm> @haxscramper
15:49:06Oddmongerif i want something else than Β« int Β» as a counter for a loop, do i have to write my own iterator ?
15:49:34FromDiscord<konsumlamm> wdym?
15:49:34Oddmongerthe loop is of this form : for i in 0..len(x)
15:49:57Oddmongerbut i'd like to have i as a uint16, instead of default int
15:50:17Oddmongeri read in the doc that countup returns int by default
15:50:31Oddmongerbut 0..len(x) is using countup implicitely ?
15:50:38FromDiscord<haxscramper> In reply to @konsumlamm "<@!608382355454951435>": ? I just clarified this for myself, there are no additional questions
15:50:46FromDiscord<krisppurg> is there any way to convert a seq to an array?
15:51:13FromDiscord<haxscramper> Element-by-element copy, but arrays are fixed size
15:51:15FromDiscord<konsumlamm> the length of an array has to be known at compile time, so i'd say the answer is no
15:51:23FromDiscord<haxscramper> So you would either drop some elements, or have some elements uninitialized
15:51:47FromDiscord<haxscramper> (if the seq is longer or shorter than array)
15:52:10FromDiscord<Rika> oddmonger sure, or do let i = int16(i) if you dont mind that
15:53:02Oddmongeryes i can cast , but i was thinking that having directly i in the good type was better
15:53:15PrestigeIs there a more concise way of formatting a string like this? https://play.nim-lang.org/#ix=2PYo
15:53:16FromDiscord<konsumlamm> or convert `len(x)` to `uint16`
15:53:17FromDiscord<Rika> oh wait
15:53:23FromDiscord<Rika> yeah
15:53:24FromDiscord<Rika> was gonna say
15:53:28Oddmongerah yes
15:53:47Oddmongerthank you
15:55:21FromDiscord<Rika> prestige `let message = fmt"{ipcPrefix} {command}" & (if option.len > 0: fmt" {option}" else: "")` ?
15:56:00Prestigehm yeah that's a bit better
15:56:01FromDiscord<Rika> performance regression here tho i assume, but its not much if you're not doing this in a loop
15:56:24Oddmongerthat's odd, when i do Β« echo type(0..10) Β» , it returns Β« int Β». Shouldn't it return Β« range Β» ?
15:56:48FromDiscord<Rika> !eval echo type(0..10)
15:56:51NimBotint
15:56:55FromDiscord<Rika> !eval echo typeof (0..10)
15:56:58NimBotint
15:57:12FromDiscord<Rika> heu
15:57:41Oddmongerwhen you typed Β« typeof Β», i thouhgt Β« i'm so lame Β», but hopefully, not so ^^'
15:58:34FromDiscord<Rika> yeah i was assuming
15:58:37FromDiscord<Rika> but its still the same
15:58:38FromDiscord<Rika> odd
15:59:22FromDiscord<konsumlamm> !eval let a = 0..10; echo typeof(a)
15:59:25NimBotHSlice[system.int, system.int]
15:59:44Oddmongeroh
15:59:52FromDiscord<konsumlamm> looks like a bug at first sight
16:00:24FromDiscord<Rika> well its because 0..10 is ambiguous to typeof's eyes
16:00:38FromDiscord<Rika> cant tell if its a slice or the iterator that's being asked
16:00:48FromDiscord<Rika> guess its biased to iterators
16:01:07FromDiscord<konsumlamm> oh, that's it probably
16:01:25Oddmongerit's a feature, then
16:01:38FromDiscord<Solitude> it is
16:01:39FromDiscord<konsumlamm> i remember reading something about typeof being biased to iterators a while ago
16:01:41FromDiscord<Rika> not really, more of a limitation
16:01:57FromDiscord<Solitude> !eval typeof(1..10, typeOfProc)
16:01:59NimBotCompile failed: /usercode/in.nim(1, 7) Error: expression 'typeof(1 .. 10)' is of type 'type HSlice[system.int, system.int]' and has to be used (or discarded)
16:02:04FromDiscord<Solitude> (edit) "!eval ... typeof(1..10," added "echo"
16:02:11FromDiscord<Solitude> !eval echo typeof(1..10, typeOfProc)
16:02:14NimBotHSlice[system.int, system.int]
16:02:18Oddmongerbut if it considers it as an iterator, it should say Β« procΒ» ?
16:02:39FromDiscord<Solitude> what
16:03:06Oddmongerif [0..10] is seen as an iterator, why the answer is Β«intΒ» and not Β«procΒ» ?
16:03:17FromDiscord<Solitude> return type of iterator
16:03:32FromDiscord<konsumlamm> typeof for iterators gives you the type the iterator yields
16:03:33FromDiscord<Solitude> why would it even mention proc?
16:03:33Oddmongerah it takes the return type ok
16:03:59FromDiscord<Rika> iterators arent procs technically
16:04:20Oddmongerclosure aren't proc ?
16:05:00FromDiscord<konsumlamm> closur eiterators aren't procs either
16:05:05FromDiscord<konsumlamm> closure procs are procs
16:05:28FromDiscord<Solitude> !eval echo typeof `..`
16:05:30NimBotNone
16:05:34FromDiscord<Solitude> amazing
16:05:58FromDiscord<Rika> .. doesnt exist confirmed
16:06:01FromDiscord<Rika> nim is a lie
16:06:57FromDiscord<Solitude> !eval iterator t: int {.closure.} = discard; echo typeof t
16:06:59NimBot<no output>
16:07:32FromDiscord<konsumlamm> !eval iterator t: int = discard; echo typeof t
16:07:34NimBot<no output>
16:07:43FromDiscord<konsumlamm> πŸ€”
16:08:00FromDiscord<konsumlamm> !eval iterator t: int {.closure.} = discard; echo typeof t()
16:08:02NimBotCompile failed: /usercode/in.nim(1, 53) Error: recursion is not supported in iterators: 't'
16:08:28FromDiscord<Clyybber> it considers the echo typeof t() part of the loop body
16:08:32FromDiscord<konsumlamm> ye
16:08:32FromDiscord<Clyybber> (edit) "loop" => "iterator"
16:08:35FromDiscord<Solitude> my snippet works in nim secret
16:08:55FromDiscord<Solitude> sent a code paste, see https://play.nim-lang.org/#ix=2PYy
16:09:08FromDiscord<Clyybber> the issue is `discard; echo typeof t`
16:09:13FromDiscord<Clyybber> it's one body
16:09:18FromDiscord<Clyybber> ; doesn't close the proc body
16:09:26FromDiscord<Rika> add more ;;;;;;;;;;;;;;;;;;;
16:09:27FromDiscord<Rika> xd
16:09:28FromDiscord<Solitude> my bad, chief
16:10:56*gollark[m]1 quit (Ping timeout: 240 seconds)
16:10:56*FlammableDuck[m] quit (Ping timeout: 240 seconds)
16:10:56*j-james[m] quit (Ping timeout: 240 seconds)
16:12:37*krux02 quit (Read error: Connection reset by peer)
16:12:37*krux02_ joined #nim
16:15:26*Benjamin[m]2 quit (Ping timeout: 240 seconds)
16:16:19*krux02_ quit (Remote host closed the connection)
16:17:06*krux02 joined #nim
16:17:51*FlammableDuck[m] joined #nim
16:18:02Oddmongerexcuse me to be so lame, but it's hard to find infos about this in the doc (as was saying the banned guys… erm no.) about converting 0..len(x) from int to uint16
16:18:46Oddmongeri've trialed and errored with 0..len(x).uint16 , 0.uint16..len(x).uint16 , uint16(0..len(x)) (ahem)
16:18:51Oddmongerwith no luck
16:20:06Oddmongeri know the luck has nothing to do with programming, so you can just throw with a sigh the location of the information in the manual, and i will be happy
16:20:08Oddmongeri promise
16:22:15FromDiscord<Rika> !eval echo typeof 0.uint16..len(x).uint16
16:22:17FromDiscord<Rika> oops
16:22:17NimBotCompile failed: /usercode/in.nim(1, 27) Error: undeclared identifier: 'x'
16:22:18FromDiscord<Rika> no x
16:22:27FromDiscord<Rika> !eval echo typeof 0.uint16..len("jgqwe:).uint16
16:22:29NimBotCompile failed: /usercode/in.nim(1, 27) Error: closing " expected
16:22:31FromDiscord<Rika> typo
16:22:35FromDiscord<Rika> !eval echo typeof 0.uint16..len("jgqwe").uint16
16:22:36FromDiscord<Solitude> you can do it
16:22:38NimBotuint16
16:22:48FromDiscord<Rika> oddmonger i dont see the issue
16:22:49Oddmongeri was sure i had tried the double uint16
16:23:11Oddmongerin fact, i have 0..len(x)-1
16:23:23FromDiscord<Rika> use ..< instead of ..()-1
16:23:27FromDiscord<Solitude> !eval echo typeof 0..len"".uint16
16:23:29NimBotCompile failed: /usercode/in.nim(1, 14) Error: ambiguous call; both system...(a: uint32, b: uint32) [declared in /playground/nim/lib/system/iterators_1.nim(88, 14)] and system...(a: uint64, b: uint64) [declared in /playground/nim/lib/system/iterators_1.nim(88, 14)] match for: (int literal(0), uint16)
16:23:31Oddmongerso 0.uint16..(len(x)-1).uint16 ?
16:23:35FromDiscord<Rika> !eval echo typeof 0.uint16..<len("jgqwe").uint16
16:23:37NimBotuint16
16:23:46FromDiscord<Rika> you can do that yes
16:23:59Oddmongeri prefer your ..< , much nicer
16:24:10Oddmongeri had forgotten this option
16:24:12Oddmongerthank you
16:25:01*gollark[m]1 joined #nim
16:25:10*j-james[m] joined #nim
16:25:36krux02Oddmonger: you can probably use `..<` exclusively and forget about `..`
16:25:44FromDiscord<Rika> said that already πŸ˜›
16:26:13Oddmongeryes, but thanks anyway
16:26:19Oddmongernow, it's tea time :)’
16:26:41FromDiscord<Rika> have fun
16:27:09FromDiscord<Rika> i'm not having fun, have to deal with japanese and unicode normalization + transliteration
16:30:05*Benjamin[m]2 joined #nim
16:31:01FromDiscord<konsumlamm> Oddmonger: also remember that usually you can just iterate over the collection directly (with `items` or `enumerate`), assuming you're indexing into a collection
16:33:11*PMunch quit (Quit: leaving)
16:48:13*krux02 quit (Remote host closed the connection)
16:49:43*krux02 joined #nim
17:00:22*blocked_ joined #nim
17:00:53*blocked_ quit (Remote host closed the connection)
17:04:37*letto quit (Quit: Konversation terminated!)
17:05:10*letto joined #nim
17:09:06*^Q-Master^ joined #nim
17:10:43*nickster2 joined #nim
17:11:13*grobe0ba_ joined #nim
17:13:59*dsrw joined #nim
17:14:09*asdflkj_1 joined #nim
17:14:29*xace_ joined #nim
17:14:37*kenran joined #nim
17:16:12*jxy_ joined #nim
17:17:30*Cthalupa- joined #nim
17:18:49*lritter quit (*.net *.split)
17:18:49*asdflkj_ quit (*.net *.split)
17:18:49*Q-Master quit (*.net *.split)
17:18:50*jxy quit (*.net *.split)
17:18:50*Cthalupa quit (*.net *.split)
17:18:50*casaca quit (*.net *.split)
17:18:50*grobe0ba quit (*.net *.split)
17:18:50*nickster quit (*.net *.split)
17:18:51*xace quit (*.net *.split)
17:18:51*dsrw_ quit (*.net *.split)
17:18:51*nickster2 is now known as nickster
17:18:52*grobe0ba_ is now known as grobe0ba
17:19:44PrestigeI'm attempting to use the AsyncSocket's readLine proc - I'm getting a "line" when I expect, but the string is always empty. Is there something I'm missing?
17:21:19*lritter joined #nim
17:21:19*asdflkj_ joined #nim
17:21:19*jxy joined #nim
17:21:19*Cthalupa joined #nim
17:21:19*casaca joined #nim
17:21:19*07IAAT3C1 joined #nim
17:21:19*07IAAT3BB joined #nim
17:21:19*xace joined #nim
17:21:25Prestigehttps://nim-lang.org/docs/asyncnet.html#recvLine%2CAsyncSocket seems basic, I don't know why I'm not seeing data come through
17:21:40*07IAAT3BB quit (Max SendQ exceeded)
17:21:45*lritter quit (Excess Flood)
17:22:29*asdflkj_ quit (Ping timeout: 254 seconds)
17:22:29*jxy quit (Ping timeout: 254 seconds)
17:22:30*Cthalupa quit (Ping timeout: 254 seconds)
17:22:30*07IAAT3C1 quit (Ping timeout: 254 seconds)
17:22:30*xace quit (Ping timeout: 254 seconds)
17:23:01PrestigeI am using a regular Socket to send and an AsyncSocket to receieve, but I don't think that would matter
17:25:16*a_chou joined #nim
17:26:14*jk13579[m] quit (Ping timeout: 244 seconds)
17:26:16*Avatarfighter[m] quit (Ping timeout: 244 seconds)
17:26:16*GitterIntegratio quit (Ping timeout: 244 seconds)
17:26:23*lritter joined #nim
17:28:19*jk13579[m] joined #nim
17:28:37PrestigeAlso, it's a unix socket if that makes a difference.
17:29:36*Avatarfighter[m] joined #nim
17:49:08PrestigeI've tried converting it to an AsyncSocket to see if that would help, but am getting an error I don't know how to decipher https://play.nim-lang.org/#ix=2PZ6
17:49:24*natrys joined #nim
17:49:36FromDiscord<Yjuq> Hi, there is no channel specific for questions. So, can I just ask them here? ^.^
17:50:10FromDiscord<Yjuq> (edit) "^.^" => "^.^↡I'm pretty new in Nim and try to wrap my head around some stuff."
17:50:19FromDiscord<kaletaa> sure
17:54:13PrestigeThis is the "working" code (without async) https://play.nim-lang.org/#ix=2PZ7 but on the receiving end, it's just empty strings
17:56:06FromDiscord<Yjuq> sent a code paste, see https://play.nim-lang.org/#ix=2PZa
17:56:15FromDiscord<dom96> Prestige: empty string means the socket is closed
17:57:02FromDiscord<dom96> but there is a possibility that async does not handle unix sockets correctly
17:57:27FromDiscord<dom96> I haven't personally used it this way and don't recall anyone else doing so either
17:57:51FromDiscord<Yjuq> (edit) "https://play.nim-lang.org/#ix=2PZa" => "https://play.nim-lang.org/#ix=2PZb"
17:58:20PrestigeSo the listening side using recvLine is being triggered at the appropriate times @dom96 so I don't think it's closed?
18:00:29*watzon quit (Quit: authenticating)
18:00:35Oddmonger@mratsim : when i can i use items, but this time, i need to store the index
18:00:37*watzon joined #nim
18:01:00FromDiscord<mratsim> ?
18:01:14Oddmongeroh excuse me, it was for @konsumlamm
18:01:19Oddmongermisread
18:01:43FromDiscord<konsumlamm> do you know about `enumerate`? thought that's only on devel afaik
18:01:46FromDiscord<konsumlamm> or `pairs`
18:02:12FromDiscord<kaletaa> In reply to @Yjuq "Great, I try to": do you get an error?
18:02:14FromDiscord<dom96> Prestige: to debug what's going on you might want to try just using a `recv(sock, 1)`
18:02:25FromDiscord<haxscramper> In reply to @Yjuq "Great, I try to": You can use macros as pragmas to use own logic. There is no example in the manual though, give me a sec I will write one
18:03:00FromDiscord<kaletaa> nvm it's a semantic problem, what's $1 supposed to be? i'm missing something
18:04:03Oddmongerah no, i don't know enumarate (nor pairs)
18:04:07Oddmongeri look
18:05:01FromDiscord<Yjuq> In reply to @kaletaa "do you get an": Yes, I do. This is the important bit:↡`undefined reference to mylib_Example`
18:05:02Prestigecomes back empty as well.
18:05:25FromDiscord<Yjuq> The symbol is not defined in c and I get an error
18:06:19FromDiscord<Yjuq> This tells me that I can't use `toLowerAscii` like that to automatic get the word `Example` into lower case
18:07:08*Vladar joined #nim
18:07:57Prestige@dom96 oh hey, using recv(31) I get the full string (that's the length of the string I am sending). So for some reason recvLine is not working
18:07:59FromDiscord<Yjuq> In reply to @kaletaa "nvm it's a semantic": sent a code paste, see https://play.nim-lang.org/#ix=2PZf
18:08:31FromDiscord<Rika> yjuq nothing you can do, i believe manual is the only way
18:09:25FromDiscord<haxscramper> In reply to @Yjuq "Yes, I do. This": https://play.nim-lang.org/#ix=2PZg
18:10:16FromDiscord<haxscramper> This gets strange when you mix `.pragma` and `importc: $1`, so macro is safer
18:10:36FromDiscord<haxscramper> And `toLowerAscii()` is probably not supported in importc anyway
18:10:41FromDiscord<Yjuq> In reply to @haxscramper "https://play.nim-lang.org/#ix=2PZg": Thank you, I was looking in the macro docu because I got a feeling I could solve it with it. But this stuff looks complicated
18:10:55PrestigeI guess I can just do some arbitrary number in recv for now...
18:11:39FromDiscord<konsumlamm> @haxscramper do you know anything about when fusion#61 will get merged? i think it's about time
18:11:52FromDiscord<dom96> Prestige: huh, weird. Are you sure your string has newline chars?
18:12:17FromDiscord<dom96> if you're up for it, recvLine's implementation is pretty straightforward so you should be able to figure out what's going wrong by adding a few echos in there
18:12:18FromDiscord<haxscramper> In reply to @konsumlamm "<@!608382355454951435> do you know": zero idea
18:12:41FromDiscord<Yjuq> In reply to @haxscramper "https://play.nim-lang.org/#ix=2PZg": sent a code paste, see https://play.nim-lang.org/#ix=2PZl
18:12:51FromDiscord<kaletaa> imports both strutils and macros from the stdlib
18:13:14FromDiscord<Yjuq> but doesn't do `import strutils` and `import macros` the same?
18:13:14FromDiscord<haxscramper> In reply to @haxscramper "zero idea": I pinged narimiran, so it is known that #61 is ready, but I guess that because new release is soon it might take some time (i.e. not instantly)
18:13:14FromDiscord<kaletaa> useful for when you have files like macros.nim next to the one you're working on
18:13:25FromDiscord<kaletaa> In reply to @Yjuq "but doesn't do `import": yes but this forces the stdlib ones
18:13:30FromDiscord<Yjuq> I see
18:13:38FromDiscord<Yjuq> I keep this in mind, thank you
18:13:41Prestige@dom96 yeah I added the \r\L to the end of the string like the proc docs says to do
18:13:52FromDiscord<haxscramper> In reply to @Yjuq "but doesn't do `import": Some new stdlib modules require `std/` prefix, so it is safer to just always do `std/`
18:14:11FromDiscord<haxscramper> For example `std/enumerate` and some others
18:14:20FromDiscord<mratsim> std/monotime
18:14:22FromDiscord<konsumlamm> and it also makes it clear what modules come from the stdlib
18:14:27FromDiscord<mratsim> (edit) "std/monotime" => "std/monotimes"
18:21:42FromDiscord<Yjuq> I'm pretty excited about nim. I tried a lot of other languages so far and I kinda got a liking to Go. But CGO seems just terrible and nim does a better job with writing c bindings easily. :D
18:22:53FromDiscord<Yjuq> I never liked C++ - to much syntax hassle <.<
18:23:55FromDiscord<treeform> I like go, but its missing generics and templates which I really like in nim. Go just feels "too" simple.
18:24:26FromDiscord<Yjuq> Yea - there will be generic support in the future. I'm still waiting for this - in the meanwhile nim will replace go for me
18:24:34FromDiscord<Yjuq> until it got all the features i'm missing
18:24:49FromDiscord<treeform> Google employs a ton of people and they need a simpler language for their 40k programmers.
18:25:12FromDiscord<treeform> I don't think go will get templates or macros ... they fought generics for so long.
18:29:19*a_chou quit (Quit: a_chou)
18:29:37*a_chou joined #nim
18:29:56FromDiscord<hamidb80> what is `do nothing` in nim? for example `pass` does nothing in python
18:30:13FromDiscord<Solitude> discard
18:30:41FromDiscord<konsumlamm> still with generics, go is lacking many features
18:30:57FromDiscord<Yjuq> `asm "nop"`
18:32:26FromDiscord<hamidb80> In reply to @konsumlamm "still with generics, go": yeah, absolutely
18:32:59FromDiscord<Yjuq> I avoided compiler for my career. I probably would jump on the c++ train long time ago if I could understand the gcc compiler properly. Now it's to late and I prefer languages with simple compiler. I mean... c'mon: `nim c main.nim` - easy
18:33:07FromDiscord<apollo> in what scenario would you use C in place of nim or vice-versa just wondering nothing important just curiosity itching me
18:33:29FromDiscord<kaletaa> when you're feeling masochistic
18:33:50FromDiscord<apollo> noice
18:34:11FromDiscord<mratsim> In reply to @treeform "Google employs a ton": Google employs top graduate from top universities after top whiteboard interviews. Pretty sure they could handle more complex languages as well.
18:34:40FromDiscord<mratsim> In reply to @apollo "in what scenario would": When your professor doesn't allow Nim code.
18:34:42*natrys quit (Ping timeout: 246 seconds)
18:34:48FromDiscord<mratsim> (edit) "graduate" => "graduates"
18:34:54FromDiscord<apollo> What if you're professor happens to be araq
18:34:56FromDiscord<Yjuq> Yea, they even use Goolge Docs as IDE. Best syntax highlighting. You can highlight stuff however you want!
18:34:56FromDiscord<apollo> 😎
18:35:04FromDiscord<apollo> Wait what google docs
18:35:06FromDiscord<apollo> πŸ˜‚
18:35:11FromDiscord<mratsim> Not sure Araq has the patience of handling students :p
18:35:18FromDiscord<Yjuq> (edit) "Goolge" => "Google"
18:35:19FromDiscord<apollo> :p
18:35:21FromDiscord<Rika> In reply to @mratsim "When your professor doesn't": i mean, you can always submit the codegen...
18:35:31FromDiscord<Rika> ~~please for the love of god dont~~
18:35:34FromDiscord<mratsim> people often ask that yes πŸ˜‰
18:35:36FromDiscord<apollo> no we will
18:35:38FromDiscord<apollo> rika
18:35:45FromDiscord<Rika> ok
18:36:07FromDiscord<mratsim> we need a ncat tool that put Nim generated code + nimbase.h together and strip duplicates definition.
18:36:51FromDiscord<hamidb80> In reply to @mratsim "we need a ncat": for what
18:37:01FromDiscord<haxscramper> https://nim-lang.org/docs/nimc.html#crossminuscompilation haven't tried `--genScript`, but it seems pretty close
18:37:03FromDiscord<mratsim> for codewars
18:37:03FromDiscord<apollo> time to relearn nim again
18:37:43FromDiscord<mratsim> again?
18:37:50FromDiscord<mratsim> didn't you learn this week already?
18:38:32FromDiscord<apollo> no i was learning C instead 😎
18:38:51FromDiscord<apollo> but i did make a notebook with nim code a while ago
18:38:57FromDiscord<konsumlamm> In reply to @mratsim "Google employs top graduates": "The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to unders
18:38:58FromDiscord<apollo> just have to read my own code 😿
18:39:21FromDiscord<mratsim> In reply to @konsumlamm ""The key point here": not condescending at all.
18:39:30FromDiscord<konsumlamm> ikr
18:39:44FromDiscord<konsumlamm> (Rob Pike is the inventor of Go, for reference)
18:39:49FromDiscord<mratsim> I know
18:40:06FromDiscord<Rika> i think they mean reference for others
18:41:14FromDiscord<hamidb80> In reply to @konsumlamm ""The key point here": seems reasonable ...
18:41:37FromDiscord<Yjuq> I mean, everyone needs to start somewhere right?
18:41:53FromDiscord<Yjuq> But honestly, I wish most languages would be more simplistic
18:42:07FromDiscord<apollo> like python
18:42:13FromDiscord<Yjuq> go has the right direction but is quite far away from perfect in my opinion
18:42:15FromDiscord<hamidb80> In reply to @konsumlamm ""The key point here": golang fits well for google
18:42:19FromDiscord<apollo> no one has made a simple language like python yet and i stand to be corrected
18:42:23FromDiscord<konsumlamm> under the surface, python isn't really simplistic tbh
18:42:24FromDiscord<apollo> (edit) "corrected" => "proven wrong"
18:42:30FromDiscord<Yjuq> In reply to @apollo "no one has made": lua
18:42:32FromDiscord<apollo> yes but it's very easy to learn and very friendly
18:42:41FromDiscord<mratsim> until you need to build complex things
18:42:48FromDiscord<apollo> In reply to @Yjuq "lua": only thing i know lua for is my roblox days
18:43:03FromDiscord<mratsim> and then it all breaks down because you need 30k lines of "is_intance_of(string)"
18:43:06FromDiscord<Yjuq> I use lua on a daily basis. It's such a lovely language
18:43:09FromDiscord<Rika> i dont think i want a simplistic language
18:43:10FromDiscord<hamidb80> In reply to @mratsim "until you need to": and it becomes super complex ...
18:43:16FromDiscord<mratsim> (edit) ""is_intance_of(string)"" => ""is_instance_of(string)""
18:43:17FromDiscord<Rika> i want a concise and consistent language
18:43:27FromDiscord<konsumlamm> dynamic typing was a mistake
18:43:33FromDiscord<kaletaa> In reply to @konsumlamm "dynamic typing was a": .
18:43:37FromDiscord<Rika> a simplistic language will make something complex look more complex that it is
18:43:52Oddmongeri see lua more like a c complement (even if i use it for shell scripting)
18:43:52FromDiscord<hamidb80> In reply to @kaletaa ".": i think it wasn't back then
18:44:06FromDiscord<treeform> I really liked python around 2008 ... but I feel python has really gone down hill with the increased popularity.
18:45:07FromDiscord<hamidb80> In reply to @Rika "a simplistic language will": oh, that's right πŸ€”
18:45:29FromDiscord<apollo> In reply to @treeform "I really liked python": so are you saying it's popularity has made it what it is today
18:45:34Oddmongeri want GOTO
18:45:43FromDiscord<kaletaa> no
18:45:48FromDiscord<hamidb80> In reply to @Oddmonger "i want GOTO": no
18:45:56FromDiscord<apollo> no
18:46:12FromDiscord<Yjuq> In reply to @Oddmonger "i want GOTO": lua supports goto :P
18:46:19Oddmongerlocal only :)
18:46:39FromDiscord<Yjuq> It's enough, you just use it to jump out of loops sometimes
18:46:43Oddmongerif the name scares you, i suggest Β«jmp farΒ» instead
18:46:46FromDiscord<apollo> lua is roblox
18:47:12Oddmongerroblox is a windows sh*t done for crashing wine
18:47:36Prestigeany docs on sharing resources between threads?
18:48:02Oddmongerwith arc/orc ?
18:48:07Prestigeno
18:48:31Oddmongeri've read somewhere it was easier with the new gc
18:49:48PrestigeI'm just not seeing any documentation on the topic
18:50:13*natrys joined #nim
18:50:54Oddmongeri've found only threads on the forum
18:51:06PrestigeLol
18:51:24FromDiscord<Yjuq> Oh yea,... Just a quick question about pointer. Is the `pointer` type the same like the `void` counterpart in c?
18:51:43FromDiscord<Rika> yes
18:51:47FromDiscord<haxscramper> @konsumlamm
18:51:51FromDiscord<haxscramper> PR was merged
18:51:58FromDiscord<haxscramper> yay
18:51:59FromDiscord<Yjuq> and `ptr int` would be `int`?
18:52:07FromDiscord<haxscramper> yes
18:52:29FromDiscord<Yjuq> okey good, because it was a bit confusing in the docu. But looks like I got it right, thanks
18:53:26Oddmongerpointer can be used only as C function parameter, right ?
18:53:37FromDiscord<Yjuq> You can use them normally as well
18:53:44FromDiscord<Yjuq> but i think nim discourages this
18:54:01Oddmongerisn't Β«ptrΒ» for nim only ?
18:54:39FromDiscord<Yjuq> I think there was a difference between `ptr` and `ref` - `ptr` means it will be ignored from the GC and `ref` will be collected
18:54:44FromDiscord<Yjuq> or something like this
18:55:13FromDiscord<Yjuq> But both do the same, declare a pointer. As far I understand the docu correctly
18:55:28Oddmongeryes ref is referenced
18:55:55Oddmongerbut you can allocate a ptr with Β«newΒ» keyword only
18:55:59FromDiscord<konsumlamm> In reply to @haxscramper "PR was merged": hooray
18:56:20FromDiscord<Yjuq> In reply to @Oddmonger "but you can allocate": not quite, you have the alloc stuf as well. let me take a look in the docu
18:57:28FromDiscord<konsumlamm> In reply to @Prestige "any docs on sharing": i think the only way to do that without ARC/ORC is using raw pointers (`ptr`)
18:57:32FromDiscord<Yjuq> To allocate a new traced object, the built-in procedure `new` has to be used. To deal with untraced memory, the procedures `alloc`, `dealloc` and `realloc` can be used. The documentation of the system module contains further information.
18:58:49Oddmongerah you can alloc the C way, didn't knew
18:59:48FromDiscord<Yjuq> I would probably discarded nim right away if I didn't find a way to do this :P
19:00:01FromDiscord<Yjuq> That's why this was sticking in my head
19:01:26FromDiscord<Yjuq> Man, I should read the tutorials already. I'm just reading the last 3 days the whole docu step by step
19:03:26FromDiscord<hamidb80> is it possible to say that? https://media.discordapp.net/attachments/371759389889003532/812398957158203392/unknown.png
19:04:11FromDiscord<hamidb80> (edit) "say" => "do"
19:04:27FromDiscord<hamidb80> (edit) "that?" => "that somehow?"
19:08:15FromDiscord<haxscramper> You can write template that replaces `Funcs` with `const` array of stirngs
19:08:39FromDiscord<haxscramper> Maybe there is a more elegant way to do this with `low(Funcs) .. high(Funcs)`, but I'm not sure
19:08:40Prestigehm
19:08:59FromDiscord<hamidb80> In reply to @haxscramper "Maybe there is a": no it doesn't work
19:10:15PrestigeI'm attemping to tell thread A to invoke a function that belongs to thread B, but it's not GC safe
19:11:59FromDiscord<queersorceress> hey all, this might be a long shot but wondering if anyone knows of a templating engine library for nim that supports basic logic operations. i'd be okay with mustache templates if it also supported if statements/conditionals. only libraries i can see on nimble.directory either are mustache libraries or are very old/unsupported for the behavior i am looking for. figured i should ask the group to see if there are some other librarie
19:12:16FromDiscord<Yjuq> In reply to @hamidb80 "is it possible to": sent a code paste, see https://play.nim-lang.org/#ix=2PZE
19:12:35FromDiscord<Yjuq> Maybe with a template and some static magic you can do that per compile time? x)
19:12:41FromDiscord<Yjuq> Dunno if this works
19:13:01PrestigeMaybe there's some way I can turn blocking calls into async functions
19:13:11Prestigethen I could do it all on one thread
19:13:24FromDiscord<haxscramper> In reply to @hamidb80 "no it doesn't work": https://play.nim-lang.org/#ix=2PZG
19:14:44FromDiscord<hamidb80> In reply to @haxscramper "https://play.nim-lang.org/#ix=2PZG": is that empty?
19:14:44FromDiscord<haxscramper> In reply to @haxscramper "https://play.nim-lang.org/#ix=2PZG": This can be optimized into zero-cost at rutime if you need, with wrapper helper
19:15:10FromDiscord<haxscramper> In reply to @hamidb80 "is that empty?": sent a code paste, see https://play.nim-lang.org/#ix=2PZI
19:15:34FromDiscord<hamidb80> In reply to @haxscramper "https://play.nim-lang.org/#ix=2PZG": i don't see anything except one empty line
19:16:54FromDiscord<hamidb80> In reply to @haxscramper "no? ```nim type": awesome
19:18:14*PMunch joined #nim
19:18:37FromDiscord<haxscramper> In reply to @haxscramper "This can be optimized": https://play.nim-lang.org/#ix=2PZL
19:19:16FromDiscord<haxscramper> I'm fairly sure there is a more elegant way to force consteval function to be a constexpr whever possible
19:19:28FromDiscord<haxscramper> evaluate to constant expression
19:19:47FromDiscord<hamidb80> hmm..
19:32:05*FromGitter quit (Ping timeout: 265 seconds)
19:32:27*FromGitter joined #nim
19:33:57*oprypin_ joined #nim
19:34:01*oprypin quit (Ping timeout: 265 seconds)
19:34:20FromDiscord<queersorceress> @haxscramper this seems an awful lot like the functionality in the `parseutils` module.
19:34:34FromDiscord<queersorceress> particularly `parseEnum`
19:36:32*lritter quit (*.net *.split)
19:36:32*zedeus quit (*.net *.split)
19:36:33*junland quit (*.net *.split)
19:36:34*def- quit (*.net *.split)
19:36:34*hoek quit (*.net *.split)
19:36:34*literal quit (*.net *.split)
19:36:34*lbart quit (*.net *.split)
19:36:35*nisstyre quit (*.net *.split)
19:38:07FromDiscord<haxscramper> Yes, though it does all sort of case-insensetive parsing, and might be not necessary in this case (also it raises instead of returning true/false)
19:38:31FromDiscord<zetashift> treeform: Whenever I join two paths I get a small indent: https://play.nim-lang.org/#ix=2PZP the playground link also contains the link to the my result, is there a way to fill that up? Am I specifying the coordinates wrong maybe?
19:39:39FromDiscord<zetashift> e.g. make the paths overlap fully
19:40:13*lritter joined #nim
19:40:13*zedeus joined #nim
19:40:13*junland joined #nim
19:40:13*def- joined #nim
19:40:13*hoek joined #nim
19:40:13*literal joined #nim
19:40:13*lbart joined #nim
19:40:13*nisstyre joined #nim
19:40:21*nisstyre quit (Max SendQ exceeded)
19:41:42*nisstyre joined #nim
19:43:17*hoek quit (Ping timeout: 256 seconds)
19:45:01*hoek joined #nim
19:46:03FromDiscord<ElegantBeef> In reply to @hamidb80 "is it possible to": If you're you can just use `strutils.parseEnum`
19:46:15FromDiscord<ElegantBeef> (edit) "In reply to @hamidb80 "is it possible to": If you're ... you" added "lazy"
19:49:51Prestige@ElegantBeef you have any async experience with Nim? I pretty much have two blocking calls I've converted to async procs, I'm wanting them to process continuously until the program exits...
19:50:09PrestigeWas trying with threads earlier but they need to be able to communicate
19:51:42*kenran quit (Quit: leaving)
19:52:45FromDiscord<gollark> `asyncCheck thing1()`, `asyncCheck thing2()`, `runForever`?
19:53:17PrestigeThat's what I'm doing, but I think one is blocking (they both have while true: ...)
19:53:37FromDiscord<dom96> while true doesn't necessarily mean blocking
19:54:11Prestigehm
19:57:02PrestigeSomething else is happening I guess
19:58:44FromDiscord<Rika> as long as they both have await inside their while true
19:58:46PrestigeIt's like running a cached binary or something... I changed an echo statement and the old one is being used, lol.
19:58:49FromDiscord<Rika> shouldnt block
20:09:34Prestigeokay somehow the process was still running in the bg or something, had to close my terminal. Back to seeing why async in this case isn't working.
20:10:17PrestigeWhichever of these 2 function is ran last, does print anything when I echo. So it seems it's being blocked
20:10:38PrestigeThey both have while true: await someAsyncFunction in them
20:16:19FromDiscord<mratsim> anything that interact with the console is blocking unless explicitly made non-blocking.
20:16:45PrestigeThink I've narrowed it down. Only one of them seems to be blocking, so it's probably an incorrectly written function that returns a Future that I wrote
20:16:45FromDiscord<mratsim> that's because you need syscalls and the kernel can block you in those.
20:16:58FromDiscord<mratsim> for IO at least.
20:17:50PrestigeCould you take a look at https://play.nim-lang.org/#ix=2Q03 because I believe I must have done this incorrectly (line 6)?
20:17:58PrestigeThis is where it hangs
20:18:46FromDiscord<mratsim> no idea what XNextEvent is. The doc should mention if it's blocking
20:18:52FromDiscord<mratsim> like if it's waiting for an event.
20:18:53PrestigeIt is blocking
20:19:01Prestigeyeah it waits for an event
20:19:59FromDiscord<mratsim> then don't make it async
20:20:12FromDiscord<mratsim> if you run a blocking call on the async event loop you will block your whole loop
20:20:31FromDiscord<mratsim> you need to put it on a dedicate thread.
20:21:11PrestigeI was attempting that first, but I need one thread to invoke a function that uses resources on another. It's not GC safe
20:21:38FromDiscord<mratsim> use a channel to transfer resources
20:21:39FromDiscord<queersorceress> is there any good materials out there for getting familiar with concurrent programming in Nim? i'm somewhat familiar with using channels, but it doesn't quite match up to my existing mental models of task queues and run loops that i've used in other languages. if there is an example for creating dedicated threads for dispatching work blocks, that would be really helpful.
20:22:01PrestigeAny docs on that? Couldn't find anything earlier
20:22:15FromDiscord<mratsim> In reply to @queersorceress "is there any good": You use `createThread` with queues.
20:22:40FromDiscord<queersorceress> In reply to @Prestige "Any docs on that?": https://nim-lang.org/docs/channels.html
20:23:05Prestigety
20:23:24FromDiscord<queersorceress> In reply to @mratsim "You use `createThread` with": is there a way to do that to a named thread, rather than a specific variable?
20:23:34FromDiscord<mratsim> In reply to @queersorceress "is there any good": I have a couple of examples in markdown of producer consumer arch: https://github.com/mratsim/blocksmith/blob/master/quarantine.md
20:24:04FromDiscord<mratsim> there is no easy named channels (CSP) or named coroutines (actors)
20:24:16FromDiscord<mratsim> at least not at the moment.
20:25:01FromDiscord<queersorceress> hmmm, i'm very much use to using libdispatch/GCD if you are familiar with that API -- i guess i could make a singleton interface to wrap that lookup at runtime
20:25:01FromDiscord<mratsim> and another example with a service that also manages a threadpool: https://github.com/mratsim/blocksmith/blob/master/rewinder.md
20:25:24FromDiscord<mratsim> yes I know libdispatch, not the API but what is inside.
20:26:11PrestigeThe resource I would be sending is a Table[string, proc], and I need to invoke the proc. Would that even work with channels?
20:26:16FromDiscord<queersorceress> the simplicity of specifying the queue by name, and then a callback or anonymous function of work to be done on said thread
20:26:17FromDiscord<mratsim> if you only have CPU tasks you can use Weave: there is an experimental background service thread mode as well: https://github.com/mratsim/weave#foreign-thread--background-service-experimental
20:26:44FromDiscord<mratsim> for IO there is nothing though
20:26:51FromDiscord<queersorceress> yeah i was looking at weave, but slightly intimidated by the amount of information for what i am planning on doing
20:27:13FromDiscord<mratsim> In reply to @Prestige "The resource I would": if your table is a const it's fine
20:27:38FromDiscord<mratsim> In reply to @queersorceress "yeah i was looking": that's because Nim doc generator is meh and so I needed to put everything in the README to avoid trying to deal and lose time with it.
20:27:46PrestigeIt's not, it gets populated at runtime
20:28:14FromDiscord<mratsim> but why don't you return the result of the event to the main thread once it arrived?
20:28:30Prestigethe events are processed on the main thread
20:28:47Prestigethe other thread is for ipc, listening for incomming messages
20:28:58Prestigebased on the message, I want to invoke a proc
20:29:19FromDiscord<mratsim> but you want to invoke the proc on the main thread or on the listner?
20:29:25FromDiscord<mratsim> or it doesn't matter?
20:29:26PrestigeOn the main thread
20:29:29FromDiscord<queersorceress> context: i'm building an application with jester that will support automatically converting page content from .rst files over to .html and then cache them locally. i am trying to figure out how i'm going to write the code to safely handle the file operations in a thread-safe manner - and my mind went to named GCD dispatch queues to handle interactions with the cache.
20:29:30Prestigewell
20:29:40FromDiscord<mratsim> then once it arrives forward the message by channel
20:29:44Prestigethe objects exists on the main thread that the procs interact with
20:29:47FromDiscord<mratsim> so the table doesn't need to be shared
20:29:55Prestigehm that's a good idea
20:29:59Prestigety
20:30:42FromDiscord<mratsim> In reply to @queersorceress "context: i'm building an": ah so it's IO mostly, I think asyncdispatch should be enough for that, why do you think you will need threads?
20:31:16FromDiscord<mratsim> I will have to look into those named dispatch queues, looks interesting.
20:34:34FromDiscord<queersorceress> it's just having the thread/queue tied to a user-composed string rather than a specific pointer. so in the case of nim channels, you have your `var worker: Thread[T]`, and instead of carrying that around everywhere it is needed, you can go `var worker = getThreadNamed("some.unique.string.identifying.your.thread")` to get your thread anywhere. i'm sure it's just mapped to some hashtable with access locks but it isn't that complicate
20:35:07FromDiscord<queersorceress> it is just a more user-friendly abstraction for the sake of using the API
20:35:48*blackpawn quit (Ping timeout: 260 seconds)
20:36:55FromDiscord<mratsim> got it
20:37:19FromDiscord<queersorceress> and you are right, i probably could just use asyncdispatch for this, but i'm not that comfortable with the low-level nature of the API, my next question was going to be about if the difference in using threads vs asyncdispatch would it cause any conflicts?
20:37:44FromDiscord<mratsim> AFAIK jester or httpbeast does use both
20:37:57FromDiscord<mratsim> asyncdispatch is async/await, same thing as in Python or C#
20:38:12FromDiscord<mratsim> or Rust or many other languages
20:39:08FromDiscord<queersorceress> mmm, vast majority of my concurrency experience is in C-languages πŸ™ƒ
20:40:07FromDiscord<mratsim> then here you go: https://github.com/nim-lang/Nim/pull/12979
20:47:56*vsantana joined #nim
21:03:06*haxscramper quit (Remote host closed the connection)
21:03:31*blackpawn joined #nim
21:04:22FromDiscord<dom96> In reply to @queersorceress "context: i'm building an": I don't see a need for thread there
21:04:24FromDiscord<dom96> (edit) "thread" => "threads"
21:06:02FromDiscord<queersorceress> no? if two requests are made for the same uncached page, wouldn't that result in a race of trying to write a file to disk?
21:09:08*PMunch quit (Quit: leaving)
21:12:59FromDiscord<Rika> no threads mean harder to make race conditions
21:13:12FromDiscord<Rika> or impossible, but i cant recall if thats true
21:14:38FromDiscord<queersorceress> right, i mean you theoretically should be able to do that with just locks around the particular operations you need to limit but threads would make it much easier to manage conceptually (at least to me it is).
21:16:55FromDiscord<queersorceress> as long as operations happen on serial operation queues, that would prevent duplicate work being triggered and operations where the same resource is trying to be accessed concurrently (like the same cache file being written to disk from two separate network requests)
21:23:02FromDiscord<Yjuq> What is the technical difference between a macro and a template?
21:24:01FromDiscord<Clyybber> a template is like a simple macro that just replaces some parts of it's result with it's arguments
21:24:15FromDiscord<Clyybber> a full blown macro on the other hand can do whatever it wants with the ast
21:24:30FromDiscord<Clyybber> like iterate over it, check certain conditions and construct entirely new AST
21:24:53FromDiscord<queersorceress> macro can rewrite the AST of the code, whereas a template is more like a C preprocessor #define, it just done what it says
21:27:40FromDiscord<Yjuq> Huh gotcha - macro for AST manipulation and template for #define
21:27:44FromDiscord<Yjuq> sounds simple
21:28:58FromDiscord<Clyybber> C also uses #define for constants for which in Nim it would be idiomatic to use const
21:29:49FromDiscord<Yjuq> But you can't assign a constant out of a c header file in a const right?
21:29:56FromDiscord<Yjuq> With importc
21:31:04FromDiscord<Clyybber> nope
21:32:40FromDiscord<Yjuq> I still don't get what purpose `let` have. It's like a run time constant? Does it optimize something intern or is it just a "nice way" of immutable variables.
21:33:19FromDiscord<Yjuq> (edit) "have." => "has."
21:33:48FromGitter<deech> For passing function pointer to C/C++ I've been using `proc blah(...) {.inline.}` . It seems to be working, any gotchas?
21:34:01FromDiscord<Clyybber> yep, let means immutable
21:34:17FromDiscord<Clyybber> the compiler can do more optimizations on them
21:34:25FromDiscord<queersorceress> In reply to @mratsim "then here you go:": well, i get the concepts of futures, promises, etc. but those actions don't make the operations inherently safe, so i'd still need locks, i'd just be using a serial operations queue to limit the unsafe operations to not be concurrent as an alternative to doing lock management.
21:34:45FromDiscord<Clyybber> @deech: WDYM
21:35:19FromGitter<deech> Clyybber, is `inline` the right pragma to use for functions that shouldn't close over anything.
21:35:48FromDiscord<Clyybber> @deech Taking the address of an {.inline.} will prevent it from actually being inline
21:35:50FromDiscord<Clyybber> (edit) "inline" => "inlined"
21:36:11FromDiscord<Clyybber> {.inline.} translates to C's inline hint, which the C compiler is allowed to ignore
21:36:12FromDiscord<queersorceress> In reply to @Yjuq "I still don't get": using `let` makes an immutable object, whereas `var` makes a mutable one. this is important for functional programming practices, most of the time you perform transformations on data rather than having to modify something in place. this lends itself to make code more memory "safe".
21:36:50FromGitter<deech> So what's the right way of passing a function pointer to a Nim `proc`?
21:37:16FromDiscord<Yjuq> In reply to @deech "So what's the right": from c to nim or from nim to c?
21:37:32FromDiscord<Yjuq> In either way you can just pass the pointer. That's it
21:37:50FromGitter<deech> Nim `proc` that will be called by C/C++.
21:38:25FromGitter<deech> Can't simply pass a pointer though you have to make sure there's no closure environment, no?
21:38:31FromDiscord<queersorceress> In reply to @deech "So what's the right": you would have to use the `exportc` pragma to make a symbol that could be called by native c-language code.
21:38:43FromDiscord<Yjuq> In reply to @deech "Can't simply pass a": you can use a func instead
21:38:44FromDiscord<Clyybber> deech: Ah, you can use {.nimcall.} to force it to not be a closure
21:38:51FromDiscord<Clyybber> In reply to @Yjuq "you can use a": not related :)
21:39:12FromGitter<deech> Clyybber, ah hah! That's what I was looking for I think. Thanks!
21:39:18FromDiscord<Clyybber> In reply to @queersorceress "you would have to": nope, you can still pass the address of a non-exportc'ed function to C :)
21:39:49FromDiscord<treeform> In reply to @zetashift "treeform: Whenever I join": If you want lines to connect you should draw them in once path. The way you have it now is that you are drawing independed shapes.
21:40:00FromDiscord<treeform> We have not done all of the path joining yet.
21:40:18FromDiscord<queersorceress> if you are talking about callbacks, there are some other pragmas and ways to handle passing around function pointers, but i'd suggest using predefined C stdlib types like `(u)intptr_t` to accomodate for variable pointer size based on architecture and platform.
21:40:45FromDiscord<Yjuq> In reply to @Clyybber "not related :)": Seems like i misunderstood something. My english isn't always on spot :P - I probably misunderstood what "closure" means in this context
21:40:48FromDiscord<Clyybber> In reply to @deech "<@107882072974065664>, ah hah! That's": Although you probably want cdecl instead
21:40:49FromDiscord<queersorceress> In reply to @Clyybber "nope, you can still": i mean, sure, but why would you do that when you can use a normal function call??
21:41:36*vicfred quit (Quit: Leaving)
21:41:51FromGitter<deech> Cool, so something like `proc p(...) {.cdecl.}; pass_to_c(rawProc p)` should do it?
21:41:53FromDiscord<Clyybber> In reply to @queersorceress "i mean, sure, but": Libraries often expect callbacks
21:42:09FromDiscord<Clyybber> In reply to @deech "Cool, so something like": no need to use rawProc, just use addr
21:42:24FromGitter<deech> Nice, thanks!
21:42:40FromDiscord<Clyybber> In reply to @Clyybber "Libraries often expect callbacks": and I suspect that deech is interoping with some C/C++ library here that expects a function pointer
21:42:52FromGitter<deech> Yep, that's the use case.
21:43:50FromDiscord<queersorceress> that depends highly on the implementation details of your compiler toolchain, which is why i gave the answer i did, as it should work everywhere, regardless of those details, but yes, please go on.
21:44:58FromDiscord<Clyybber> In reply to @queersorceress "that depends highly on": oh? I think I misunderstood what you were saying
21:46:30FromDiscord<ElegantBeef> Late prestige but nope i dont
21:46:57Prestigeall good mratsim was able to help
21:50:23FromDiscord<queersorceress> In reply to @Clyybber "oh? I think I": sent a long message, see http://ix.io/2Q0E
21:50:48*narimiran quit (Ping timeout: 265 seconds)
21:51:08FromDiscord<Clyybber> oh, yeah. If you have control over the C code than doing exportc and calling it from C directly would work
21:51:16FromDiscord<Clyybber> (edit) "than" => "then"
21:52:07FromDiscord<Clyybber> using {.cdecl.} and passing the addr of the proc to a C function that expects a function pointer is definitely safe though
21:52:42FromDiscord<Clyybber> as long as the type of the argument you are passing to is properly declared in nim :)
21:53:17FromDiscord<Rika> yes
21:53:18FromDiscord<Yjuq> sent a code paste, see https://play.nim-lang.org/#ix=2Q0F
21:53:20FromDiscord<queersorceress> well as long as you properly know how to load the registers, that wouldn't matter either.
21:53:22FromDiscord<Rika> first x is typed
21:53:29FromDiscord<Rika> second is as you wrote, untyped
21:53:30*natrys quit (Ping timeout: 246 seconds)
21:53:43FromDiscord<ElegantBeef> Which doesnt really matter in this case
21:54:03FromDiscord<Rika> they asked if there was a difference tho xd
21:54:15FromDiscord<ElegantBeef> Yea i was just saying it being a sym doesnt matter much
21:54:17FromDiscord<Yjuq> sent a code paste, see https://play.nim-lang.org/#ix=2Q0G
21:54:37FromDiscord<ElegantBeef> I was going to say i dont think it's typed, i thought undeclared template types were untyped
21:54:54FromDiscord<Yjuq> So, they are per default always untyped.
21:54:57FromDiscord<Yjuq> gotcha
21:55:34FromDiscord<Rika> what the fuck
21:55:38FromDiscord<Rika> youre telling me
21:55:39FromDiscord<ElegantBeef> I'm looking at the docs now for certainty, but yea it sounds like they're untyped
21:55:42FromDiscord<Rika> parameters are untyped
21:55:46FromDiscord<queersorceress> have you read the language docs about typed vs untyped?
21:55:46FromDiscord<Rika> but return type is typed
21:55:48FromDiscord<Rika> by default?
21:55:49FromDiscord<ElegantBeef> for templates
21:56:13FromDiscord<Clyybber> In reply to @Rika "but return type is": typed/untyped as return type means expression/statement, so it makes sense
21:56:14FromDiscord<Yjuq> In reply to @queersorceress "have you read the": I'm currently reading it - this is probably not the last question about this topic from me :P
21:56:20FromDiscord<Rika> is THAT why ive been confused so many times
21:56:47FromDiscord<ElegantBeef> the difference is just one is semantically concise and capable of looking up(typed that is)
21:56:57FromDiscord<Rika> because i didnt realize omitting parameter type meant untyped by default and omitting return type meant typed by default
21:57:15FromDiscord<queersorceress> In reply to @Yjuq "I'm currently reading it": questions are cool, i'm just saying it because nim has pretty great docs and they should clear up most questions -- not trying to say anything about your questions πŸ™‚
21:57:18FromDiscord<Rika> that is certainly annoying
21:57:42FromDiscord<queersorceress> though the docs are pretty dense, so it can be easy to miss some stuff
21:58:07FromDiscord<Clyybber> In reply to @Rika "because i didnt realize": typed as a return type for templates basically means statement
21:58:21FromDiscord<Clyybber> which is confusing I agree :D
21:58:49FromDiscord<Yjuq> In reply to @queersorceress "questions are cool, i'm": But reading this stuff and understanding are 2 different things. I don't think the documentation is "pretty good" from my perspective. It just rises more questions most of the time. I don't have any practice in languages with this kind of structures.
21:59:17FromDiscord<Rika> In reply to @Clyybber "typed as a return": thats not what i meant
21:59:18FromDiscord<ElegantBeef> Are you reading the manual, tutorials, or the docs?
21:59:32FromDiscord<Rika> i thought omission meant [un]typed for both
21:59:58FromDiscord<Yjuq> In reply to @ElegantBeef "Are you reading the": Language Manual
22:00:30FromDiscord<Yjuq> This is what is linked under "Documentation" on nim-lang.org
22:00:34FromDiscord<queersorceress> In reply to @Yjuq "But reading this stuff": that's fair! then i will continue to answer as best as i can.
22:00:50FromDiscord<ElegantBeef> Well the entire point of this real time chat is realtime responses πŸ˜„
22:01:00FromDiscord<ElegantBeef> rtfm where you can and ask where you cannot πŸ˜›
22:01:03*jxy_ quit (Quit: leaving)
22:01:19FromDiscord<Clyybber> In reply to @Rika "i thought omission meant": I see, I mean it would probably make just as much/no sense if untyped as a return type would mean statement, and typed would mean expression
22:01:21*jxy joined #nim
22:01:31FromDiscord<Yjuq> I just downloaded nim yesterday and read the manual now the third time >.>
22:01:38FromDiscord<Yjuq> and try to understand concepts better
22:01:41FromDiscord<ElegantBeef> Have you read the tutorials?
22:01:44FromDiscord<Yjuq> stucking at templates and macros atm
22:01:53FromDiscord<ElegantBeef> The tutorials are the more approachable explanations
22:01:55FromDiscord<Clyybber> I think learning by doing might be the best way
22:02:00FromDiscord<Yjuq> In reply to @ElegantBeef "Have you read the": I'm cross reading these if I need some more information
22:02:08FromDiscord<Clyybber> since you won't need all of the language just to write some code
22:02:19FromDiscord<ElegantBeef> Learning by doing is the best way for anything imo
22:02:20FromDiscord<Clyybber> and if you get stuck, then consult the manual/IRC
22:02:57FromDiscord<Yjuq> In reply to @Clyybber "since you won't need": I'm evaluating if nim is the right tool for my project. This is not something I can "just start" and "do it". I'm seriously considering if I can use it for my production
22:03:00FromDiscord<ElegantBeef> Also clyybber i didnt have to rebase, i just made an issue with the bsd CI clear πŸ˜›
22:03:09FromDiscord<Clyybber> In reply to @ElegantBeef "Learning by doing is": I agree, but I suppose it depends on the person
22:03:13FromDiscord<Clyybber> In reply to @ElegantBeef "Also clyybber i didnt": lol
22:03:14FromDiscord<Clyybber> I saw
22:04:33FromDiscord<ElegantBeef> In reply to @Yjuq "I'm evaluating if nim": It's clearly the right tool for the job, regardless of the job. Shaving, counting, cleaning πŸ˜›
22:05:11FromDiscord<Yjuq> The preference is currently still sitting on Rust rofl
22:05:36FromDiscord<ElegantBeef> You said the R-word you now are going to get banned in eta 5 seconds
22:05:42FromDiscord<queersorceress> heh, i don't think you will need to ever use macros or templates in writing nim. they are definitely a language feature, something that can enhance your ability to write code but not a hard and fast requirement in terms of being able to use the language for anything.
22:06:09FromDiscord<ElegantBeef> They're how we do introspection and are fantastic for making a more ergonomic project
22:06:31FromDiscord<ElegantBeef> So you dont need them but they're so fricken lovely!
22:07:01FromDiscord<queersorceress> it sounds like you understand what they are used for, but are struggling with the syntax or mechanics of the API to implement them for yourself, is that accurate?
22:07:06*natrys joined #nim
22:07:10FromDiscord<Rika> In reply to @Yjuq "The preference is currently": if you're much more comfy with rust id just go with that really
22:07:22FromDiscord<ElegantBeef> Bad rika, bad
22:07:33FromDiscord<Rika> be real
22:07:36FromDiscord<ElegantBeef> We need the rust cult-like behaviour!
22:07:55FromDiscord<Rika> if you dont know rust tho, i think nim would be better
22:07:57FromDiscord<ElegantBeef> I am real, almost always really joking
22:08:00FromDiscord<Yjuq> In reply to @queersorceress "it sounds like you": Exactly
22:08:02FromDiscord<Rika> since you seem to already be struggling with nim
22:08:07FromDiscord<Rika> you're gonna fucking die with rust
22:08:26*asdflkj_1 quit (Ping timeout: 240 seconds)
22:08:46FromDiscord<Rika> well, that's from my experience
22:08:50FromDiscord<Rika> ymmv
22:08:57FromDiscord<ElegantBeef> I gloss over some of the details but https://dev.to/beef331/demystification-of-macros-in-nim-13n8 might be a nice read for macros atleast
22:09:22*actuallybatman quit (Quit: leaving)
22:09:41FromDiscord<queersorceress> honestly, it may take you quite some time to fully get it then. it took me a while to see how to properly use them for myself. it requires a more holistic understanding of the language that you won't get after day 3 of using nim.
22:10:09FromDiscord<queersorceress> which is why i said they aren't a requirement in writing nim code, or even good nim code.
22:10:24FromDiscord<Yjuq> In reply to @queersorceress "honestly, it may take": That's fine - I just said I try to evaluate the language. I need some highly optimized stuff and probably end up with a lot of asm as well.
22:10:42FromDiscord<Yjuq> Just try to get a grasp if nim could make things easier
22:10:52FromDiscord<Yjuq> instead of rust or other alternatives
22:11:16FromDiscord<Rika> if youre not hellbent for safety yes very
22:11:25FromDiscord<ElegantBeef> I mean Nim is a safe language πŸ˜„
22:11:32FromDiscord<Yjuq> I might look like a fool and a newbie but i have 10+ years programming experience. A lot of them in assembler
22:11:37FromDiscord<Rika> "not as safe as rust"
22:11:41FromDiscord<ElegantBeef> `not nil`
22:11:48FromDiscord<queersorceress> i don't know of many languages that allow you to rewrite your syntax trees and optimize functionality in the ways you can with nim. it can make some applications much better than implementations in other languages, but it has a bit of a learning curve.
22:12:02FromDiscord<Rika> @queersorceress ~~Lisp~~
22:12:36FromDiscord<Rika> @Yjuq you may not be new to programming, but that makes you sound new to high level programming
22:12:37FromDiscord<ElegantBeef> Rust has procedural macros but they make compile time even longer
22:12:53FromDiscord<Rika> what the heck does the procedural there mean
22:12:58FromDiscord<queersorceress> it's something you can grow into using it, but don't feel like it is necessary for language comprehension and application like concurrency/async/file io might be.
22:13:00FromDiscord<ElegantBeef> They work/emit the AST
22:13:37FromDiscord<Yjuq> In reply to @Rika "<@!221238127937847296> you may not": Not completly. I have some Java / Go and diverse scripting languages background. But I never touched C++ - Just C
22:13:43FromDiscord<ElegantBeef> https://doc.rust-lang.org/reference/procedural-macros.html
22:13:50FromDiscord<Yjuq> But yea, nim is another kind of beast
22:13:59FromDiscord<queersorceress> if you are gonna write a lot of asm, then nim might be the better option given the interop with C and the existance of asm directive.
22:14:06FromDiscord<queersorceress> than something like rust
22:14:16FromDiscord<ElegantBeef> Plus we're managed but without enforcing ownership
22:14:35FromDiscord<ElegantBeef> You use views if you really need them
22:15:41FromDiscord<ElegantBeef> So you get a very performant language without reasoning about lifetimes unless you need to, and get low memory usage/no stop the world GC
22:15:49FromDiscord<konsumlamm> In reply to @ElegantBeef "`not nil`": https://github.com/nim-lang/Nim/issues/14730 :P
22:16:03FromDiscord<Rika> In reply to @ElegantBeef "https://doc.rust-lang.org/reference/procedural-macr": you'd be insane if you thought id click that
22:16:04FromDiscord<queersorceress> In reply to @Rika "<@!352997242531086338> ~~Lisp~~": pointed look
22:16:17FromDiscord<ElegantBeef> That's not the new `strictNotNil`
22:16:32*vicfred joined #nim
22:16:45FromDiscord<ElegantBeef> http://nim-lang.github.io/Nim/manual_experimental.html#strict-not-nil-checking
22:17:56FromDiscord<konsumlamm> In reply to @ElegantBeef "You use views if": views aren't really stable at all though, are they?
22:18:03FromDiscord<ElegantBeef> `lent` is
22:18:07FromDiscord<konsumlamm> In reply to @ElegantBeef "That's not the new": my example doesn't work with that either though
22:18:45FromDiscord<ElegantBeef> With arc i used the views with no problem on devel
22:18:59FromDiscord<queersorceress> to re-pose a question i had earlier: does anyone have recommendations or suggestions for template engines that support logic operations in nim? i'd need to access it as a library. based on nimble.directory there are a couple of implementations but not any that seem to work and support logic operations.
22:19:02FromDiscord<ElegantBeef> Have this whole proof of concept https://github.com/beef331/strviewutils
22:19:17FromDiscord<konsumlamm> idk, all i heard about views is that they're buggy as hell
22:19:37FromDiscord<ElegantBeef> I found they were only buggy with refc, resulting in bad code gen
22:20:04FromDiscord<konsumlamm> Β―\_(ツ)_/Β―
22:20:06FromDiscord<ElegantBeef> I know 4raq, did say there was a flaw in the design
22:20:32FromDiscord<ElegantBeef> Think it was mostly that the mutability wasnt in the type but just stabled on
22:21:01FromDiscord<ElegantBeef> But mratsim has a viewtype implemented in stable that uses `lent` to ensure it doesnt outlive the value
22:22:18FromDiscord<ElegantBeef> @mratsim what happened to your stridedviews?!
22:22:26FromDiscord<ElegantBeef> Ah nvm
22:22:27FromDiscord<ElegantBeef> I'm blind
22:22:44FromDiscord<ElegantBeef> https://github.com/mratsim/constantine/blob/54887b1777d4187d51a00c35b81e076578529d12/research/kzg_poly_commit/strided_views.nim#L23 His view type
22:23:33FromDiscord<Yjuq> Hmn - nims config files aren't well documented or?
22:23:45FromDiscord<Yjuq> `nim.cfg`
22:23:47FromDiscord<ElegantBeef> You have 3 different ways to config πŸ˜„
22:24:05FromDiscord<ElegantBeef> if it's per project it's `main.nim.cfg`
22:24:11FromDiscord<ElegantBeef> or `main.nims`
22:24:35FromDiscord<ElegantBeef> https://nim-lang.org/docs/nimc.html#compiler-usage-configuration-files
22:24:54FromDiscord<Yjuq> Yea, I read that already
22:25:48FromDiscord<Yjuq> But nothing tells you how a config file has to be formatted. The only thing that i can use as "docu" are the config files for nim itself
22:25:59FromDiscord<ElegantBeef> It uses the cli parameters
22:26:13FromDiscord<ElegantBeef> so `--gc:arc` is a valid line
22:26:16FromDiscord<Yjuq> but you have constructs like @if ... @end as well
22:26:55FromDiscord<Yjuq> This is all a mess to get a overview sigh
22:27:32FromDiscord<ElegantBeef> You can also use a nimscript file or a nimble file
22:27:46FromDiscord<Rika> its poorly documented, config files
22:28:24FromDiscord<Yjuq> I think I just ignore the config files for nim completly and use my own tool - it uses lua for building projects
22:28:44FromDiscord<Yjuq> at least i know what i can do and what not :P
22:29:13FromDiscord<Yjuq> (edit) "i" => "it"
22:29:19FromDiscord<ElegantBeef> In reply to @Rika "its poorly documented, config": Yea but isnt the general consensus to use nimscript instead?
22:29:28FromDiscord<queersorceress> you can also just call it `nim.cfg` the `foo.nim.cfg` is for allowing multiple config files files to binaries in the same directory. there is another format `.nims` which allows scripting and logical operations in what gets passed to the compiler
22:29:53FromDiscord<Rika> beef no i dont think so
22:30:10FromDiscord<Rika> i personally dont use them, and i feel like theres a good chunk of nim users who dont
22:30:23FromDiscord<queersorceress> `.cfg` for declarative format, `.nims` for when you need evaluation what needs to be sent to the compiler.
22:30:33FromDiscord<Yjuq> In reply to @queersorceress "you can also just": I kind of have my own tool already that acts like nimscript but with lua instead. I wrote it 3 years ago out of frustration of make files and all language specific config stuff. It's universell
22:30:50FromDiscord<Rika> hey if it works it works
22:30:52FromDiscord<ElegantBeef> You can use nimscript for declarative aswell
22:30:54FromDiscord<Solitude> In reply to @ElegantBeef "Yea but isnt the": if i need any logic i use nims, otherwise cfg
22:30:58FromDiscord<queersorceress> so the config files aren't build scripts
22:31:14FromDiscord<ElegantBeef> Yea idk i just try to shoehorn it into nimble
22:31:15FromDiscord<ElegantBeef> (edit) removed ""
22:31:21FromDiscord<Yjuq> they are. you have lua scripts instead
22:31:30FromDiscord<Yjuq> and invoke stuff per CLI
22:31:40FromDiscord<queersorceress> it's to specify build settings or compiler flags, it's not meant to be used as a build script or system.
22:31:52*xrinzler joined #nim
22:32:11FromDiscord<Yjuq> Ah, you was refering to the nim config files
22:32:17FromDiscord<Yjuq> my bad
22:32:23FromDiscord<queersorceress> yes, they aren't like makefile or something
22:34:21FromDiscord<queersorceress> so if you want to use your own tool or script for invoking the compiler then feel free. i guess you could theoretically use nimscript to do it, as that is what nimble does for building packages, but it definitely isn't developed to handle that as a primary goal.
22:35:31FromDiscord<Yjuq> I was just pointing out that the documentation for the config files is bad. :P
22:35:55FromDiscord<ElegantBeef> quick someone make a PR
22:36:06FromDiscord<queersorceress> i believe it exists in the compiler docs, and they only exist to specify compiler flags in them
22:36:12*natrys quit (Ping timeout: 246 seconds)
22:36:56FromDiscord<ElegantBeef> Well at the most you can do custom logic for things like `--os`, `--arch` or `--cc`
22:36:59FromDiscord<queersorceress> their contents get appended to the compiler invocation, that's it.
22:37:43FromDiscord<ElegantBeef> By custom logic i just mean specific compile flags
22:37:53FromDiscord<queersorceress> with the `.nims` version you can do conditional logic, i even have a set that allows me to build and run nim code using llvm sanitizers for debug purposes.
22:38:27FromDiscord<ElegantBeef> With then nimble version you can define tasks so then you get a make like build system
22:38:48FromDiscord<ElegantBeef> Though you can do the same with nimscript but you'd have to extract the params i'd assume
22:39:09FromDiscord<Yjuq> I tried nimble out. But I didn't figured how I change from the mingw64 to the mingw32 compiler in it
22:39:12FromDiscord<ElegantBeef> solitude if you want to take doms sentence further change your name to `nice`
22:39:22FromDiscord<Yjuq> probably over --cc somehow
22:39:35FromDiscord<Solitude> In reply to @ElegantBeef "solitude if you want": no, i want to be a reminder
22:39:37FromDiscord<queersorceress> yeah, that's using nimscript, which has docs spread over 2 or 3 different pages, which acts as a rudimentary build system. if you want something more advanced i'd probably recommend using Make.
22:39:40FromDiscord<ElegantBeef> the main nim config should handle it so you should just specify the arch
22:40:30FromDiscord<Yjuq> In reply to @queersorceress "yeah, that's using nimscript,": No,... make is not gonna happend. I tried to get a hang on it one time and it confused me. That's why I build my tool - to have something like make but with lua scripts instead
22:40:34FromDiscord<ElegantBeef> Can also checkout nake
22:40:42FromDiscord<queersorceress> yeah i would hope that it should reselect the compiler based on arch, but i don't build stuff on windows using mingw, so i don't know -- i'd just use llvm.
22:40:43FromDiscord<ElegantBeef> though that's if you want a nim based build system
22:42:25FromDiscord<queersorceress> build system tools are a dime a dozen, choosing the right one for the job is difficult, but i wouldn't just go with one built in the same language on the grounds of knowledge transfer and not learning new systems unless you really want to have a bad time, ahem.
22:43:50FromDiscord<ElegantBeef> Idk to me build systems only need to run a compiler with specific arguments so i'm happy with pretty much any of them
22:44:41FromDiscord<queersorceress> i'm a build and release engineer, it's my job to try to save developers from themselves in picking build systems πŸ™‚
22:45:59FromDiscord<Yjuq> In reply to @queersorceress "i'm a build and": This always scared the hell out of me. I just try to avoid it as much as I can. I was using simple batch / cmd scripts before but it kinda got replaced with lua for me
22:48:36FromDiscord<Yjuq> I mean, compiling sourcecode with make on github. No problem, they deliver mostly some simple mechanism to do this. But hell, if i need to modify something. ARG
22:52:36*a_chou quit (Quit: a_chou)
23:03:16FromDiscord<queersorceress> @Yjuq did we answer all your questions for now?
23:33:23FromDiscord<Yjuq> just doing a creative break - i need to do some daily farming in a video game rofl
23:35:36*zedeus quit (Ping timeout: 256 seconds)
23:42:23*Tanger joined #nim
23:51:26*tane quit (Quit: Leaving)
23:56:52FromDiscord<PizzaFox> what file extension is best for the config format specified in `parsecfg`