<< 12-03-2023 >>

00:00:10FromDiscord<Elegantbeef> I will say i'm fairly certain araq wishes enumerate was the way it was done in the start
00:00:11FromDiscord<Elegantbeef> Though i might be misremembering
00:00:59PMunchBut the change from split returning a seq to being an iterator did change semantics..
00:01:12PMunchI don't know if that was a recent thing though :P
00:01:15FromDiscord<Elegantbeef> What?
00:01:25FromDiscord<Elegantbeef> Iterators have always been prefered
00:01:34FromDiscord<Elegantbeef> There is just an iterator and a func variation
00:01:43FromDiscord<Elegantbeef> Which has always been allowed for reasons i demonstrated
00:01:55FromDiscord<Elegantbeef> The iterator version is less allocatey version of the procedure
00:04:22FromDiscord<Elegantbeef> I suppose if you really didnt want the import you could also do `for i, x in (let coll = input.split(); coll)` 😛
00:04:38FromDiscord<Elegantbeef> inb4 it tries to call the iterator due to a compiler bug
00:08:54FromDiscord<Elegantbeef> A fun thing you might not know pmunch is that `typeof()` by default is in iterator mode
00:09:13FromDiscord<Elegantbeef> https://nim-lang.org/docs/system.html#typeof%2Cuntyped it takes an optional `mode`
00:10:18PMunchHuh, interesting
00:11:04PMunchWhat I meant was that if you have a pair func, then adding an iterator would break your semantics
00:11:17PMunchAnd currently there's no way to get it back..
00:11:18FromDiscord<Elegantbeef> No it doesnt
00:11:39FromDiscord<Elegantbeef> The correct pair is called in the correct scope
00:11:53FromDiscord<Elegantbeef> inside a for loop you call the iterator cause that's literally the point
00:12:11FromDiscord<Elegantbeef> Outside of one you call the procedure cause it's correct
00:12:19PMunchWell yes, but lets say strutils didn't have the iterator version, and I write code like `for i, x in myString.split:`
00:12:22PMunchThis works fine
00:12:36FromDiscord<Elegantbeef> Of course
00:12:40PMunchThen someone comes along and adds the iterator, now my code doesn't work any longer
00:12:57FromDiscord<Elegantbeef> Correct adding a symbol is a possible breaking change
00:13:18PMunchBut I still have my `pairs` iterator, which I would expect to be called
00:13:19FromDiscord<Elegantbeef> This extends beyond just iterators
00:13:48FromDiscord<Elegantbeef> If you add a procedure to the stdlib inside a module it can break user code cause they may have a procedure with the exact signature in another module
00:13:54FromDiscord<Elegantbeef> This is not different to that in anyway
00:15:09FromDiscord<Elegantbeef> You can disambiguate yet another way btw 😄
00:16:56FromDiscord<Elegantbeef> `for i, x in (proc(s: string, spes: char, maxSplit:int = -1): seq[string])(split)(a, 'l'):` is yet another disambiguation
00:17:44FromDiscord<Elegantbeef> It's very much no different to adding a symbol in a module, in that it can break user code due to ambiguity. Atleast as far as i see it
00:18:06PMunchHmm, quick threading question. What would be the easiest way to tell a thread that it should stop?
00:18:10FromDiscord<Elegantbeef> If i add a `proc doThing(i: int)` to the stdlib, it can cause ambiguity if someone else has written `doThing(i: int)` in their own code and import it
00:19:02FromDiscord<Elegantbeef> A a channel or a lock probably
00:19:26PMunchTrue, but at that point you get a nice error message saying that doThing is ambiguous
00:19:39PMunchThis would just cause a wrong number of arguments error, which is super confusing
00:20:02FromDiscord<Elegantbeef> Ah shit this doesnt even mention the iterator type
00:20:06FromDiscord<Elegantbeef> So yes this is awful
00:20:07FromDiscord<Andreas> In reply to @Elegantbeef "Andreas no clue how": {.gensym.} it is - big thx
00:20:27FromDiscord<Elegantbeef> It should be "wrong number of variables for iterator 'iterator type here'"
00:23:26PMunchHmm, is there a way I could get the cursor in the terminal to not blink?
00:23:53FromDiscord<Elegantbeef> `hideCursor`?
00:24:07FromDiscord<Elegantbeef> Think there is a way to disable blinking with a control code otherwise
00:25:33PMunchPerfect
00:27:49FromDiscord<Elegantbeef> `Error: wrong number of for variables for iterator of type 'iterator (s: string, sep: char, maxsplit: int): string{.inline, noSideEffect, gcsafe.}'`
00:27:55FromDiscord<Elegantbeef> Is that what you want you sick prick! 😛
00:28:57PMunchNot really, what I want is for it to just work :P
00:29:31PMunchHmm, now to the hardest part of any project. What should I call this thing?
00:29:57FromDiscord<Elegantbeef> Well just working is wrong
00:30:12PMunchNo it's not
00:30:41PMunchAs I said, I think it's better to not have the compiler error out when it could've just inserted an enumerate there
00:30:49FromDiscord<Elegantbeef> Hey the manual says it https://nim-lang.org/docs/manual.html#iterators-and-the-for-statement-implicit-itemsslashpairs-invocations
00:31:13PMunchI mean that was the whole idea of having `pairs` implicitly called wasn't it? To avoid having to use something like `enumerate` explicitly
00:31:57FromDiscord<Elegantbeef> given items and pairs do not work inside generics, i do not know what to say
00:32:11PMunchWhat?
00:32:27FromDiscord<Elegantbeef> If you do not use explicit `items`/`pairs` it does not mixin the symbol properly
00:32:33FromDiscord<Elegantbeef> Even if you explicitly `mixin pairs, items` it does not
00:33:14FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/issues/19454
00:33:16PMunchWell that just sounds like a bug..
00:33:24FromDiscord<Elegantbeef> It is a bug of course
00:33:40FromDiscord<Elegantbeef> If you want enumerate to be defaulted i guess write an RFC
00:33:59FromDiscord<Elegantbeef> Since it's a change to the language that can have semantic changes 😛
00:37:46FromDiscord<Yepoleb> i thought implementing tar would be easy, it's just the files interleaved with headers, but i was wrong. fucking cursed format with 6 (six) different versions, lots of octal strings and a ton of dumb limitations.
00:38:02FromDiscord<Elegantbeef> What's wrong with zippy?
00:39:08FromDiscord<Yepoleb> i did not know zippy does tar
00:39:14FromDiscord<Yepoleb> because it's called zippy
00:39:26FromDiscord<Elegantbeef> Well it supports tarballs so be merry
00:39:57PMunchtarry
00:40:18PMunchHmm, maybe I should call my little plotter thing Harry
00:40:21PMunchHarry Plotter
00:40:41FromDiscord<Dudugz> I'm using zippy for zlib but it also works with zip and tar files
00:40:42FromDiscord<Elegantbeef> It's a plotter why not Booth?
00:40:52PMunchBooth?
00:40:57FromDiscord<Elegantbeef> Or any other person that plotted something
00:41:09FromDiscord<Elegantbeef> You know the wilkes variety of booth
00:41:14FromDiscord<Elegantbeef> The one that opened lincoln's mind
00:41:24PMunchOoh, that kind of plot :P
00:41:48FromDiscord<Yepoleb> zippy's stream implementation\: `var data = stream.readAll() # TODO: actually treat as a stream`
00:41:52FromDiscord<Dudugz> I implemented my own ipc solution in nim 🙌 interprocess communication here i go
00:41:53FromDiscord<Elegantbeef> Could also call it bruno after the astronomer
00:43:28PMunchI just went with "plotter"
00:43:28PMunchhttps://github.com/PMunch/plotter
00:43:30FromDiscord<Elegantbeef> Releasing a book about the heliocentric model even though the church says no is a sort of plot
00:43:31PMunchIt's getting late :P
00:43:37FromDiscord<Elegantbeef> Wow lame
00:43:42PMunchHaha
00:44:21FromDiscord<Elegantbeef> I'm debating saving my gittagger program, seems somewhat useful, but idk 😄
00:44:42PMunchThat the one which goes through nimble files and creates tags?
00:44:47PMunchSounds useful indeed
00:44:48FromDiscord<Elegantbeef> Yes
00:45:08FromDiscord<Elegantbeef> Well that's all i need to hear to make my 10000th repo of a small one off thing
00:45:13FromDiscord<Yepoleb> [Elegantbeef](https://matrix.to/#/%40elegantbeef%3Amatrix.org)\: check out the loadColours implementation in xresources.nim
00:45:43PMunchWhat's wrong with that?
00:45:48FromDiscord<Yepoleb> you're gonna love this
00:46:05FromDiscord<Elegantbeef> I assume it's the use of the word colours
00:46:07PMunchAnd I like small repos for simple stuff
00:46:10PMunchHaha :P
00:46:32FromDiscord<Yepoleb> you did not use a macro to create the case statement
00:46:32FromDiscord<Elegantbeef> The Canadian in me sees that and just cheers "We're winning against the barbarians"
00:46:49FromDiscord<Elegantbeef> Lol
00:47:47FromDiscord<Elegantbeef> So grafiti is a fantastic name for a git tagger right? 😄
00:48:20FromDiscord<Elegantbeef> gitfiti is too on the nose
00:49:05FromDiscord<treeform> Its ends with a y/ei sound I approve
00:49:25FromDiscord<Yepoleb> I don't get it 😢
00:50:06FromDiscord<ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4qAs
00:50:37FromDiscord<Yepoleb> Good morning ringabout
00:51:07FromDiscord<ringabout> Hello, Yepoleb
00:54:38FromDiscord<Elegantbeef> Grafiti is also called tagging
00:55:01FromDiscord<Elegantbeef> Yea ringabout that bit me in the ass with constructor 😄
00:55:30FromDiscord<Elegantbeef> Well `compileTime` did
00:55:40FromDiscord<Elegantbeef> I didnt try both gobal and compiletime i think
00:55:47FromDiscord<Elegantbeef> Might be related now i do not recall
00:56:51FromDiscord<ringabout> Yeah, https://github.com/nim-lang/Nim/pull/21351/files#diff-0503eb32aacc948b77b32dadc386f33fa1c89ecb89d4490cc71f7e0f9db3deca causes the regression, I'm fixing it.
00:57:53FromDiscord<Andreas> Is there some `{magic..}` that allows to make a closure over a `proc someProc() {.cdecl.}` ?
00:58:08FromDiscord<Andreas> (edit) "`{magic..}`" => "`{.magic.}`"
00:59:19FromDiscord<Yepoleb> Thank you 😌
01:01:52PMunchWelp, I should head off to bed.
01:02:16PMunchHave gotten about 0% done on the project I intended to work on today. But at least I now have a small plotter thingy :P
01:03:12PMunchWell, that's not entirely true. I did get a small revelation for my project. Just haven't tried implementing it yet
01:05:18*rez quit (Ping timeout: 255 seconds)
01:15:33FromDiscord<Elegantbeef> Just call the proc inside a proc↵(@Andreas)
01:15:46FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4qAx
01:15:58FromDiscord<Elegantbeef> Nim only creates closures from nimcall
01:16:08FromDiscord<Elegantbeef> I do have a PR that would enable it for all procs but I got no help and cannot reason the issue
01:19:06FromDiscord<Andreas> sent a code paste, see https://play.nim-lang.org/#ix=4qAz
01:20:54FromDiscord<Elegantbeef> No you cannot have a closure that is a cdecl
01:21:03FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1084284891031666789/image.png
01:21:07FromDiscord<Elegantbeef> Damn graffitiception
01:22:02FromDiscord<Andreas> In reply to @Elegantbeef "image.png": zep / got it - macro does the trick
01:22:07FromDiscord<Elegantbeef> Uhh
01:22:08PMunchHaha, nice
01:22:17FromDiscord<Elegantbeef> A closure cannot be converted to a cdecl procedure safely
01:22:31FromDiscord<Elegantbeef> A closure has a pointer to the environment so unless you use `rawProc` and `rawEnv` you cannot pass it to a cdecl
01:23:41FromDiscord<Andreas> In reply to @Elegantbeef "A closure has a": i nnede to close over a var - the macro writes the var into `someProc(){.cdecl.}` - it works
01:23:48FromDiscord<Elegantbeef> I guess i should make the automated message better for graffiti and use the commit message, could also gather all the commit messages between two commits, but given that's just the wrong way to semver a project meh
01:23:57FromDiscord<Andreas> (edit) "nnede" => "neede"
01:24:01FromDiscord<Elegantbeef> What you're doing sounds wrong
01:24:04FromDiscord<Elegantbeef> So i'll just warn you
01:24:15FromDiscord<Elegantbeef> It might work but it's not proper
01:25:23*PMunch quit (Quit: leaving)
01:27:11FromDiscord<exelotl> yeah that doesn't sound like it should work 😅
01:28:19FromDiscord<Andreas> sent a code paste, see https://play.nim-lang.org/#ix=4qAB
01:28:46FromDiscord<Elegantbeef> Where's the closure?
01:29:32FromDiscord<Andreas> In reply to @Elegantbeef "Where's the closure?": i need `cls`=classname inside the finalizer. A closure did not work, so i made a macro..
01:29:42FromDiscord<Elegantbeef> Well yea this is wrong then
01:29:57FromDiscord<Elegantbeef> if `cls` is not a constant this is going to do bad things when you exit scope
01:29:58FromDiscord<Andreas> In reply to @Elegantbeef "Well yea this is": godd, why;s that ?
01:30:17FromDiscord<Andreas> (edit) "godd, why;s" => "good, why's" | "good, why'sthat ? ... " added "whats wrong"
01:30:41FromDiscord<Elegantbeef> Doing an illegal capture, will only result in a dangling pointer or a memory leak
01:31:05FromDiscord<Elegantbeef> So either `cls` will not be what you expect in future stack frames, or it will never free due to being permanently captured
01:31:21FromDiscord<Andreas> In reply to @Elegantbeef "Doing an illegal capture,": wait a sec "illegal capture"- its not in the docs ?
01:31:35FromDiscord<Elegantbeef> Well cause the compiler doesnt allow it typically
01:31:46FromDiscord<Elegantbeef> Using a macro you've bypassed it's check somehow
01:32:28FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4qAD
01:32:34FromDiscord<Andreas> ok, thanks ic the problem.. `classId:int` is small ?
01:32:37FromDiscord<Elegantbeef> Which means it either is pointing to the original or is brought to the heap and never freed
01:33:00FromDiscord<Elegantbeef> Do you know what a closure is?
01:33:39FromDiscord<Andreas> In reply to @Elegantbeef "Do you know what": yes, it's what i tried first and the compiler said "NO"
01:34:04FromDiscord<Elegantbeef> Not do you know how to write them, do you know what they actually are
01:34:54FromDiscord<Andreas> in that case, i can create a fn-scope which carries the `cls`-param that the C-API has forgotten..
01:35:50FromDiscord<Andreas> sent a code paste, see https://play.nim-lang.org/#ix=4qAG
01:35:56FromDiscord<Elegantbeef> Yes with a global variable it'd work
01:36:00FromDiscord<Elegantbeef> Since that's not a capture
01:36:35FromDiscord<Andreas> In reply to @Elegantbeef "Since that's not a": would you prefer that ? c'mon it just a `int` 🙂
01:36:52FromDiscord<Elegantbeef> It's not whether i'd prefer it
01:36:56FromDiscord<Elegantbeef> It's whether you want to fight bugs
01:39:25FromDiscord<Andreas> In reply to @Elegantbeef "It's whether you want": ic, well this macro won't be called often, just once for per modul. I'll do some more testing later. Maybe i find another way to solve it..
01:39:39FromDiscord<Elegantbeef> Well if you have any odd behaviour look at the macro
01:39:53FromDiscord<Elegantbeef> Cause closures are not just different named procedures, they actually operate differently
01:40:28FromDiscord<Elegantbeef> They raise variables they use up to the heap to keep them alive so future calling will not error
01:41:11FromDiscord<Andreas> In reply to @Elegantbeef "Well if you have": The VM i'm working with is quite picky about leaks. It's a amazing experience when all those nim-safeties are gone.. quickjs screams when smth. i not freed properly
01:42:04FromDiscord<Andreas> (edit) "i" => "was"
01:43:29FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=4qAH
01:43:35FromDiscord<Elegantbeef> This demonstrates the behaviour you may run into
01:44:01FromDiscord<Andreas> hmm, i could try the JS-way and ask for `constructor.name` - that would do, too
01:53:45FromDiscord<Andreas> In reply to @Elegantbeef "https://play.nim-lang.org/#ix=4qAH": that is sweet example - i changed the `ptr` in BadClosure to a `int` which works but then the captured `int`would never be freed ? so valgrind should notice that, maybe ?
01:54:31FromDiscord<Elegantbeef> If you change that to `let i = i` Nim raises the `i` to the heap and frees it automatically when it needs to
01:55:22FromDiscord<Andreas> In reply to @Elegantbeef "If you change that": yep, that sounds good to me ..
01:55:34FromDiscord<Elegantbeef> But that only works if it's a `{.closure.}`
01:55:40FromDiscord<Elegantbeef> If it's a `{.cdecl.}` it does not work that way
01:55:55FromDiscord<Elegantbeef> if you change it to a cdecl it errors
01:57:30FromDiscord<Andreas> ik, i'll try the `constructor.name` thing, since i provide the class and the finalizer, i can be sure that `constructor.name` will always be avail.. which is not safe for other JS-types..
01:59:54FromDiscord<Andreas> But the `cls`-value in the macro, that is 'burned-into' the code, statically - there is no problem about freeing things ?
02:00:36FromDiscord<Andreas> (edit) "But the `cls`-value in the macro, that is 'burned-into' the code, statically - there is no problem about freeing things ? ... " added "Besides that the code-size grows a bit with every invokation..."
02:01:23FromDiscord<Elegantbeef> No clue what cls is
02:01:25FromDiscord<Elegantbeef> Is it a constant?
02:01:29FromDiscord<Elegantbeef> Is it a runtime value?
02:07:37FromDiscord<Andreas> In reply to @Elegantbeef "Is it a runtime": it's the name of a `class:string` that is written in nim and gets passed to the JS-VM. The VM allocates for the nim-type and triggers the finalizer-cb when it wants to destroy a instance of the nim-type. I wrapped nim's InstSet for testing. So it happens in a critical spot...
02:08:01FromDiscord<Elegantbeef> If it's a runtime value it's also a possible issue
02:10:39FromDiscord<Andreas> In reply to @Elegantbeef "If it's a runtime": i'll take care and i'll mind your words when i see garbled data from such opaque-types.. greets and thx
03:11:22*derpydoo joined #nim
03:24:19*Xenon joined #nim
03:24:51*Xenon quit (Client Quit)
04:01:57*adigitoleo quit (*.net *.split)
04:02:08*adigitoleo joined #nim
04:02:41*joast quit (*.net *.split)
04:02:42*derpydoo quit (*.net *.split)
04:02:42*_________ quit (*.net *.split)
04:02:42*arkurious quit (*.net *.split)
04:02:42*ehmry quit (*.net *.split)
04:02:42*nyeaa492842301 quit (*.net *.split)
04:02:42*Jjp137 quit (*.net *.split)
04:02:43*FromDiscord quit (*.net *.split)
04:02:43*Goodbye_Vincent quit (*.net *.split)
04:02:43*lumidify quit (*.net *.split)
04:02:44*cm quit (*.net *.split)
04:02:44*cornfeedhobo quit (*.net *.split)
04:02:44*madprops quit (*.net *.split)
04:02:44*Ekho quit (*.net *.split)
04:02:45*krydos quit (*.net *.split)
04:02:45*Mi quit (*.net *.split)
04:02:45*dza quit (*.net *.split)
04:02:46*acidsys quit (*.net *.split)
04:02:46*om3ga quit (*.net *.split)
04:02:46*fallback quit (*.net *.split)
04:02:47*noeontheend quit (*.net *.split)
04:02:47*henrytill quit (*.net *.split)
04:02:47*mronetwo quit (*.net *.split)
04:02:47*leastrio quit (*.net *.split)
04:02:47*syl quit (*.net *.split)
04:02:47*GreaseMonkey quit (*.net *.split)
04:02:48*deadmarshal_ quit (*.net *.split)
04:02:48*Evolver quit (*.net *.split)
04:02:48*blackbeard420 quit (*.net *.split)
04:03:15*derpydoo joined #nim
04:03:15*joast joined #nim
04:03:15*fallback joined #nim
04:03:15*_________ joined #nim
04:03:15*henrytill joined #nim
04:03:15*noeontheend joined #nim
04:03:15*leastrio joined #nim
04:03:15*mronetwo joined #nim
04:03:15*arkurious joined #nim
04:03:15*Mi joined #nim
04:03:15*ehmry joined #nim
04:03:15*nyeaa492842301 joined #nim
04:03:15*Jjp137 joined #nim
04:03:15*FromDiscord joined #nim
04:03:15*Goodbye_Vincent joined #nim
04:03:15*lumidify joined #nim
04:03:15*cm joined #nim
04:03:15*krydos joined #nim
04:03:15*madprops joined #nim
04:03:15*Ekho joined #nim
04:03:15*cornfeedhobo joined #nim
04:03:15*syl joined #nim
04:03:15*dza joined #nim
04:03:15*acidsys joined #nim
04:03:15*GreaseMonkey joined #nim
04:03:15*deadmarshal_ joined #nim
04:03:15*Evolver joined #nim
04:03:15*om3ga joined #nim
04:03:15*blackbeard420 joined #nim
04:03:39*jmcantrell quit (*.net *.split)
04:03:47FromDiscord<Iliketwertles> what does isNil do? i dont know that Nil means
04:03:56FromDiscord<Takemichi Hanagaki> What is the main difference between ARC and Borrow checker?
04:04:14FromDiscord<Takemichi Hanagaki> (edit)
04:06:04FromDiscord<Elegantbeef> It's like asking the difference between a fridge and a blender
04:06:12FromDiscord<Elegantbeef> They're both related to cooking, but they're two vastly different things
04:06:42*Phil[m]123 quit (Ping timeout: 252 seconds)
04:06:44*frenchboy[m] quit (Ping timeout: 246 seconds)
04:09:06FromDiscord<Elegantbeef> A borrow checker ensures you do not have unsafe memory, arc places destructor calls inside the code
04:09:08*azimut quit (*.net *.split)
04:09:13*azimut joined #nim
04:09:15*euantorano_ quit (*.net *.split)
04:09:15*LyndsySimon quit (*.net *.split)
04:09:17*def- quit (*.net *.split)
04:09:17*Zevv_ quit (*.net *.split)
04:09:17*lain quit (*.net *.split)
04:09:18*nisstyre quit (*.net *.split)
04:09:18*arkanoid quit (*.net *.split)
04:09:18*gshumway quit (*.net *.split)
04:09:32*euantorano_ joined #nim
04:09:32*LyndsySimon joined #nim
04:09:35*def- joined #nim
04:09:35*Zevv_ joined #nim
04:09:35*lain joined #nim
04:09:35*nisstyre joined #nim
04:09:35*arkanoid joined #nim
04:09:35*gshumway joined #nim
04:09:41*arkanoid quit (Max SendQ exceeded)
04:10:12FromDiscord<Iliketwertles> does anyone know if theres a sixel(image in terminal) thing for nim
04:10:21FromDiscord<Iliketwertles> didnt find anything on a light google search
04:10:28*arkanoid joined #nim
04:10:41*xet7 quit (*.net *.split)
04:10:41*oddish quit (*.net *.split)
04:10:49*arkanoid quit (*.net *.split)
04:10:49*termer quit (*.net *.split)
04:10:49*m5zs7k quit (*.net *.split)
04:10:49*dv^_^ quit (*.net *.split)
04:10:50*notchris quit (*.net *.split)
04:10:53*Batzy quit (*.net *.split)
04:10:53*cnx quit (*.net *.split)
04:10:53*oz quit (*.net *.split)
04:10:54*xet7 joined #nim
04:10:54*oddish joined #nim
04:10:54*xaltsc quit (*.net *.split)
04:10:55*koltrast quit (*.net *.split)
04:10:55*alice quit (*.net *.split)
04:10:55*crem quit (*.net *.split)
04:10:55*tk quit (*.net *.split)
04:10:55*robertmeta quit (*.net *.split)
04:10:55*ormiret quit (*.net *.split)
04:10:56*estiquelapice quit (*.net *.split)
04:10:57*Onionhammer quit (*.net *.split)
04:10:57*hernan quit (*.net *.split)
04:10:57*adium quit (*.net *.split)
04:10:57*hexeme_ quit (*.net *.split)
04:10:58*oprypin quit (*.net *.split)
04:10:59*Mister_Magister quit (*.net *.split)
04:10:59*redj quit (*.net *.split)
04:11:01*arkanoid joined #nim
04:11:01*termer joined #nim
04:11:01*m5zs7k joined #nim
04:11:01*dv^_^ joined #nim
04:11:01*notchris joined #nim
04:11:03*Batzy joined #nim
04:11:03*cnx joined #nim
04:11:03*oz joined #nim
04:11:06*cyraxjoe quit (*.net *.split)
04:11:07*Amun-Ra quit (*.net *.split)
04:11:07*mal``` quit (*.net *.split)
04:11:07*attah quit (*.net *.split)
04:11:07*ixmpp quit (*.net *.split)
04:11:07*via__ quit (*.net *.split)
04:11:08*ttkap quit (*.net *.split)
04:11:08*oisota quit (*.net *.split)
04:11:09*xaltsc joined #nim
04:11:09*koltrast joined #nim
04:11:09*alice joined #nim
04:11:09*crem joined #nim
04:11:09*tk joined #nim
04:11:09*robertmeta joined #nim
04:11:09*ormiret joined #nim
04:11:11*arkanoid quit (Max SendQ exceeded)
04:11:11*m5zs7k quit (Max SendQ exceeded)
04:11:12*oprypin joined #nim
04:11:12*Mister_Magister joined #nim
04:11:12*redj joined #nim
04:11:14*estiquelapice joined #nim
04:11:14*hernan joined #nim
04:11:14*Onionhammer joined #nim
04:11:14*adium joined #nim
04:11:14*hexeme_ joined #nim
04:11:17*Batzy quit (Max SendQ exceeded)
04:11:19*alice quit (Max SendQ exceeded)
04:11:19*tk quit (Max SendQ exceeded)
04:11:21*pbsds quit (*.net *.split)
04:11:22*onetwo3 quit (*.net *.split)
04:11:22*anddam quit (*.net *.split)
04:11:22*NimEventer quit (*.net *.split)
04:11:22*tanami quit (*.net *.split)
04:11:22*genpaku quit (*.net *.split)
04:11:23*mahlon quit (*.net *.split)
04:11:23*systemdsucks quit (*.net *.split)
04:11:23*estiquelapice quit (*.net *.split)
04:11:23*Onionhammer quit (*.net *.split)
04:11:23*hernan quit (*.net *.split)
04:11:23*adium quit (*.net *.split)
04:11:23*hexeme_ quit (*.net *.split)
04:11:24*oprypin quit (*.net *.split)
04:11:24*Mister_Magister quit (*.net *.split)
04:11:24*redj quit (*.net *.split)
04:11:24*xaltsc quit (*.net *.split)
04:11:24*koltrast quit (*.net *.split)
04:11:24*crem quit (*.net *.split)
04:11:24*robertmeta quit (*.net *.split)
04:11:24*ormiret quit (*.net *.split)
04:11:25*cnx quit (*.net *.split)
04:11:25*oz quit (*.net *.split)
04:11:25*termer quit (*.net *.split)
04:11:25*dv^_^ quit (*.net *.split)
04:11:26*notchris quit (*.net *.split)
04:11:26*xet7 quit (*.net *.split)
04:11:26*oddish quit (*.net *.split)
04:11:26*euantorano_ quit (*.net *.split)
04:11:26*LyndsySimon quit (*.net *.split)
04:11:27*def- quit (*.net *.split)
04:11:27*Zevv_ quit (*.net *.split)
04:11:27*lain quit (*.net *.split)
04:11:27*nisstyre quit (*.net *.split)
04:11:27*gshumway quit (*.net *.split)
04:11:27*azimut quit (*.net *.split)
04:11:29*joast quit (*.net *.split)
04:11:29*derpydoo quit (*.net *.split)
04:11:29*_________ quit (*.net *.split)
04:11:29*arkurious quit (*.net *.split)
04:11:30*ehmry quit (*.net *.split)
04:11:30*nyeaa492842301 quit (*.net *.split)
04:11:30*Jjp137 quit (*.net *.split)
04:11:30*FromDiscord quit (*.net *.split)
04:11:30*Goodbye_Vincent quit (*.net *.split)
04:11:31*lumidify quit (*.net *.split)
04:11:31*cm quit (*.net *.split)
04:11:31*cornfeedhobo quit (*.net *.split)
04:11:31*madprops quit (*.net *.split)
04:11:31*Ekho quit (*.net *.split)
04:11:32*krydos quit (*.net *.split)
04:11:32*Mi quit (*.net *.split)
04:11:33*dza quit (*.net *.split)
04:11:33*acidsys quit (*.net *.split)
04:11:33*om3ga quit (*.net *.split)
04:11:34*fallback quit (*.net *.split)
04:11:34*noeontheend quit (*.net *.split)
04:11:34*henrytill quit (*.net *.split)
04:11:34*mronetwo quit (*.net *.split)
04:11:34*leastrio quit (*.net *.split)
04:11:34*syl quit (*.net *.split)
04:11:35*GreaseMonkey quit (*.net *.split)
04:11:35*deadmarshal_ quit (*.net *.split)
04:11:35*Evolver quit (*.net *.split)
04:11:35*blackbeard420 quit (*.net *.split)
04:11:36*adigitoleo quit (*.net *.split)
04:11:36*ChanServ quit (*.net *.split)
04:12:03*m5zs7k_ joined #nim
04:12:03*tk joined #nim
04:12:03*hexeme_ joined #nim
04:12:03*adium joined #nim
04:12:03*Onionhammer joined #nim
04:12:03*hernan joined #nim
04:12:03*estiquelapice joined #nim
04:12:03*redj joined #nim
04:12:03*Mister_Magister joined #nim
04:12:03*oprypin joined #nim
04:12:03*ormiret joined #nim
04:12:03*robertmeta joined #nim
04:12:03*crem joined #nim
04:12:03*koltrast joined #nim
04:12:03*xaltsc joined #nim
04:12:03*oz joined #nim
04:12:03*cnx joined #nim
04:12:03*notchris joined #nim
04:12:03*dv^_^ joined #nim
04:12:03*termer joined #nim
04:12:03*oddish joined #nim
04:12:03*xet7 joined #nim
04:12:03*gshumway joined #nim
04:12:03*nisstyre joined #nim
04:12:03*lain joined #nim
04:12:03*Zevv_ joined #nim
04:12:03*def- joined #nim
04:12:03*LyndsySimon joined #nim
04:12:03*euantorano_ joined #nim
04:12:03*azimut joined #nim
04:12:03*blackbeard420 joined #nim
04:12:03*om3ga joined #nim
04:12:03*Evolver joined #nim
04:12:03*deadmarshal_ joined #nim
04:12:03*GreaseMonkey joined #nim
04:12:03*acidsys joined #nim
04:12:03*dza joined #nim
04:12:03*syl joined #nim
04:12:03*cornfeedhobo joined #nim
04:12:03*Ekho joined #nim
04:12:03*madprops joined #nim
04:12:03*krydos joined #nim
04:12:03*cm joined #nim
04:12:03*lumidify joined #nim
04:12:03*Goodbye_Vincent joined #nim
04:12:03*FromDiscord joined #nim
04:12:03*Jjp137 joined #nim
04:12:03*nyeaa492842301 joined #nim
04:12:03*ehmry joined #nim
04:12:03*Mi joined #nim
04:12:03*arkurious joined #nim
04:12:03*mronetwo joined #nim
04:12:03*leastrio joined #nim
04:12:03*noeontheend joined #nim
04:12:03*henrytill joined #nim
04:12:03*_________ joined #nim
04:12:03*fallback joined #nim
04:12:03*joast joined #nim
04:12:03*derpydoo joined #nim
04:12:03*adigitoleo joined #nim
04:12:03*pbsds joined #nim
04:12:03*onetwo3 joined #nim
04:12:03*anddam joined #nim
04:12:03*NimEventer joined #nim
04:12:03*tanami joined #nim
04:12:03*genpaku joined #nim
04:12:03*mahlon joined #nim
04:12:03*systemdsucks joined #nim
04:12:24*alicetries joined #nim
04:12:24*alicetries is now known as alice
04:12:24*azimut quit (Ping timeout: 255 seconds)
04:12:26*arkanoid joined #nim
04:12:26*Lord_Nightmare quit (Excess Flood)
04:12:50*Lord_Nightmare2 joined #nim
04:12:59*Batzy joined #nim
04:13:58FromDiscord<Iliketwertles> or is there something else that does something similar?
04:15:19*azimut joined #nim
04:15:45*Lord_Nightmare2 is now known as Lord_Nightmare
04:16:55*Phil[m]123 joined #nim
04:17:29*cyraxjoe joined #nim
04:17:29*Amun-Ra joined #nim
04:17:29*mal``` joined #nim
04:17:29*ixmpp joined #nim
04:17:29*attah joined #nim
04:17:29*via__ joined #nim
04:17:29*ttkap joined #nim
04:17:29*oisota joined #nim
04:20:14*m5zs7k_ is now known as m5zs7k
04:20:49*pbsds quit (*.net *.split)
04:20:49*onetwo3 quit (*.net *.split)
04:20:49*anddam quit (*.net *.split)
04:20:50*NimEventer quit (*.net *.split)
04:20:50*tanami quit (*.net *.split)
04:20:50*genpaku quit (*.net *.split)
04:20:50*mahlon quit (*.net *.split)
04:20:50*systemdsucks quit (*.net *.split)
04:22:51*pbsds joined #nim
04:22:51*onetwo3 joined #nim
04:22:51*anddam joined #nim
04:22:51*NimEventer joined #nim
04:22:51*tanami joined #nim
04:22:51*genpaku joined #nim
04:22:51*mahlon joined #nim
04:22:51*systemdsucks joined #nim
04:24:59FromDiscord<Elegantbeef> If you use kitty there is tpix
04:29:24FromDiscord<Iliketwertles> im not sadly, might just have to use ascii lol
04:29:37FromDiscord<Iliketwertles> kitty is good tho but i like foot better
04:34:06*cyraxjoe quit (*.net *.split)
04:34:06*Amun-Ra quit (*.net *.split)
04:34:06*mal``` quit (*.net *.split)
04:34:07*attah quit (*.net *.split)
04:34:07*ixmpp quit (*.net *.split)
04:34:07*via__ quit (*.net *.split)
04:34:07*ttkap quit (*.net *.split)
04:34:07*oisota quit (*.net *.split)
04:36:01*cyraxjoe joined #nim
04:36:01*Amun-Ra joined #nim
04:36:01*mal``` joined #nim
04:36:01*ixmpp joined #nim
04:36:01*attah joined #nim
04:36:01*via__ joined #nim
04:36:01*ttkap joined #nim
04:36:01*oisota joined #nim
05:07:34*arkurious quit (Quit: Leaving)
05:14:35*azimut quit (Ping timeout: 255 seconds)
05:43:12*jmcantrell joined #nim
05:46:13*rmt joined #nim
05:51:49*derpydoo quit (Ping timeout: 276 seconds)
06:12:49*frenchboy[m] joined #nim
06:39:40*derpydoo joined #nim
07:50:42*Notxor joined #nim
08:30:51FromDiscord<planetis> sent a code paste, see https://paste.rs/eP6
08:32:24FromDiscord<planetis> it's the only thing that can reliably work, besides mangling the names
08:32:54FromDiscord<planetis> wait a sec...
08:33:42FromDiscord<planetis> no I need to mangle the names
08:33:44FromDiscord<planetis> fuck
08:34:47FromDiscord<planetis> windows sucks
08:40:08FromDiscord<planetis> that would mean maintaining a fork of raylib with mangled names ffs
08:43:06*azimut joined #nim
08:47:26*azimut quit (Ping timeout: 255 seconds)
09:16:07*azimut joined #nim
09:39:49FromDiscord<System64 ~ Flandre Scarlet> In reply to @planetis "no I need to": what does name mangling means?
09:41:41FromDiscord<Elegantbeef> Mutate the name so it does not clash with others
09:44:53FromDiscord<planetis> I think emitting a typedef might work as well↵typedef struct Rectangle RaylibRectangle;
09:54:12NimEventerNew question by Quonux: Nim: run external program from Nim, see https://stackoverflow.com/questions/75712315/nim-run-external-program-from-nim
09:55:47FromDiscord<Elegantbeef> Phil must've lost access to his SO account 😛
10:08:08FromDiscord<Phil> I resent that statement, there's way more people than just me that write SO questions 😛
10:16:32*derpydoo quit (Read error: Connection reset by peer)
10:29:16FromDiscord<planetis> In reply to @planetis "I think emitting a": nope it still conflicts regardless...
10:34:57FromDiscord<System64 ~ Flandre Scarlet> In reply to @planetis "nope it still conflicts": So you'll have to mangle
10:53:51FromDiscord<planetis> except if I do something really hacky, undef these macros in the "typesection" and include raylib right after
10:55:09FromDiscord<planetis> but it needs an emit for every nim file importing naylib that's inconvenient
11:38:26FromDiscord<Phil> Actually, are there other approaches than "Have one gigantic piece of global state all your GUI can access" ?
11:38:34FromDiscord<Phil> (edit) "?" => " for frontends?"
11:39:00FromDiscord<Phil> Mostly asking because that appears to have been the approach everywhere, be it webdev or native.
12:04:53FromDiscord<planetis> In reply to @Isofruit "Actually, are there other": you mean in general, I am sure there are, or on a specific nim library?
12:05:14FromDiscord<Phil> In general, just pondering general setups in terms of architecture that are possible
12:05:38FromDiscord<Phil> I know owlkettle e.g. goes for the "one global state" approach for sure, or rather with how it is set up it encourages that approach
12:05:56FromDiscord<planetis> recently there was an offtopic discussion about Model-View-Update https://thomasbandt.com/model-view-update
12:26:10FromDiscord<Hourglass [She/Her]> How do I force nimble to install a dependency even if nothing has changed?
12:33:13FromDiscord<Gumbercules> Model view anything is garbage
12:33:36FromDiscord<Gumbercules> Just separate code from data. Done
12:33:46FromDiscord<Gumbercules> Anything else is over engineering
12:35:50*PMunch joined #nim
12:47:17*azimut quit (Ping timeout: 255 seconds)
12:48:14FromDiscord<Takemichi Hanagaki> In reply to @Elegantbeef "A borrow checker ensures": Got it!
12:49:12*azimut joined #nim
13:12:32*madprops quit (Ping timeout: 248 seconds)
13:13:02*tinystoat joined #nim
13:13:50*tinytoast quit (Read error: Connection reset by peer)
13:16:14*madprops joined #nim
13:16:14*madprops quit (Changing host)
13:16:14*madprops joined #nim
14:25:23*azimut quit (Ping timeout: 255 seconds)
14:32:32FromDiscord<Ayy Lmao> How do I manually call nim's initialization code? I need to go through a custom entry point.
14:34:29Amun-Rafrom C? NimMain()
14:38:29FromDiscord<Ayy Lmao> Ok so I would need to figure out how to call `NimMain()` from my function then. I'm building a dll that has a struct with a bunch of functions as an entry point.
14:41:24Amun-Rasomething like this https://dpaste.org/xnynB
14:41:57FromDiscord<punch_cake> is there a better package manager for nim?
14:42:20Amun-Rabetter than nimble? I'm not aware of any
14:45:33FromDiscord<hotdog> punch_cake two alternatives that I’ve heard of - https://forum.nim-lang.org/t/9748 https://github.com/disruptek/nimph . Haven’t used either, don’t know if they’re any better
14:46:01FromDiscord<punch_cake> alright, thanks!
14:48:38PMunch@punch_cake, what do you miss in Nimble?
15:07:51FromDiscord<punch_cake> that its dog shit↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
15:08:24FromDiscord<punch_cake> it sometimes fails to install stuff for no reason but when i run it again it magically works
15:14:12*azimut joined #nim
15:16:05*arkurious joined #nim
15:53:00*derpydoo joined #nim
15:56:22FromDiscord<RMT> @Ayy Lmao , how is it going with your CLAP plugin?
15:58:46FromDiscord<RMT> In reply to @punch_cake "it sometimes fails to": That sounds like an annoying bug (that I haven't hit yet on Linux) .. it might possibly not even be in nimble. Have you filed an issue?
16:00:59FromDiscord<hotdog> In reply to @punch_cake "it sometimes fails to": I haven’t noticed that. A specific package or just anything?
16:14:25FromDiscord<Ayy Lmao> In reply to @Garf404 "<@277645179115143178> , how is": Well I figured out how to compile an example in C and get my DAW to detect it. Now I am trying to compile from Nim but it is complicated. Having a struct as an entry point seems to be a pretty rare case and the `exportc` pragma isn't working for me, so I am trying to do a bunch of emit pragma shenanigans.
16:40:36FromDiscord<RMT> sent a long message, see http://ix.io/4qE8
16:47:24FromDiscord<Ayy Lmao> In reply to @Garf404 "Ok. I look": I'm kind of just dipping my toes at the moment so I can't promise anything will come of it. I'll post it somewhere and let you know if I get anything up and running.
16:48:50FromDiscord<Livid> sent a code paste, see https://play.nim-lang.org/#ix=4qEc
16:53:51FromDiscord<Rika> @firasuke most likely all DE/plugins use the standard nim formatter `nimpretty`
16:53:52FromDiscord<firasuke> The vscode nim plugin isn't formatting constants with the same style, some have a space between the name and and some don't. What development environment or text editor do you recommend with an official nim formatter/tooling? https://media.discordapp.net/attachments/371759389889003532/1084519640543273030/image.png
16:54:06FromDiscord<firasuke> In reply to @Rika "<@248208053952970752> most likely all": I see
16:54:16FromDiscord<firasuke> is this a default behavior in nim?
16:54:32FromDiscord<Rika> probably just not an implemented format rule in nimprett
16:54:33FromDiscord<Rika> (edit) "nimprett" => "nimpretty"
16:55:18FromDiscord<firasuke> hmmmm should I open a pr? or can I define a custom rule myself?
16:56:31FromDiscord<Rika> pr, prolly
16:58:16FromDiscord<firasuke> I see thanks
16:58:21FromDiscord<firasuke> (edit) "see" => "see,"
16:58:52FromDiscord<Rika> i dont know where the code lives, prolly the same as the nim compiler
17:11:38FromDiscord<ieltan> sent a code paste, see https://paste.rs/TN9
17:12:04FromDiscord<ieltan> the compilers says `selector must be of an ordinal type, float or string`
17:15:19FromDiscord<Rika> no, iterate over guildflags and have the case be over the iteration value
17:15:50FromDiscord<ieltan> Yeah i thought about this too but it would have been nice if there was a cleaner syntax
17:15:51FromDiscord<Rika> ofc you dont need the `noFlag` any more in that case
17:16:02FromDiscord<Rika> i do not see how the case would be cleaner syntax
17:16:10FromDiscord<Rika> it would be more obscure syntax i would say
17:17:38FromDiscord<ieltan> In reply to @Rika "ofc you dont need": `noFlag` is just to demonstrate `guildFlags` may not have all the flags but that was redundant ig
17:17:45FromDiscord<ieltan> thanks!
17:18:02FromDiscord<Rika> cases can have an `else:`
17:43:21*rmt quit (Ping timeout: 265 seconds)
17:48:42FromDiscord<Odi> Hello my gorgeous friends on the nimternet 🖖↵Can anyone point me in the direction on how i can convert an sequence of hex values into and image like for example this python ↵Say i have a whole sequence with all the hex values, is there a simple way to write this out as a jpeg or png file=)↵Thanks in advance, and pleas mind you i dont try to be lazy🥹Thanks in advance=) https://media.discordapp.net/attachments/371759389889003532/108
17:54:36FromDiscord<Hourglass [She/Her]> How would I force nimble to install a project? Does it do that no matter what? Or
18:00:14*derpydoo quit (Ping timeout: 250 seconds)
18:09:38FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4qEF
18:22:42Amun-Rawhat do you mean "force"?
18:57:56FromDiscord<firasuke> for writing tests in nim, what's the standard way? unit tests or testament?
19:06:10PMunchEither
19:06:37PMunchWell I guess unittests might be more used since it's the default for nimble
19:06:47FromDiscord<Phil> TBh I myself use unittests because it's easier.↵HOWEVER, if you want to do it right which you seem to want to do given that you're even willing to write tests, you're likely better off with testament.↵The main reason you'd want to play with it afaik is testing with multiple compilation-flags
19:07:12FromDiscord<Phil> (edit) "compilation-flags" => "compilation-flag-combinations"
19:09:17FromDiscord<Phil> Assuming you run github workflows to run your tests in the end, I also recommend setting up your workflow so you can run your test-suite for multiple different nim versions (assuming it is a library)
19:16:22FromDiscord<firasuke> oh ok
19:16:26FromDiscord<Hourglass [She/Her]> Tempted to work on Nimpiler again
19:17:11FromDiscord<Nilts> what is that?
19:17:26*azimut quit (Ping timeout: 255 seconds)
19:17:46FromDiscord<Hourglass [She/Her]> Was my (failed/neglected) attempt to compile Nim to JVM bytecode
19:18:07FromDiscord<Hourglass [She/Her]> (Well, to an assembler language but that is irrelevant lol)
19:20:33PMunch@firasuke, there's even balls
19:20:38FromDiscord<Nilts> I mean, the compiler is not meant to be extended on. So it would be difficult
19:20:56FromDiscord<firasuke> In reply to @PMunch "<@248208053952970752>, there's even balls": Dare I ask what is that xD?
19:21:05FromDiscord<Hourglass [She/Her]> In reply to @not logged in "I mean, the compiler": definitely but I had some (admittedly crap) code generation working
19:21:23FromDiscord<Phil> In reply to @firasuke "oh ok": Regarding github workflows I'm happy to help, assuming you want it.↵Way back when I had no clue about them and it was a major pain to put them together
19:21:34FromDiscord<firasuke> oh ok thanks a bunch
19:21:42PMunchhttps://github.com/disruptek/balls
19:22:01FromDiscord<firasuke> I'm porting my Rust application to Nim, so far so good, and I reached the point where I need to port the tests as well
19:22:27PMunchOh cool, what kind of application?
19:22:33PMunchAnd what prompted the port?
19:22:43FromDiscord<firasuke> It's a package manager for a Linux distribution I am making
19:22:51FromDiscord<firasuke> In reply to @PMunch "And what prompted the": complexity is a cost
19:23:41FromDiscord<firasuke> so I have my own cross compilation toolchain that builds against musl libc, I use this toolchain to cross compile software for the linux distribution I am developing
19:24:18FromDiscord<firasuke> the rust package manager was like 3.2 MB in size, and couldn't be built by my toolchain (my toolchain uses gcc), and rust needs LLVM
19:24:20FromDiscord<Nilts> sent a long message, see http://ix.io/4qFa
19:24:41PMunchHmm interesting
19:24:47PMunchSo you're making your own distro?
19:24:56FromDiscord<firasuke> I rewrote some parts of it in Nim, size dropped down to under 100 kb, and I was able to tell nim to use the custom compiler from my toolchain and it worked
19:25:01FromDiscord<firasuke> In reply to @PMunch "So you're making your": yup
19:25:11FromDiscord<jmgomez> In reply to @ringabout "Yeah, create a routine": Sorry for the screenshot for those in IRC. What I missed, on the right my folder structure. It's a DynLib that has as entry point vm.nim. I just replaced the `` and did create the folder. Should I do something else? It doensnt output errors, it just dont work https://media.discordapp.net/attachments/371759389889003532/1084557718871883867/Screenshot_2023-03-12_at_19.22.29.png
19:25:16FromDiscord<firasuke> In reply to @PMunch "So you're making your": https://www.glaucuslinux.org/
19:25:27FromDiscord<Rika> In reply to @not logged in "Opinion of someone online": I would say the criticism is true. The alternative is up to you though
19:26:08PMunch@Nilts, different pros and cons TBH
19:26:23PMunchRust definitely has got a bigger user base, which could mean better support
19:26:34PMunchThat said I've seldom come across a more helpful channel than this one here
19:26:58*estiquelapice quit (*.net *.split)
19:26:58*Onionhammer quit (*.net *.split)
19:26:58*hernan quit (*.net *.split)
19:26:58*adium quit (*.net *.split)
19:26:58*hexeme_ quit (*.net *.split)
19:27:06FromDiscord<firasuke> sent a long message, see http://ix.io/4qFb
19:27:08*Onionhammer joined #nim
19:27:11PMunchHmm, what's toybox?
19:27:26*hernan joined #nim
19:27:28FromDiscord<firasuke> In reply to @PMunch "Hmm, what's toybox?": a clean rewrite of busybox used on Android
19:27:40FromDiscord<firasuke> it has the ability to build Linux from Scratch
19:27:45PMunchHuh
19:27:51*estiquelapice_ joined #nim
19:27:58FromDiscord<firasuke> so it's one of the better lightweight coreutils alternatives out there
19:28:09PMunchOooh, now I remember
19:28:19PMunchBusyBox was the thing I had on my router
19:28:28PMunchOh wow, you're going really lightweight then
19:28:36*adium joined #nim
19:28:37FromDiscord<firasuke> In reply to @PMunch "Oh wow, you're going": yup
19:28:40*hexeme joined #nim
19:28:45PMunchAny particular reason?
19:29:00FromDiscord<firasuke> it was more of an exercise in minimalism
19:29:17PMunchFair enough
19:29:18FromDiscord<firasuke> apparently there was a community that is interested so I decided to continue the effort
19:29:30FromDiscord<Rika> In reply to @firasuke "so Nim just felt": Async isn’t exactly about speed but latency I’d say
19:30:17FromDiscord<firasuke> In reply to @Rika "Async isn’t exactly about": I agree, but it is surprising that the nim version turned out to be faster (15-20%) faster and had much less cpu usage (rust had like 150-200% more cpu usage)
19:30:57FromDiscord<firasuke> I was like, if it's easier to write in, and can be using my gcc toolchain without introducing LLVM, and is much smaller and a tad bit faster, then why not switch to Nim lol
19:31:08FromDiscord<firasuke> (edit) "I was like, if it's easier to write in, and can be ... using" added "built"
19:31:54FromDiscord<firasuke> I'm listing all 128 packages information and sorting them based on their dependencies in 0.03 seconds (using topological sorting) (this is not a cached run) https://media.discordapp.net/attachments/371759389889003532/1084559407150551080/image.png
19:34:49FromDiscord<firasuke> loop 1000 times and parse 128 packages, a.sh runs the Nim version of the package manager, and b.sh runs the Rust version (I tried my best to make them equal in terms of code and formatting, the output is identical for both as well) https://media.discordapp.net/attachments/371759389889003532/1084560146476306462/image.png https://media.discordapp.net/attachments/371759389889003532/1084560146686017686/image.png
19:35:32FromDiscord<firasuke> The nim port ran like 2 seconds faster, and was insanely smaller.
19:35:32FromDiscord<Phil> In reply to @not logged in "Opinion of someone online": I mean, I wouldn't say so, but I have to immediately qualify that I obviously like nim better so eh
19:36:00FromDiscord<firasuke> I'm probably doing something stupid in Rust, but given the time it took me to write the nim port, I am not complaining lol
19:38:10FromDiscord<Nilts> In reply to @Isofruit "I mean, I wouldn't": they apparently just changed their opinion, waiting on a why
19:39:08FromDiscord<Nilts> This is in a language suggestion thing:↵> Because I do not want to discourage him from learning anyhow.↵> I find it a fun language and since he comes from python, might be a simpler way to get ti statically typed programming than, for example rust.
19:39:09FromDiscord<firasuke> I think you have to try both, the amount of complexity that I was introducing in the Rust version of my package manger, whether intentional or not, was just a nightmare to look at or maintain
19:39:14FromDiscord<Phil> The reason I like nim better is pretty much what firasuke is describing, it is trivial to get productive in it
19:39:42FromDiscord<jmgomez> In reply to @Isofruit "I mean, I wouldn't": if it counts I started at Rust for NUE. The way I see it, you can do stuff with Nim that you just cant with Rust I cant think an example of the other way around
19:39:51FromDiscord<firasuke> In reply to @Isofruit "The reason I like": exactly, you won't find a better compiled systems programming language that is as productive and as expressive
19:40:56FromDiscord<firasuke> tbh I wasn't expecting to reap benefits in terms of size and performance when writing the Nim port, I just wanted something easier to write in to get things done quickly
19:41:01FromDiscord<firasuke> got them as an added benefit lol
19:49:12FromDiscord<weitzj> sent a long message, see http://ix.io/4qFe
19:49:39FromDiscord<weitzj> (edit) "http://ix.io/4qFe" => "http://ix.io/4qFf"
19:50:25FromDiscord<Phil> I summon the PMunch
19:50:56FromDiscord<Phil> I assume simply because he's involved in the topic that he knows his competition and has an overview over that field of nim
19:55:52FromDiscord<jmgomez> In reply to @jmgomez "Sorry for the screenshot": I see the example of the compiler using Nim.nimble but no matter where I add the routine/routine.nimble dir/file it doesnt pick it
20:23:05PMunchHuh?
20:23:14PMunchErr, I mean..
20:23:28PMunchI've been summoned! What is your question, mortal?
20:23:52FromDiscord<Phil> Read weitzej's question oh Pmunch
20:24:05FromDiscord<auxym> nimterop is sort of dead, but futhark is actively developed by PMunch. My experience with c2nim was that it was mostly unusable on macro-heavy C-code: it required so much finagling to understand macros that manually writing bindings was easier / less work
20:24:24FromDiscord<Elegantbeef> I disagree auxym
20:24:29FromDiscord<Elegantbeef> `gcc -E` then run `c2nim`
20:24:42FromDiscord<auxym> indeed, I did not try that approach
20:24:44PMunchWhy though?
20:25:24FromDiscord<Elegantbeef> https://github.com/beef331/wasmer/blob/master/src/wasmer/wasmc.nim It's still not pretty
20:25:24FromDiscord<Elegantbeef> Why what?
20:25:26PMunchI mean the reason I wrote Futhark was because I couldn't get c2nim or nimterop to work
20:25:38FromDiscord<spoon> what does gcc -E do? i tried c2nim but it cut off a quarter of a way through this header
20:25:45FromDiscord<Elegantbeef> I still despise the lack of readable generated binding
20:25:57FromDiscord<auxym> I think it runs the preprocessor only and outputs processed C files?
20:26:00FromDiscord<Elegantbeef> `gcc -E` runs the preprocessor
20:26:05FromDiscord<Elegantbeef> So it expands all macros and emits the underlying code
20:26:06PMunchI had spent a week with either trying to get it to wrap a rather complex piece of code to no avail
20:26:33PMunchThe I spent a week writing Futhark and it spit out a perfect wrapper pretty much on the first try
20:26:40FromDiscord<Elegantbeef> I've had good results with `gcc -E` and `c2nim` it's not as seemless as futhark, but i get a concrete Nim API i can use
20:27:00FromDiscord<weitzj> In reply to @PMunch "I had spent a": Thank you. As you mentioned in your readme I think
20:27:13PMunchYeah I think I mentioned that
20:27:27PMunchWhat I didn't mention is that I've used it for multiple projects since
20:27:53PMunchThe thought of wrapping C libraries in Nim always filled me with dread, with Futhark I don't even think about it
20:28:15PMunchI just tell Futhark what to import, same as I would in C, and then it just goes and does its thing
20:28:59Amun-RaI love writing wrappers for nim
20:29:08FromDiscord<weitzj> Thank you everybody. This helped me to clarify the state of affairs.
20:29:34FromDiscord<djazz> I have used nimterop and c2nim, but with futhark I didnt have to modify the C headers
20:30:11PMunchExactly, and that is sooo important when you're working against someone elses code
20:30:22FromDiscord<Elegantbeef> The massive downside of futhark is all the features that pmunch has leaks into the generated Nim files so they're pretty much not human readable
20:30:30FromDiscord<Elegantbeef> But that's also a benefit cause then you just use it like the CAPi
20:30:41PMunch@Elegantbeef, haven't you seen the new switches?
20:30:47FromDiscord<Elegantbeef> I'll die on this hill pmunch 😛
20:31:00FromDiscord<Elegantbeef> No one told me
20:31:05Amun-RaI always hide native types and only expose nim ones
20:31:29FromDiscord<spoon> tried c2nim, get `Error: unhandled exception: idents.nim(83, 13) (id == 0) or (id == result.id) [AssertionDefect]`
20:31:34FromDiscord<Elegantbeef> Is there a `-d:futharkForThatAnnoyingBeefFellow`?
20:31:34FromDiscord<djazz> You could use futhark to generate the raw wrapper, and then make a pretty nim api on top
20:32:02PMunchBefore writing Futhark I ended up wrapping the aforementioned library by hand, but in a couple of versions they where totally incorrect (but still managed to work by pure coincidence). Comparing it to Futhark was a bit crazy because of how much stuff was now incorrect.
20:32:22PMunch@djazz, yeah this is the intended way to use it
20:32:41PMunch@Elegantbeef, something like that: https://github.com/PMunch/futhark#compatibility-features-and-readability
20:32:45FromDiscord<djazz> Or you can always do the rust approach. Rewrite all C in Nim
20:32:45FromDiscord<spoon> i saw the example of futhark being used to run from a header file directly, is there a method for producing a nim file i can refactor if needed?
20:32:59PMunchBasically -d:nodeclguards will create a much more readable output
20:33:25FromDiscord<Elegantbeef> shame on you
20:33:30FromDiscord<Elegantbeef> You should prefix the flag with `futhark`
20:33:38FromDiscord<Elegantbeef> especially `exportAll`
20:34:00PMunch@spoon, yes you can get the Nim file out so you can do it. But it's better to use the hooking system, that way your changes are actually written out in code so you don't have to remember the changes
20:34:11PMunchThat being said there shouldn't really be anything you'd want to change
20:34:20PMunch@Elegantbeef, hmm, fair point
20:34:36FromDiscord<Elegantbeef> The way you use futhark is like how you use the C import in zig
20:34:45FromDiscord<Elegantbeef> You get a C-api in your language, you then add a wrapping on top
20:35:27PMunchExactly! Futhark was heavily inspired by the Zig approach
20:35:37FromDiscord<Elegantbeef> Speaking of is there a way to retype pointers inside specific procedures, I know there is for types
20:36:11PMunchWell, you could definitely do it, but not as ergonomically
20:36:14PMunchI plan to add it though
20:36:18FromDiscord<Elegantbeef> Also `comppilerArgs` is this a typo?
20:36:25PMunchYes
20:38:01FromDiscord<Elegantbeef> I guess `retype procName"field", ptr UncheckedArray[int]` is like the best you can do
20:38:21FromDiscord<Elegantbeef> or `retype procName, proc(...): ...`
20:38:34PMunchWell that doesn't currently work, but yes the syntax would be something like that
20:43:21PMunchI guess you could create a proc through a cast or something
20:47:00FromDiscord<weitzj> sent a long message, see http://ix.io/4qFo
20:47:47PMunchCorrect, although clang still need to be able to understand the headers
20:47:55FromDiscord<Elegantbeef> This is where the fun part of futhark is
20:48:27FromDiscord<Elegantbeef> It's limited by the fact it's basically a modified clang compiler, so if clang cannot understand the code it cannot be used
20:48:28PMunchI wasn't able to use it for AVR stuff because it uses some features of avr-gcc which clang doesn't know about. But I know @djazz has been able to wrap some Pi Pico stuff (I think that was it)
20:48:41PMunchBasically YMMV
20:48:57FromDiscord<Elegantbeef> This also means things that do specialisations for msvc, gcc, tcc will not be parsable independantly
20:49:01FromDiscord<Elegantbeef> It'll always take the clang path
20:49:04FromDiscord<weitzj> Yeah. But if this is only C then this is all handled by clang? Or is there a C dialect per processor architecture ?
20:49:26PMunchWell, it depends @Elegantbeef if the header is "clean" then it will work
20:49:29FromDiscord<Elegantbeef> There are compiler specialisations so somethings might not be the same across compilers
20:49:33FromDiscord<Elegantbeef> Usually it's inside a `ifdef`
20:49:37FromDiscord<weitzj> In reply to @PMunch "I wasn't able to": Ah. Got it.
20:49:45PMunchI.e. if header is the same but the ifdef only exists in the .c files
20:50:12FromDiscord<djazz> example, I wrapped lwip using futhark https://github.com/daniel-j/nim-picosdk/blob/master/src/picostdlib/lib/lwip.nim https://github.com/lwip-tcpip/lwip
20:50:25PMunch@weitzj, yeah compilers can have different "dialects"..
20:50:32FromDiscord<djazz> i first made my own wrappers using c2nim
20:50:58FromDiscord<djazz> you can see my c2nim wrappers here https://github.com/daniel-j/nim-picosdk/tree/master/src/picostdlib/lib/lwip
20:51:12FromDiscord<djazz> some might have been nimterop (toast)
20:53:25FromDiscord<weitzj> Thank you everybody. That was very helpful
20:53:40FromDiscord<djazz> what OS are you on?
20:55:40FromDiscord<djazz> PMunch: so any idea how to get rid of the red squiggly lines when using futhark, and not using the generated nim directly? nim lang server dont understand the macro magic?
20:56:03FromDiscord<weitzj> In reply to @djazz "what OS are you": Linux
20:57:22PMunch@djazz, I'm actually not sure why it isn't able to read it
20:57:40PMunchBut keeping a local cache and when defined statements seems to help
20:57:42FromDiscord<djazz> thats my biggest downsade with it
21:04:44FromDiscord<djazz> PMunch: about short enums on windows... idk, seems like a debated feature so...
21:04:55FromDiscord<djazz> and i couldnt get them to work there
21:05:12FromDiscord<djazz> not sure if its a clang or opir issue
21:05:15PMunchYeah that's the conclusion I came to as well
21:05:30PMunchBasically it's a strange feature, and Windows doesn't like it I think
21:05:39PMunchThe when defined for Windows is fine
21:06:11FromDiscord<djazz> should i bring back when defined(windows) for them?
21:06:41FromDiscord<djazz> when not defined xd
21:06:44PMunchDid you take them out?
21:06:48FromDiscord<djazz> yea
21:06:56FromDiscord<djazz> removed the compiler arg
21:07:59PMunchYeah, put it back in
21:09:29FromDiscord<djazz> going to test it on macos as well then
21:12:38FromDiscord<djazz> sent a code paste, see https://paste.rs/7fC
21:13:53FromDiscord<djazz> works on macos
21:14:00FromDiscord<djazz> short enums that is
21:14:07PMunchI think you can do `compilerArg when not defined(): else: ""`
21:14:21FromDiscord<djazz> does it ignore empty string?
21:14:55PMunchWell an empty compiler arg wouldn't do much now would it
21:15:11FromDiscord<djazz> ok that worked
21:16:14FromDiscord<djazz> ok, so what do you think of my hostQuoteCommand, hostAbsolutePath etc procs?
21:16:31FromDiscord<djazz> they arent directly related to futhark, but needed when crosscompiling
21:16:59PMunchSorry, haven't had a chance to look at those
21:17:36FromDiscord<djazz> copied from nim os module and modified to use buildOS, windowsHost const
21:19:06FromDiscord<firasuke> what's the recommended method to execute a command on the host system and store its output as a string and its exit code? `os` vs `osproc`?
21:19:32FromDiscord<djazz> gorgeEx if at compiletime
21:19:38FromDiscord<Elegantbeef> `execCmdEx`
21:20:02FromDiscord<firasuke> In reply to @djazz "gorgeEx if at compiletime": ok cool so staticEx or gorgeEx for compile time stuff
21:20:16FromDiscord<firasuke> In reply to @Elegantbeef "`execCmdEx`": ok
21:20:20FromDiscord<djazz> gorgeEx gives you the status code
21:20:33FromDiscord<djazz> staticExec/gorge only gives output
21:21:25FromDiscord<djazz> dont forget quoteShell, quoteShellCommand if passing command arguments as string
21:21:26PMunchAnyways, I'm off to shovel some snow
21:21:34FromDiscord<firasuke> I was wondering what's the diff between execShellCmd and execCmd, is it only the shell part? or does execCmd give more control over the output/input/exit code
21:21:48FromDiscord<firasuke> In reply to @djazz "dont forget quoteShell, quoteShellCommand": thanks for that
21:22:31FromDiscord<djazz> osproc module has functions to pass arguments as array/seq
21:24:10FromDiscord<firasuke> can you pass constants as parameters to functions expecting a string?
21:24:38FromDiscord<Elegantbeef> Of course
21:25:12FromDiscord<djazz> look at this example also, using startProcess https://nim-lang.org/docs/osproc.html#readLines%2CProcess
21:25:59FromDiscord<firasuke> cool, thanks
21:26:34FromDiscord<djazz> hmm, there should be a execProcessEx proc imo, that can give you return code also
21:26:36FromDiscord<firasuke> how about working with constant strings as paths and joining them
21:26:48FromDiscord<firasuke> In reply to @djazz "hmm, there should be": yea saw that as well, very useful
21:27:01FromDiscord<djazz> import os↵"this" / "is" / "joined"
21:27:31FromDiscord<djazz> In reply to @firasuke "yea saw that as": I mean, it should exist. It doesnt exist today
21:27:37FromDiscord<firasuke> In reply to @djazz "import os "this" /": come on, it can't be this easy lol
21:27:53FromDiscord<djazz> https://nim-lang.org/docs/os.html#%2F%2Cstring%2Cstring
21:27:54FromDiscord<djazz> XD
21:28:07FromDiscord<djazz> `/` is an alias for joinPath
21:29:06FromDiscord<firasuke> I mean don't I have to like at least spend 8 hours to understand the difference between strings and os paths and such, just use `/` are you kidding me lol
21:29:42FromDiscord<Elegantbeef> Nim 2.0 does have typed paths but yes it's all just a string in Nim
21:30:39FromDiscord<firasuke> imo this is great
21:31:10FromDiscord<Phil> In reply to @Elegantbeef "Nim 2.0 does have": What property do "typed paths" have over strings?
21:31:43FromDiscord<Elegantbeef> It's statically typed, so you work on things knowing they're absolute, relative, files, directories, symlinks
21:33:20FromDiscord<Phil> Ahh so I can distinguish different kinds of paths thanks to static typing and not run into issues there
21:33:27FromDiscord<Phil> Check
21:33:46FromDiscord<Elegantbeef> https://nim-lang.github.io/Nim/paths.html correct
21:34:38FromDiscord<djazz> nice
21:35:32FromDiscord<Elegantbeef> It didnt go as deep as i though it just has `Path` 😄
21:35:45FromDiscord<djazz> `distinct string` xd
21:36:05FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=4qFw
21:36:38FromDiscord<Elegantbeef> You should be able to echo typedefs
21:36:45FromDiscord<Elegantbeef> Perhaps you cannot which would be weird
21:37:13FromDiscord<jmgomez> I thought it was a orc issue with 1.6.x but it seems it keep happening in devel..
21:37:55FromDiscord<jmgomez> although just tried refc/markAndSweep and got the same result
21:38:34FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4qFy
21:38:44FromDiscord<Elegantbeef> That's not the VM phill
21:38:53FromDiscord<Phil> Oh right, nim secret
21:39:17FromDiscord<Elegantbeef> But it still will work
21:40:29FromDiscord<jmgomez> I think is related to this: https://github.com/nim-lang/Nim/issues/19974
21:40:35FromDiscord<Phil> I can't even do a type declaration in nim secret o.O
21:40:44FromDiscord<firasuke> I know I am asking a lot, so please bare with me
21:40:51FromDiscord<firasuke> what's the default method for handling errors in nim?
21:41:10FromDiscord<Phil> exception handling currently, though some folks use Result-types
21:41:14FromDiscord<Elegantbeef> Exceptions
21:41:15FromDiscord<firasuke> with proper error messages based on result types
21:41:20FromDiscord<firasuke> oh ok, exceptions
21:41:38FromDiscord<Elegantbeef> Yea jm just tested using `nim e` it works fine
21:41:43FromDiscord<Elegantbeef> So you're smoking something
21:42:01FromDiscord<Phil> I think I'm just failing at using nim secret
21:42:50FromDiscord<firasuke> In reply to @Isofruit "exception handling currently, though": can you link to both please?
21:43:26FromDiscord<Phil> sent a code paste, see https://paste.rs/TSE
21:44:38FromDiscord<jmgomez> oh yeah that works sure
21:44:59FromDiscord<jmgomez> what doesnt work is inside a vm building an interpreter, not sure about the diffs..
21:45:09NimEventerNew Nimble package! webui - Nim wrapper for WebUI, see https://github.com/neroist/webui#readme
21:45:43FromDiscord<Elegantbeef> Perhaps you are not passing the right defines
21:45:53FromDiscord<firasuke> In reply to @Elegantbeef "Exceptions": so this: https://status-im.github.io/nim-style-guide/errors.html?
21:47:04FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#exception-handling
21:47:05FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=4qFE
21:47:05FromDiscord<Phil> In reply to @firasuke "so this: https://status-im.github.io/nim-style-guid": Status has a Result lib, can't find it atm but shouldn't be tooooo hard to find:↵https://status-im.github.io/nim-style-guide/libraries.results.html
21:47:14FromDiscord<Phil> And beef just linked exception handling docs
21:47:30FromDiscord<firasuke> oh ok thanks a lot
21:47:44FromDiscord<jmgomez> In reply to @jmgomez "I see the example": got this to work cc @ringabout
21:48:22FromDiscord<Elegantbeef> Jm does `defines = @{"nimscript": "true", "nimconfig": "true"}` help any?
21:48:37FromDiscord<Phil> In reply to @firasuke "oh ok thanks a": There's multiple libs, pick one that you trust and see if it works for you:↵https://nimble.directory/search?query=result↵resultutils, questionable and result seem to be what you're looking for
21:48:42FromDiscord<Phil> (edit) "In reply to @firasuke "oh ok thanks a": There's multiple libs, pick one that you trust and see if it works for you:↵https://nimble.directory/search?query=result↵resultutils, questionable and result seem to be what you're looking for ... " added "(if you want to use result-types)"
21:48:56FromDiscord<Phil> If you want to enforce exception handling, then also check out the `raises` pragma
21:49:05FromDiscord<firasuke> oh cool
21:49:53FromDiscord<jmgomez> In reply to @Elegantbeef "Jm does `defines =": nope
21:50:11FromDiscord<Phil> In reply to @firasuke "oh cool": https://nim-lang.org/docs/manual.html#effect-system-exception-tracking↵Here in case you want to start explicitly tracking which proc can raise which exception etc.
21:50:25FromDiscord<jmgomez> do you recall if it worked for you at some point in nimscripter?
21:50:32FromDiscord<firasuke> that is insanely useful, thanks @Phil
21:50:39FromDiscord<Elegantbeef> I mean it should work fine
21:50:52FromDiscord<Elegantbeef> Not like nimscripter works on devel anymore anyway
21:51:17FromDiscord<Elegantbeef> It's pretty much a dead package now until i get around to figuring the whole using nimble files to implement procedures
21:51:33FromDiscord<jmgomez> I was waiting to resume the work on it to have the chance to upgrade to devel hoping that it worked there. But it isnt the case
21:52:17FromDiscord<jmgomez> Oh yeah, that's why I pinged ringabout now, as he (or she?) mentioned the `` is not available anymore
21:52:41FromDiscord<Phil> In reply to @jmgomez "Oh yeah, that's why": Welcome to the reason I just use they: It's foolproof 😛
21:52:44FromDiscord<jmgomez> not sure if just adding nimscripter instead for you will do the trick, it did for me
21:52:46FromDiscord<Phil> (edit) "they:" => ""they":"
21:53:24FromDiscord<jmgomez> In reply to @Isofruit "Welcome to the reason": English is hard enough for me already, Im fine saying sorry if I got it wrong I guess
21:54:47FromDiscord<jmgomez> So I need to go, will fill an issue for that if it should work and in the meantime I will see if I can get a hacky workaround for the interop
21:54:55NimEventerNew thread by Naterlarsen: Cursor Location for user input., see https://forum.nim-lang.org/t/9986
21:55:16FromDiscord<Yepoleb> In reply to @jmgomez "Oh yeah, that's why": it's he btw
22:10:12NimEventerNew Nimble package! dhash - Nim implementation of dHash algorithm, see https://github.com/filvyb/dhash
22:13:42FromDiscord<Elegantbeef> You're telling me males would use anime pictures for profile pictures?!
22:15:58PMunchRight, back from snow shoveling
22:16:02FromDiscord<Phil> Males would even use intelligent looking fruits for profile pictures
22:16:48FromDiscord<Elegantbeef> You cannot put glasses on a tomato to make it look smart
22:17:20PMunchHuh, just had a look at an older project of mine. Apparently it's wrapping Gtk with futhark
22:17:26PMunchThat's neat
22:18:09PMunchDidn't even remember that was a thing I've done, that's how easy wrapping stuff with Futhark is :P
22:25:04FromDiscord<Elegantbeef> Oh also i made graffiti a tinge smarter, it now uses the commit that the version was ticked on
22:25:04FromDiscord<Phil> In reply to @Elegantbeef "You cannot put glasses": That's why you put them on a refined looking apple
22:25:46FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1084603162582855810/image.png
22:25:50FromDiscord<Elegantbeef> It's like it was done manually! 😛
22:37:40*azimut joined #nim
22:38:11*Notxor quit (Remote host closed the connection)
22:56:47NimEventerNew thread by alexeypetrushin: Strange SIGSEGV / nil, see https://forum.nim-lang.org/t/9987
22:58:07FromDiscord<Yepoleb> it's always a big surprise when the cute anime girl is a man
22:59:32FromDiscord<tsoj> sent a code paste, see https://play.nim-lang.org/#ix=4qG3
23:02:12FromDiscord<Elegantbeef> Static parameters is pretty much it
23:03:50*PMunch quit (Quit: leaving)
23:07:34FromDiscord<Hourglass [She/Her]> In reply to @Elegantbeef "You cannot put glasses": Beef came for blood lmao
23:09:05FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4qGa
23:10:19FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4qGb
23:15:01FromDiscord<tsoj> Usually I would do your more straightforward 2nd version, but in this case, the `MyEnum` enum will grow and I don't want to update the `doThing` function everytime there gets a new enum element introduced (I also don#t want everything in the `doThing` function, so I'd need extra functions anyway). But your first version looks nice, I'm gonna try this, thanks!
23:16:23*azimut quit (Ping timeout: 255 seconds)
23:19:48FromDiscord<Elegantbeef> It's a shame we cannot do `proc doThing(s: static 10)` or `s: 10`
23:21:35FromDiscord<tsoj> Have you also run into a situation where you needed this? I assumed this was kind of a niche case
23:21:56FromDiscord<Elegantbeef> I havent really needed it I just futz around with the type system
23:22:36FromDiscord<Elegantbeef> In your case you could use types aswell
23:23:18FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4qGf
23:23:30FromDiscord<Elegantbeef> But those do not compose for obvious reasons
23:25:15NimEventerNew thread by alexeypetrushin: How to decouple code?, see https://forum.nim-lang.org/t/9988
23:26:00*azimut joined #nim
23:29:49FromDiscord<tsoj> sent a code paste, see https://play.nim-lang.org/#ix=4qGh
23:30:03FromDiscord<Elegantbeef> I concur
23:56:06FromDiscord<luteva> is there any transpiler from javascript to nim?
23:56:36FromDiscord<Elegantbeef> IIRC there are some very basic attempts, but it's always going to be awful
23:56:48FromDiscord<Elegantbeef> JS is not statically typed so raising it to static typed is pretty much impossible
23:57:54FromDiscord<luteva> ok typescript to nim 😄
23:57:56FromDiscord<luteva> ?
23:59:02FromDiscord<Elegantbeef> One of those exists
23:59:02FromDiscord<Elegantbeef> A lot of people write interfaces for their types and that means there is no real instance
23:59:03FromDiscord<Elegantbeef> But it's a similar problem due to everything being equivalent to a Nim concept in TS