<< 23-08-2020 >>

00:00:01*junland quit (Quit: %ZNC Disconnected%)
00:00:09Yardanicomost of it is not really useful in 99.9% of issues
00:00:17Yardanicoimo
00:00:46disrupteki will say this about concepts:
00:00:57disruptekanything that improves compile-time speed is very welcome.
00:01:09FromDiscord<Varriount> Are concepts slow?
00:01:18disruptekbeyond slow.
00:01:41disrupteklike, i know this code doesn't work and it'll take minutes for me to find out why.
00:01:47*junland joined #nim
00:02:00Yardanicoare you sure they are *that* slow?
00:02:06Yardanicowhy are there no open issues about that? :P
00:03:21disruptekbecause an issue will serve no purpose.
00:03:29FromDiscord<Varriount> From what I recall, concepts make heavy use of `compiles()`.
00:03:35Yardanicowell yes
00:03:38Yardanicobut anyway, I don't think that's a good attitude to have :)
00:03:41Yardanicogood night
00:03:46disruptekgn
00:04:05disruptekthere's no point to creating an issue for a feature that is slated for redesign/reimpl.
00:04:18disrupteknot to merely complain about performance, anyway.
00:04:38FromDiscord<Varriount> Well, it lets others know that the issue is known.
00:04:57disruptekit is known.
00:06:28FromDiscord<Varriount> Yes, but I may not know that, unless someone tells me. If I'm a new user, use concepts, and discover that they are slow, looking at the issue tracker would suggest that the issue isn't known.
00:08:38disruptekanything that improves compile-time speed of concepts is very welcome.
00:10:51disruptekif you don't know, now you know
00:17:38*lritter quit (Quit: Leaving)
00:26:17FromDiscord<exelotl> This one's a stinker https://github.com/nim-lang/Nim/issues/15218
00:26:19disbotConst variant object fields are incorrectly set to zero ; snippet at 12https://play.nim-lang.org/#ix=2uXz
00:26:53disruptekoh wow.
00:27:33disrupteknice job.
00:28:07FromDiscord<exelotl> thanks xD
00:30:55FromDiscord<exelotl> The real travesty here is that this bug broke my poor dog's rocket. https://media.discordapp.net/attachments/371759389889003532/746889166825979916/Screenshot_from_2020-08-23_01-29-59.png
00:31:13disruptekouch.
00:31:43disruptekyou hate to see it.
00:32:08FromDiscord<exelotl> ya really do
00:32:12FromDiscord<Elegant Beef> I dont like that your dog's rocket is red
00:33:35disruptekthat's such a bad bug.
00:40:05*bung joined #nim
00:46:01*waleee-cl quit (Quit: Connection closed for inactivity)
00:57:22FromDiscord<Varriount> exelotl: Whenever I see your nickname, I always want to draw/create some stylized axelotl icon for you
00:58:08FromDiscord<exelotl> aww
00:58:57*bung quit (Ping timeout: 258 seconds)
00:59:04FromDiscord<exelotl> I'm too attached to my plush lizard tho :(
01:00:09*Jesin joined #nim
01:00:15*Jesin quit (Remote host closed the connection)
01:07:46*Jesin joined #nim
01:07:46*leorize quit (Remote host closed the connection)
01:07:46*Jesin quit (Remote host closed the connection)
01:08:19*leorize joined #nim
01:09:33*Jesin joined #nim
01:10:02disruptekvarriount: i think my concepts are actually never going to finish compiling.
01:11:53*thomasross joined #nim
01:12:20*Jesin quit (Remote host closed the connection)
01:17:37*Jesin joined #nim
01:17:58disruptek1.4hrs is just too long to wait.
01:21:54*Jesin quit (Remote host closed the connection)
01:23:07*aenesidemus_ joined #nim
01:25:54leorizedisruptek: have you looked at one of the proposals within the RFC? https://github.com/nim-lang/RFCs/issues/168#issuecomment-593410686
01:25:55disbotConcepts and type-checking generics ; snippet at 12https://play.nim-lang.org/#ix=23U8
01:26:05*aenesidemus quit (Ping timeout: 240 seconds)
01:26:37*Jesin joined #nim
01:26:51FromDiscord<Varriount> disruptek: Despite my complaint about command substitution, I do like using fish. It actually follows the kind of design I was aiming for when writing commandant.
01:27:02leorizethat one in particular is interesting to me due to how simple it appears to be
01:27:23disruptekwell, i like what i have now.
01:27:28leorize@Varriount `string collect` is a good enough magic :P
01:27:39disrupteki just wish it actually compiled instead of, y'know, just heating up my house.
01:28:10disruptekvarriount: you mean the thing about not being about to run a variable?
01:28:24disruptekvarriount: you can use `command $foo` to "invoke" foo.
01:28:46leorizeI thought @zah said he got some ideas on how to fix the current implementation?
01:28:56disruptekour current concepts are succinct and similar to what gemath suggests, but even simpler.
01:29:07FromDiscord<Hearthstone> > disruptek: Despite my complaint about command substitution, I do like using fish. It actually follows the kind of design I was aiming for when writing commandant.↵Fish as in the fish shell?
01:29:11disruptekit's just that you cannot use negation. like, at all.
01:29:18disruptekhearthstone: yes.
01:29:22FromDiscord<Hearthstone> It's my favourite shell-
01:29:33leorizedisruptek: why couldn't you? it's a list of expression
01:29:37disrupteki'm a 3-shell kinda guy.
01:29:56disruptekleorize: i dunno why.
01:30:12FromDiscord<Varriount> @Hearthstone Yes
01:30:41FromDiscord<Hearthstone> Nice
01:30:50leorizefish shell is the best shell
01:30:56leorizewell at least until nim shell is a thing :P
01:31:05disruptekleorize: i just pushed a nimph PR that fails spectacularly if you wanna look at concept insanity.
01:31:09disruptekit's not even complex.
01:31:22leorizeyes please
01:31:31FromDiscord<Varriount> @Hearthstone The fact that you can't quote command substitutions in Fish is dangerous, which precludes me from using it for scripts to be used in automation, or which accept arbitrary input.
01:31:31leorizeif you really want to use concepts, ask @mratsim
01:31:42leorizeyou can now
01:31:48disruptekno idea what you mean.
01:32:19FromDiscord<Hearthstone> What do you mean?
01:32:21leorizemratsim managed to figure out concepts for many of his projects
01:32:34disrupteki've used them successfully.
01:33:03disruptekhttps://github.com/disruptek/nimph/pull/140
01:33:04disbotnimph 2.0
01:33:17disruptekthere's some shit about nimph-2.0 if anyone is interested.
01:33:29FromDiscord<Clyybber> just looked at it
01:34:23disruptekis it making your balls throb as hard as it is mine?
01:35:48FromDiscord<Clyybber> @Varriount its reported (the slowness of concepts)
01:36:02FromDiscord<Clyybber> disruptek nah
01:36:13disruptekwhat's wrong with your balls?
01:36:16FromDiscord<Clyybber> not the infinite loop
01:36:27FromDiscord<Clyybber> but its funny
01:36:43disrupteki think it's geometric growth.
01:36:56FromDiscord<Clyybber> i just recentpy started building a pm that uses git submodules
01:37:08FromDiscord<Clyybber> but now that nimph is going that path i'm fine
01:37:51leorizenot a big fan of git submodules tbf
01:38:28disruptekone thing i love about submodules is that they show up as links on github.
01:38:33FromDiscord<Clyybber> they can be inconvinient, thats why you build a pm arpund them
01:38:43disruptekso you can jump right to the project at the very commit... it's awesome.
01:38:52disruptekyou can see exactly what the dependencies are, etc.
01:38:57FromDiscord<Clyybber> and the big advantage is that people don't need a pm to build your stuff
01:39:03FromDiscord<Clyybber> they are pm independent
01:39:05leorizethe only part I hate about them is that they require a git repo
01:39:09FromDiscord<Varriount> @Hearthstone In Bash, `rm "$(some command)"` runs `some command`, captures its output, , and then runs `rm` with the first parameter set to the captured output.
01:39:11disruptekright. like gitnim... "it's just git"
01:39:49FromDiscord<Hearthstone> Yup
01:39:53FromDiscord<Varriount> @Hearthstone If you omit the quotes (`rm $(some command)`) then word splitting is performed.
01:40:02FromDiscord<Hearthstone> Okay
01:40:06leorize@Varriount `rm -- (some command | string collect)` is now a thing :P
01:40:07disrupteki don't have any problem with requiring that every project is in source control. if you don't want that, just don't use nimph. nim is sufficient.
01:40:29leorizedisruptek: it just complicates tarball releases
01:40:42disruptektell me.
01:41:35disruptekclyybber: you know you can use nimph with submodules today.
01:41:52leorizethe extra step of pulling all repos bundled in your repo, then remove all `.git` from them before packing into an archive
01:41:59leorizearguably not much of an issue though
01:42:02disruptekyawn.
01:42:05FromDiscord<Clyybber> disruptek yeah but nimph is so big rn
01:42:12FromDiscord<Clyybber> it hurts to even build it
01:42:25disruptekwell, it's not even possible to build 2.0.
01:42:36disruptekbut, when it was, it was blisteringly fast.
01:42:48disruptekwithout nimble it's just amazing how quick it is.
01:43:08disruptekfor large projects, it went from like 3-4s to 100-200ms.
01:44:02FromDiscord<Varriount> leorize: Yes, but that's a rather verbose solution, and (for safety) must be used virtually everywhere.
01:44:05disruptekit'll be bundled in gitnim anyway. no one will have to build it.
01:44:29leorize@Varriount not really
01:44:55*apahl quit (Ping timeout: 240 seconds)
01:45:34leorizeyou typically don't abuse command substitution in scripting, and if you do have to use them you'd generally assign them into a variable for further processing
01:46:20FromDiscord<Varriount> leorize: You don't "have" to abuse it, all that needs to happen is for a subcommand to emit odd output.
01:46:40FromDiscord<Varriount> I would also feel better if the tutorial mentioned that idiom.
01:46:57leorizethat's what I meant by abusing
01:47:12*apahl joined #nim
01:47:43leorizegenerally you avoid spawning commands at all costs
01:48:29FromDiscord<Varriount> Generally the purpose of a shell is to spawn commands.
01:48:56leorizeif you found yourself frequently using subcommands and passing the output directly to something else as an argument then you might not be doing it right
01:49:12disrupteki agree, it sounds bizarre to me.
01:50:16disrupteki treat the shell like i treat a back alley blowjob.
01:51:56FromDiscord<Varriount> It's still a danger waiting to trip people up, especially since the tutorial/main documentation page doesn't mention it.
01:52:23leorizetrue that, they're working on better exposing the API
01:52:47leorizethey might just stop being stubborn and make `$()` a thing in fish
01:52:56disruptekarg.
01:53:41FromDiscord<Varriount> Then again, I've had to go over bash scripts (not written by me) that were full of unquoted variable and command substitutions, so maybe it's pointless either way.
01:54:02leorizeat least you have shellcheck for those :P
01:54:34FromDiscord<Varriount> I treat Bash like an unpredictable power tool. Dangerous, with spinning blades that could possibly fly off at any moment.
01:54:37leorizethough shellcheck can't catch errors like calling `sed` and `awk` and expecting them to be the GNU version
01:55:38FromDiscord<Varriount> These days I generally just call perl. It may not be as succinct, but (oddly enough) its generally installed on the systems I work on.
01:55:46leorizewhen I write shell scripts I assume that the only thing I have are the built-ins and the command I'm scripting around
01:57:04disruptekit sounds like i'm the one having the most fun.
01:57:31disruptekpython is at least as portable as perl these days, ime.
01:57:33leorizeI found bash parameter expansion works well enough that I can get rid the need for the various text utilities
01:58:01disruptekperl is faster but i'd rather read python.
01:58:52FromDiscord<Varriount> leorize: Do you know if fish has an equivalent to `set -e` and `set -u`? (exit on command exit code > 0, exit on undefined variable reference).
01:59:29FromDiscord<Varriount> Or do I have to suffix everything with `|| exit(1)`?
01:59:56disruptekitym ; or exit 1
02:00:23FromDiscord<Varriount> Yes
02:00:46disrupteka little beastiality never hurt /anyone/
02:01:04FromDiscord<Varriount> Huh?
02:06:13leorize@Varriount nope they don't have that
02:06:30leorizeI generally just put `if`s on everything
02:07:08FromDiscord<Varriount> Ick
02:07:50disruptekbuild-compiler ; or exit
02:07:50disruptekand build-sanity ; or exit
02:07:51disruptekand build-test ; or exit
02:08:21leorizeyou can just use `and` all the way :P
02:08:35disrupteki know, but he wants some codes.
02:08:42FromDiscord<Varriount> https://github.com/fish-shell/fish-shell/issues/510
02:08:44disbotOption to abort a script if a command fails (e.g., set -o errexit) ; snippet at 12https://play.nim-lang.org/#ix=2uXO
02:09:37FromDiscord<Varriount> I should just implement my own unholy cross between ansible and fish
02:09:58leorizemake nim shell happen
02:10:22FromDiscord<Varriount> Well, I already have a base: https://github.com/Varriount/commandant
02:10:26leorizethere's xonsh now for python-like stuff but the ergonomic is not nice
02:11:34leorizehttps://skarnet.org/software/execline/ <- you might be interested in that one
02:11:44leorizeit's the truest sense of everything is a command
02:11:49FromDiscord<Varriount> Although, how Ansible became popular is beyond me. Any advanced variable handling requires mental gymnastics
02:12:42FromDiscord<Varriount> ooh, thanks. That looks quite interesting.
02:13:50disrupteki guess you looked at oil shell.
02:14:05disruptekthe one i was interested in was more lispy but i can't remember what it's called.
02:14:08FromDiscord<Varriount> I've seen it. I've also looked at Elvish (Go shell)
02:14:24FromDiscord<Varriount> That might be elvish
02:14:38disrupteki think so.
02:15:41leorize99% of the time you only need a good enough shell for the job
02:15:51leorizeanything more complicated you write them in Nim
02:15:57disruptekyeah, the thing is that portability is more important.
02:16:07leorizenow the only issue is that osproc is terrible
02:16:09disrupteki know i can get fish where i need it, and i'd rather write nim.
02:16:26disrupteki don't find it to be a problem, honestly.
02:16:32disruptekit's annoying sometimes, but whatever.
02:17:07leorizesome of my use cases require seamless piping, redirecting and controlled fd passing
02:17:11disruptekto put that a different way, when i look at my osproc code, it's ugly. on the other hand, i don't have to look at it often.
02:17:13leorizeall of which osproc can't do
02:17:30leorizeI'm brewing my own replacement though
02:17:38disruptekyeah, if i'm going out to osproc i'm already lubed up.
02:17:51leorizehopefully I can get it to good enough so I can toss it out there
02:18:01disrupteki wouldn't wait.
02:18:42FromDiscord<Varriount> leorize: I'd eventually like to port D's subprocess module to Nim, possibly adding in things like piping
02:18:56leorizeI think D's subprocess is inelegant
02:19:24leorizeGo's approach is much leaner and simpler
02:19:51leorizeRust appears to take some pages from Go's approach
02:21:07disruptekdo you write a lot of go?
02:21:30FromDiscord<Varriount> Hm, Go appears to take the standard "stuff 5 million arguments into a single function call" and translate it into an object-oriented (or rather, struct-oriented) approach.
02:22:14FromDiscord<Varriount> Which, I guess they would have to do, given Go's lack of named parameters (using closure options is possible, but quite inefficient)
02:22:41FromDiscord<Varriount> leorize: Yeah, actually, that looks better.
02:24:12FromDiscord<Varriount> leorize: How do you imagine something like piping output from one process to another would be achieved? Do you think we could take advantage of Nim's operator overloading?
02:27:37*muffindrake quit (Ping timeout: 272 seconds)
02:28:38leorize[m]"disruptek" (https://matrix.to/#/@freenode_disruptek:matrix.org): I don't even write Go :p
02:29:25*muffindrake joined #nim
02:30:56*aenesidemus_ quit (Read error: Connection reset by peer)
02:31:02FromDiscord<Hearthstone> Hmmm... From what I've seen about Nimph
02:31:26FromDiscord<Hearthstone> The 2.0 version will be better then nimble, judging from what I've seen
02:31:29FromDiscord<Hearthstone> Correct?
02:31:45*audiofile joined #nim
02:31:55disrupteki mean, i think the 1.0 version is better, but i'm extremely biased.
02:32:11FromDiscord<Hearthstone> Because you made it?
02:32:27disruptekyes, and i made it to my spec.
02:32:52FromDiscord<Hearthstone> Hm
02:33:07FromDiscord<Hearthstone> How does importing modules work in Nimph?
02:33:09disruptekcustom software is pretty nice to use.
02:33:24FromDiscord<Hearthstone> And can it install everything Nimble can install?
02:33:34disrupteksure.
02:33:59FromDiscord<Hearthstone> Hm
02:34:15disrupteki can't imagine not writing my own software.
02:34:32FromDiscord<Hearthstone> Would importing modules on nimble work like golang's method? Like `github.com/user/repo`?
02:34:32disrupteki guess i /do/ know what i wanna be when i grow up!
02:34:34FromDiscord<Hearthstone> Lmao
02:34:59disruptekthere is a milestone for pragma-based package management.
02:35:22disrupteki haven't decided if it'll go in before nim-2.0 but it'll definitely go in by then.
02:35:24FromDiscord<Hearthstone> Oh?
02:36:11disruptek{.nimph: "https://github.com/disruptek/testes#2.0.3".} will be a thing, yes.
02:36:17FromDiscord<Hearthstone> Oo
02:36:37FromDiscord<Hearthstone> And then the library will be imported in that proc?
02:36:57disrupteki dunno the specifics; it's not really important.
02:37:03disruptekmagic will happen.
02:37:11disruptekthen you'll be able to play with my testes...
02:37:25disrupteksome say that's when the magic /really/ happens.
02:37:29FromDiscord<Hearthstone> Lmao
02:37:35FromDiscord<Hearthstone> Hmm
02:37:58disruptekthe direction we're moving in is to put everything into the source.
02:38:04FromDiscord<Hearthstone> If something like `import "github.com/user/repo"` becomes a thing let me know-
02:38:22FromDiscord<Hearthstone> Because that'll be fun xD
02:38:47disruptekit's not really that different from what we have now.
02:39:07leorize[m]@Varriount I think Go just nail this well since it got people who have strong bg in the Unix philosophy as core devs.
02:39:07disruptekrequires "https://github.com/disruptek/testes#2.0.3"
02:39:25leorize[m]about operators, I'm not sure tbh
02:39:48FromDiscord<Hearthstone> Oh?
02:39:52FromDiscord<Hearthstone> Is that a thing?
02:39:58disruptekyes.
02:40:11FromDiscord<Hearthstone> Does that download the required lib on the go?
02:40:18disruptekno.
02:40:26FromDiscord<Hearthstone> How does it work then?
02:40:38disruptekthat's syntax for your .nimble file. nimble or nimph will use it to install the package.
02:41:30FromDiscord<Hearthstone> Oh alright
02:41:40FromDiscord<Hearthstone> I mean in the .nim files
02:41:48disrupteknah, that's not a thing there.
02:41:56FromDiscord<Hearthstone> I wanna do something similar to what go does for most imports because why not-
02:42:03FromDiscord<Hearthstone> Alright then :P
02:42:20disruptekit's a little verbose. that's a reason not to.
02:42:43FromDiscord<Hearthstone> Really?
02:42:51disrupteki think araq is pressured not to make it hard for airgapped folks to use nim, so that's another reason he resists it.
02:43:07disruptek`import testes` is shorter than any of these URLs.
02:43:12FromDiscord<Hearthstone> Wdym by airgapped?
02:43:17FromDiscord<Hearthstone> Definitely, that's true
02:43:25disrupteknetworks which are not on the internet.
02:43:44FromDiscord<Hearthstone> Oh alright
02:44:05disruptekthink fintech or gov.
02:44:58FromDiscord<Hearthstone> Makes sense
02:47:49FromDiscord<Varriount> leorize: I write Go. The standard library is... ok. It's a bit anemic in some unexpected places
02:48:25*thomasross quit (Ping timeout: 240 seconds)
02:48:25FromDiscord<Varriount> Though, possibly that's due to the language, which I find a bit too conservative.
02:48:48shashlickdisruptek: what's new with nimph
02:48:57FromDiscord<Varriount> Something like Nim's templates would "go" a long way to fixing my gripes with it.
02:49:14disrupteki'm doing a second version.
02:49:41disruptekcurrently trying to set fire to my desk with concept recursion.
02:50:32shashlickreading your pr
02:52:07disruptekyeah, it doesn't build yet.
02:52:33shashlicknot the code, the description
02:52:47shashlickso I might steal your nim.cfg writing code if you are going to do that
02:52:48disruptekah, yeah.
02:53:07disruptekthat code already exists in nimph/config.nim
02:53:09shashlickI was going to work on that next but I'm lazier than you
02:53:19shashlickwhat all do you write to nim.cfg
02:53:30shashlickand do you work with existing nim.cfg
02:53:37shashlickuser modified
02:53:41disruptekyou will have to rip it apart though because i write a new file, then parse it with the compiler to make sure it's kosher, then move it into place.
02:53:49disruptekyeah, it modifies the existing file.
02:54:03shashlicksounds about what I was thinking of doing
02:54:21shashlickdo you put stuff in a separate "modified by nimph" section
02:54:24shashlickor just inline
02:54:27disruptekone of the very few bugs i had was that people on windows created nim.cfg files that had no trailing newline.
02:54:39disrupteki was adding lines. this corrupted the file.
02:54:50disruptekso i put a comment line in to solve that problem.
02:55:01disruptekjust a heads-up on something you will want to think about.
02:55:06shashlickcool
02:55:16shashlickI have some concerns with writing nim.cfg though
02:55:19disruptekother than that it doesn't do anything special.
02:55:24shashlicksince you have done it already, want to run it by you
02:55:35disrupteki don't compose it from scratch.
02:55:37disrupteki just append.
02:55:41shashlickif you are putting --path or --nimblePath into it
02:55:42disruptekoh, and i remove stuff.
02:55:57shashlickand we are in localdeps mode
02:56:00disruptekwell, nimph 2 will just compose it from scratch.
02:56:16shashlickthe paths will be $project/nimbledeps/pkgs/xyz
02:56:38shashlickwhich means nim.cfg cannot be checked in since localdeps isn't really something you check in
02:56:48shashlickin this case the paths
02:56:58disrupteknim.cfg never gets checked-in, but you can check in the project.nim.cfg.
02:57:19shashlickI guess the consolation is that these paths won't exist on users systems so Nim will just ignore them and they will be cruft if checked in
02:57:29shashlicksome users do checkin their nim.cfg
02:57:41shashlickand if we are adding to it, we will have to consider that no?
02:57:42disruptekthose people will be first against the wall.
02:58:01disruptekno; we decided the pm will blow it away, remember?
02:58:05shashlickproblem with project.nim.cfg is that it only affects project.nim
02:58:17shashlicksome people use nim.cfg to affect their test cases and multiple binaries
02:58:21disrupteki'm okay with that.
02:58:52disruptekthey can use config.nims, too, if they must.
02:59:14leorize@Varriount I guess you can expect that any constructs imported from Go to Nim will be a few dozen times more flexible :P
02:59:15disruptekit's a file that is even harder for us to parse. or easier, depending on how you look at it.
02:59:17shashlickit is an education issue then - as it is I'm hearing crickets with my nimble changes it concerns me
02:59:40disruptekremember that there aren't that many nim users.
02:59:53disruptekthere are like 11 of us. 13 if you include zevv.
03:00:22shashlickwell, the fact that 4raq only wants nimble updates to go out with Nim releases, broken nimble means a new nim release
03:00:39shashlickhe gets counted twice for his two v's?
03:00:53shashlickI have two h's
03:00:53disruptekeach hand is like a full nimion.
03:01:16disruptekwhen did nimble become broken?
03:01:40shashlickwell, if my so called fixes/enhancements break the community
03:01:43disruptekit worked for me with your pr.
03:02:08disruptekyou won't know /until/ the next nim release.
03:02:29shashlickthat's my point - I'd rather have nimble release as and when, independent of nim
03:02:41disrupteki agree.
03:02:42shashlickalready nimble is tested with Nim as far back as 0.20.2
03:02:49disruptekmaybe choosenim can bump it.
03:02:52shashlickbut 4raq is not a fan of that
03:03:16shashlickyou can already do `koch nimble --latest` or `nimble install nimble`
03:03:16disruptekwell, i agree with him. 1.0+ is the only thing that makes sense.
03:03:27disruptekbut no one will do that.
03:03:34shashlickexactly
03:03:35disruptekchoosenim will get a newer nimble out faster.
03:03:49disruptekthen you can continue to ship an older nimble with nim as long as you want.
03:04:05shashlickwhy choosenim instead of nimble
03:04:13disruptekbecause no one will update nimble.
03:04:19disruptekbut they will use choosenim to update nim.
03:04:35*PMunch quit (Quit: leaving)
03:05:23shashlickhmm
03:05:46leorizeshashlick: are you using CI to test nimble?
03:07:27shashlickya CI is all green
03:09:55shashlickjust that new features aren't getting much usage thru the devel cycle
03:10:02shashlickto expose bugs before 1.4 comes out
03:10:43disrupteki don't think it's a problem.
03:11:02disruptek1.4.2 can come out whenever.
03:39:13FromDiscord<Elegant Beef> Is `0..^10` still a valid iterator?
03:39:20disrupteksure.
03:39:54FromDiscord<Elegant Beef> Well it doesnt work
03:40:06disruptekwhat do you expect?
03:40:13FromDiscord<Elegant Beef> it to work based off the tutorial
03:40:31disruptekpaste the line of code in which you use it.
03:40:45FromDiscord<Elegant Beef> !eval for x in 0..^10: echo x
03:40:46NimBotCompile failed: /usercode/in.nim(1, 11) Error: type mismatch: got <HSlice[system.int, system.BackwardsIndex]>
03:41:16disruptekyeah, it's used as an index into an array/seq.
03:41:16PrestigeI think you wan 0..<10
03:41:22Prestigewant*
03:41:23disruptekmost likely, yes.
03:43:00*bung joined #nim
03:43:11FromDiscord<Elegant Beef> I mean the tutorial indicates it's a thing so i was curious if it's supposed to work https://media.discordapp.net/attachments/371759389889003532/746937555282427985/unknown.png
03:43:41disruptekwell, it's not an index, is it?
03:44:04disrupteki think that's poorly-worded at best.
03:44:22disruptek^ is the backwards index operator.
03:44:41disruptekyou apply it to an index to indicate that you want the index N-less from the end.
03:44:51disruptekx[^1] is the last index.
03:44:56FromDiscord<Elegant Beef> Yea i know that, i was just curious if it was supposed to work
03:44:58disruptekx[^2] is the second-to-last index.
03:45:27disruptek!eval for i in 0 ..^ 10: echo i
03:45:28NimBotCompile failed: /usercode/in.nim(1, 12) Error: type mismatch: got <HSlice[system.int, system.BackwardsIndex]>
03:46:05disrupteki dunno, you're making me wonder if it was removed recently and i just never learned it.
03:46:30disruptekomfg the hax0r is back.
03:47:12disruptek!eval for i in 0 ..< 10: echo i
03:47:14NimBot0↵1↵2↵3↵4↵5↵6↵7↵8↵9
03:47:50disrupteki have a feeling it existed and was removed.
03:48:14FromDiscord<Elegant Beef> That was my intuition aswell
03:48:22disruptekthe problem with my concepts is that i apparently cannot use a concept to define a concept.
03:48:32disrupteki mean, the same concept cannot be used to define itself.
03:48:46disruptekain't that some booolsheeit?
03:48:55disruptekso to speak.
04:02:53*vicfred quit (Quit: Leaving)
04:05:12*vicfred joined #nim
04:06:01*bung quit (Ping timeout: 258 seconds)
04:06:01*supakeen quit (Quit: WeeChat 2.9)
04:06:35*supakeen joined #nim
04:13:13*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
04:13:21*njoseph joined #nim
04:18:30*bung joined #nim
04:40:31*solitudesf joined #nim
04:43:25*audiofile quit (Ping timeout: 240 seconds)
05:03:11*NimBot joined #nim
05:14:45*letto quit (Quit: Konversation terminated!)
05:15:29*letto joined #nim
05:50:11*arecacea1 quit (Remote host closed the connection)
05:50:40*arecacea1 joined #nim
05:51:53*Zectbumo joined #nim
06:37:25*Cthalupa quit (Ping timeout: 240 seconds)
06:38:28*Cthalupa joined #nim
06:56:35*icyphox joined #nim
06:56:55icyphoxWhat's a good way to parse multipart/form-data in Nim?
07:00:33FromDiscord<vieru> hi
07:00:50FromDiscord<vieru> i still cant get openssl with static linking to work :/
07:03:38FromDiscord<Rika> maybe try https://github.com/kaushalmodi/hello_musl ?
07:05:29FromDiscord<vieru> isn't this linux only ?
07:08:16FromDiscord<Rika> musl can be used on windows
07:12:57FromDiscord<vieru> do i just download it or how can i install it ?
07:13:10FromDiscord<vieru> sry for those noob questions
07:16:19FromDiscord<Rika> i cant help there since i dont use windows anymore
07:16:38FromDiscord<Rika> (i dont know)
07:17:41FromDiscord<vieru> oh well fuck
07:17:50FromDiscord<vieru> ill just click things till they work
07:32:58eerymusl is linux only. It would probably work within WSL(2), though. Not with win32/msvc
07:33:18*k0mpjut0r joined #nim
07:38:38FromDiscord<vieru> now im trying https://github.com/genotrance/nimssl↵mby this will help
07:57:33*hnOsmium0001 quit (Quit: Connection closed for inactivity)
08:17:08*fowl_ quit (Read error: Connection reset by peer)
08:17:12*fowl quit (Read error: Connection reset by peer)
08:17:39*kwilczynski quit (Read error: Connection reset by peer)
08:17:57*sirn quit (Read error: Connection reset by peer)
08:20:09*sirn joined #nim
08:21:21*kwilczynski joined #nim
08:22:15*fowl_ joined #nim
08:22:20*fowl joined #nim
08:59:40FromGitter<gogolxdong> Anyone works on developping Android App in Nim?
09:00:15FromGitter<gogolxdong> Developping on mobile phone in general.
09:00:23*reversem3 quit (Quit: Idle for 30+ days)
09:02:11FromGitter<gogolxdong> Noticed dali, hellomello, nim-adb, want to run a http server on mobile phone as simply as possible, have to build app with React Native or Flutter for now.
09:02:47FromGitter<gogolxdong> They are too heavy.
09:03:27*drewr quit (Ping timeout: 244 seconds)
09:04:10Zevvconsider running in termux, tis pretty lightweight and very unixy
09:04:32Zevvbut its not really "apps" your making then
09:05:07*rridley[m] quit (Quit: Idle for 30+ days)
09:05:07*swamptest1[m] quit (Quit: Idle for 30+ days)
09:05:56*drewr joined #nim
09:09:30FromDiscord<jseb> hello, is is possible to use Jester (with nginx as proxy) to upload very big files ? (say, 1 gigabyte)↵I have read the forum and it seems the correct method would be to use Jester with websockets
09:09:46FromGitter<gogolxdong> Heard that the linux kernel Android opensource project doesn't use glibc, so there is much trouble to run c-like thing on Android.
09:10:49FromGitter<gogolxdong> the linux kernel Android based on.
09:11:02FromDiscord<Yardanico> No, it's not about the kernel
09:11:15FromDiscord<Yardanico> Kernel has nothing to do with the C library
09:11:19FromGitter<gogolxdong> Fee like want to write a mobile phone OS
09:11:28FromDiscord<Yardanico> But yes, Android uses bionic
09:11:56FromDiscord<Yardanico> But no one stops you from statically linking with musl for some terminal applications
09:13:39FromGitter<gogolxdong> It sounds tricky to me. Can you run a http server directly on mobile phone, or have to work within Android context?
09:16:34FromGitter<gogolxdong> Has Ubuntu mobile OS failed?
09:17:46*Zectbumo quit (Remote host closed the connection)
09:18:15FromDiscord<Elegant Beef> Ubuntu Ports exist
09:18:16FromDiscord<Elegant Beef> (edit) 'exist' => 'exists'
09:21:34FromGitter<gogolxdong> Is it still working? The most important thing is the baseband driver for 5G chipsets. They are integrated with mobile OS.
09:23:13FromDiscord<Elegant Beef> It only supports specific phones offically
09:24:31FromGitter<gogolxdong> It reads as only supports specific 5G baseband chipset.
09:31:54*icyphox quit (Quit: catch you on the flipside :^))
09:40:44*icyphox joined #nim
10:07:37Zevvgogolxdong: bionic is a fairly standard libc, so thats not your problem
10:08:09Zevvyou can write normal c or c++ code and run that as android service, no problem
10:08:38Zevvbut you cant make c++-only apps though, there alway needs to be the bare java stuff to make it an "app" in the android sense
10:19:47*krux02 joined #nim
10:24:42FromDiscord<kodkuce> hmm, c# like static classes in nim would be like just make some object and set it as global variable right?
10:25:36FromGitter<gogolxdong> no need to make app considering what I need is only a http server running on ipv6 address of mobile phone, how can I achieve that?
10:26:01Zevvlike i said: termux is your easiest way to go
10:26:23Zevvif you want to make an android service type server, you need root to be able to install & run it
10:26:29Zevvfor termux, you can do it all as a user
10:26:36Zevvand have a friendly development environment
10:32:02FromGitter<gogolxdong> Is it Android NDK?
10:32:15FromGitter<gogolxdong> The Android NDK is a toolset that lets you implement parts of your app in native code, using languages such as C and C++. For certain types of apps, this can help you reuse code libraries written in those languages.
10:32:31FromGitter<gogolxdong> I think it's an android service type server.
10:32:53Zevvtermux is not ndk
10:33:17Zevvyou can do ndk, but like i said, you still need some java
10:47:47*ja0nz joined #nim
10:57:22*bouzu_ joined #nim
11:09:21FromDiscord<lakmatiol> sent a code paste, see https://play.nim-lang.org/#ix=2uZK
11:12:59FromDiscord<lqdev> sent a code paste, see https://play.nim-lang.org/#ix=2uZM
11:13:14*apahl quit (Ping timeout: 244 seconds)
11:13:24FromDiscord<lakmatiol> ah, that is quite nice
11:13:46FromDiscord<lqdev> you can always create a custom iterator out of it if you want to
11:14:25*apahl joined #nim
11:18:22FromDiscord<lakmatiol> how do I create a range backwards, like `10..0`
11:19:26FromDiscord<lakmatiol> ah, countdown
11:21:03*tane joined #nim
11:30:26*lritter joined #nim
11:36:39bunghow to check Duration is negtive ?
11:37:43FromDiscord<Rika> if it is less than `DurationZero`
11:37:54FromDiscord<Rika> (DurationZero can be found in times module i think)
11:38:15FromDiscord<Rika> yeah https://nim-lang.org/docs/times.html#DurationZero
11:38:23bungyeah there is , thank you!
11:40:20*fredrikhr quit (Read error: Connection reset by peer)
11:40:53*fredrikhr joined #nim
11:46:03*fredrikhr quit (Read error: Connection reset by peer)
11:46:23*fredrikhr joined #nim
11:56:51FromDiscord<vieru> i still can't get openssl with static linking to work :/
11:59:46leorizeyou're on windows, correct?
11:59:52FromDiscord<vieru> yep
11:59:52leorizehow are you doing the static linking?
12:00:06FromDiscord<vieru> `nim c -d:ssl -p:. --dynlibOverride:ssl --passL:-Lsrc\\lib\\more\\openssl\\lib --passL:-lcrypto --passL:-lssl -r tssl.nim`
12:00:10FromDiscord<vieru> like this
12:00:19FromDiscord<vieru> is this what youre referring to ?
12:00:24leorizeyep
12:00:38leorizetry forward slash instead
12:00:47FromDiscord<vieru> 1sec
12:01:34FromDiscord<vieru> doesn't make any difference
12:01:37FromDiscord<vieru> ```↵could not import: OpenSSL_version_num↵Error: execution of an external program failed↵```
12:02:10leorizewhat version of openssl do you have?
12:02:30FromDiscord<vieru> i think its 1.1.1g
12:02:36FromDiscord<vieru> lemme check
12:03:06*fredrikhr quit (Read error: Connection reset by peer)
12:03:20*fredrikhr joined #nim
12:03:28FromDiscord<vieru> openssl-1.1.1g-win64-mingw
12:03:45FromDiscord<vieru> i've downloaded a precompiled one
12:03:54FromDiscord<vieru> cus i can't get perl to work
12:03:59FromDiscord<vieru> to compile my own version
12:04:17leorizeadd --dynlibOverride:crypto
12:04:53FromDiscord<vieru> like this ?
12:04:56FromDiscord<vieru> ```↵nim c -d:ssl -p:. --dynlibOverride:ssl --dynlibOverride:crypto --passL:-Lsrc/lib/more/openssl/lib --passL:-lcrypto --passL:-lssl -r tssl.nim↵```
12:05:00leorizeyep
12:05:07FromDiscord<vieru> same output
12:05:33leorizetry --dynlibOverrideAll -d:noOpenSSLHacks then
12:06:02*supakeen quit (Quit: WeeChat 2.9)
12:06:43*supakeen joined #nim
12:06:44FromDiscord<vieru> should i keep `--dynlibOverride:ssl --dynlibOverride:crypto` ?
12:07:03leorizeyou don't have to keep those
12:07:09leorizenot that it hurts to have them :P
12:07:51FromDiscord<vieru> i've got some big error thingy
12:07:57FromDiscord<vieru> imma do -f
12:08:02FromDiscord<vieru> mby it fixes it
12:08:10leorizethat sounds like progress :P
12:08:37FromDiscord<vieru> https://hastebin.com/eriyiqeqig.cs
12:08:44FromDiscord<vieru> that's the error
12:08:57*luis_ joined #nim
12:09:03leorizeoh yea ofc that won't work, you're on windows...
12:09:21*PMunch joined #nim
12:09:24leorizelet's try this instead, keep the dynliboverrides, then remove all `passL`
12:09:49leorizeif it couldn't link due to missing symbols then we know that the overrides are working
12:10:19FromDiscord<vieru> `nim c -f -d:ssl -p:. --dynlibOverride:ssl --dynlibOverride:crypto -r tssl.nim`
12:10:34leorizeyea
12:10:58FromDiscord<vieru> sent a code paste, see https://play.nim-lang.org/#ix=2v00
12:11:14FromDiscord<vieru> same output every fucking time
12:11:36leorizelooks like the overrides are being ignored
12:12:41FromDiscord<vieru> sent a code paste, see https://play.nim-lang.org/#ix=2v01
12:12:42FromDiscord<vieru> if it helps
12:12:56FromDiscord<vieru> gcc if from nim's website
12:13:00FromDiscord<vieru> (edit) 'if' => 'is'
12:13:25luis_Hi all, I am trying to convert c code into nim with c2nim, the tool complains of ; missing: /home/luis/Documents/OneDrive/Coding/Nim/Learning/miniToxNim/minitoxnim.c(68, 55) Error: expected '
12:13:27luis_;'
12:13:50luis_sorry, the error is Error: expected ';'
12:13:58luis_how can I debug this?
12:14:16luis_seems to be simple, but I have no idea on C api
12:14:45luis_and this is the file: https://github.com/hqwrong/minitox/blob/master/minitox.c
12:16:11FromGitter<kingramx> Hello Guys
12:16:11*fredrikhr quit (Read error: Connection reset by peer)
12:16:39leorize@vieru looks like the dynlibOverride algo isn't tuned for windows... let me see if I can produce an override string that'd trigger it
12:16:55*fredrikhr joined #nim
12:17:39FromDiscord<vieru> thank you so much↵this bs had me pulling my hair
12:21:35*fredrikhr quit (Read error: Connection reset by peer)
12:21:49*fredrikhr joined #nim
12:23:01*luis_ quit (Quit: luis_)
12:23:32*luis_ joined #nim
12:23:49leorizeok this is a terrible way but maybe it'd work: --dynlibOverride:ssl- --dynlibOverride:crypto- -d:sslVersion:"("
12:24:02leorizemind the trailing slashes
12:24:37FromDiscord<vieru> ok imma try it rn
12:24:48FromDiscord<ache of head> luis_: this doesn’t seem to be the file the error is referencing.
12:25:08FromDiscord<vieru> `nim c -f -d:ssl -p:. --dynlibOverride:ssl --dynlibOverride:crypto -d:sslVersion:"(" -r tssl.nim`
12:25:32FromDiscord<vieru> sent a code paste, see https://play.nim-lang.org/#ix=2v06
12:25:44leorizethe `-` at the end of `ssl` and `crypto` matters, please add them
12:26:06FromDiscord<vieru> oh f
12:26:51luis_I renamed it a bit...
12:26:54FromDiscord<vieru> https://hastebin.com/gizakotere.coffeescript
12:27:19luis_ache of head: I renamed it a bit
12:27:53leorizeluis_: see #def and #pp: https://github.com/nim-lang/c2nim/blob/master/doc/c2nim.rst#def-directive
12:28:07leorizec2nim don't evaluate C macros by default
12:28:25luis_oh, ok, thanks
12:28:31leorize@vieru: it's working, now add the passL back
12:29:16leorizeyou might want to do it like this --passL:-L/path/to/ssl --passL:-Bstatic --passL:-lssl --passL:-lcrypto --passL:-Bdynamic
12:29:17*rockcavera quit (Remote host closed the connection)
12:29:21FromDiscord<vieru> sent a code paste, see https://play.nim-lang.org/#ix=2v09
12:29:37FromDiscord<vieru> i ran↵`nim c -f -d:ssl -p:. --dynlibOverride:ssl- --dynlibOverride:crypto- -d:sslVersion:"(" --passL:-Lsrc/lib/more/openssl/lib --passL:-lcrypto --passL:-lssl -r tssl.nim`
12:30:28FromDiscord<vieru> after i ran ↵`nim c -f -d:ssl -p:. --dynlibOverride:ssl- --dynlibOverride:crypto- -d:sslVersion:"(" --passL:-Lsrc/lib/more/openssl/lib --passL:-Bstatic --passL:-lssl --passL:-lcrypto --passL:-Bdynamic -r tssl.nim`
12:30:36FromDiscord<vieru> i got this
12:30:41FromDiscord<vieru> sent a code paste, see https://play.nim-lang.org/#ix=2v09
12:30:52leorizeadd -d:noOpenSSLHacks
12:31:03*waleee-cl joined #nim
12:31:15FromDiscord<vieru> before dynlib overrides is ok ?
12:31:22leorizeyea
12:31:22FromDiscord<vieru> or it doesnt matter
12:31:32leorizeit doesn't matter
12:32:00FromDiscord<vieru> `nim c -f -d:ssl -p:. -d:noOpenSSLHacks --dynlibOverride:ssl- --dynlibOverride:crypto- -d:sslVersion:"(" --passL:-Lsrc/lib/more/openssl/lib --passL:-Bstatic --passL:-lssl --passL:-lcrypto --passL:-Bdynamic -r tssl.nim`
12:32:11FromDiscord<vieru> sent a code paste, see https://play.nim-lang.org/#ix=2v0b
12:32:12FromDiscord<vieru> this worked
12:32:29leorizeplease file a bug report on how absurd it is to get this working on windows :P
12:32:57FromDiscord<vieru> on github ?
12:33:02leorizeyep
12:33:19FromDiscord<vieru> ok imma try
12:33:23FromDiscord<vieru> thank you
12:33:46leorizenp :)
12:34:12*evilkhaoskat joined #nim
12:34:17FromDiscord<vieru> what's you gh↵i want to tag you
12:34:25FromDiscord<vieru> you found this
12:34:27leorizealaviss is the name
12:34:58FromDiscord<vieru> thanks again, imma file the report rn
12:35:44leorizepeople don't usually do static linking on windows, which is probably why it's broken there for so long :P
12:37:51FromDiscord<vieru> that may be the cause↵ive also tried opencv but i couldn't get it to work
12:38:10*evilkhaoskat quit (Client Quit)
12:40:36*euantor is now known as euantorano
12:42:01*euantorano quit ()
12:42:15*euantorano joined #nim
12:46:49FromDiscord<vieru> leorize: here we go again
12:46:57FromDiscord<vieru> https://media.discordapp.net/attachments/371759389889003532/747074396551905370/unknown.png
12:47:10FromDiscord<vieru> i've sent tssl.exe to my friend
12:47:27leorizeseems like the static linking didn't statically link :P
12:47:33FromDiscord<vieru> yep
12:47:42FromDiscord<vieru> 400k executable size
12:47:45FromDiscord<vieru> (edit) '400k' => '400kb'
12:47:56leorizechange your passL to this: `--passL:/path/to/libssl.a --passL:/path/to/libcrypto.a`
12:48:06leorizethis should force gcc to do static linking
12:48:18FromDiscord<vieru> ok 1 sec
12:49:48FromDiscord<vieru> `nim c -f -d:ssl -p:. -d:noOpenSSLHacks --dynlibOverride:ssl- --dynlibOverride:crypto- -d:sslVersion:"(" --passL:-Lsrc/lib/more/openssl/lib --passL:-Bstatic --passL:src/lib/more/openssl/lib/libssl.a --passL:src/lib/more/openssl/lib/libcrypto.a --passL:-Bdynamic -r tssl.nim`
12:49:53FromDiscord<vieru> is this ok ?
12:50:05leorizeyea
12:50:14leorizeyou no longer need the -L and -Bstatic/dynamic
12:51:25FromDiscord<vieru> i've got this error
12:51:26FromDiscord<vieru> https://hastebin.com/qelixameli.coffeescript
12:51:35FromDiscord<vieru> ill try without -L and -Bstatic/dynamic
12:52:56FromDiscord<vieru> `nim c -f -d:ssl -p:. -d:noOpenSSLHacks --dynlibOverride:ssl- --dynlibOverride:crypto- -d:sslVersion:"(" --passL:src/lib/more/openssl/lib/libssl.a --passL:src/lib/more/openssl/lib/libcrypto.a -r tssl.nim`↵↵got me ↵https://hastebin.com/rujanuvoxa.coffeescript
12:54:56FromDiscord<vieru> `nim c -f -d:ssl -p:. -d:noOpenSSLHacks --dynlibOverride:ssl- --dynlibOverride:crypto- -d:sslVersion:"(" --passL:src/lib/more/openssl/lib/libssl.dll.a --passL:src/lib/more/openssl/lib/libcrypto.dll.a -r tssl.nim`
12:55:03FromDiscord<vieru> this got me no error
12:55:28FromDiscord<vieru> https://media.discordapp.net/attachments/371759389889003532/747076539790786631/unknown.png
12:55:42FromDiscord<vieru> these are the files
12:56:07FromDiscord<vieru> idk why i have libcrypto.a libcrypto.dll.a
12:56:11FromDiscord<vieru> (edit) 'idk why i have libcrypto.a ... libcrypto.dll.a' => 'idk why i have libcrypto.aand'
12:57:57*FromDiscord quit (Remote host closed the connection)
12:58:22*FromDiscord joined #nim
12:59:08FromDiscord<vieru> my friend sent me this
12:59:10FromDiscord<vieru> https://media.discordapp.net/attachments/371759389889003532/747077470208917534/unknown.png
13:00:28FromDiscord<vieru> leorize: any idea ?
13:09:36*kinkinkijkin joined #nim
13:18:22*luis_ quit (Quit: luis_)
13:18:54*arecacea1 quit (Remote host closed the connection)
13:19:17*arecacea1 joined #nim
13:23:47*luis_ joined #nim
13:32:27*Vladar joined #nim
13:41:36*ja0nz quit (Ping timeout: 265 seconds)
13:42:51*arecacea1 quit (Read error: Connection reset by peer)
13:43:25*arecacea1 joined #nim
13:59:53*krux02 quit (Remote host closed the connection)
14:00:34*krux02 joined #nim
14:02:06FromDiscord<kodkuce> whats difrence betwin int and int literal am trying to clamp some int
14:03:06FromDiscord<kodkuce> or i am writning this clamp wrong
14:03:19Yardanicothere shouldn't be any really
14:04:12FromDiscord<kodkuce> oh issue was i supplyed only clamp maximal insted minimal too
14:13:05*luis_ quit (Quit: luis_)
14:32:21*Senketsu joined #nim
14:36:18bunghow to represent datetime zero ?
14:37:57bungsee https://play.nim-lang.org/#ix=2v0L
14:46:50bungmaybe I dont need that
14:54:57*byFate` joined #nim
14:56:45FromDiscord<kodkuce> what
14:58:22bungnever mind
14:59:00*byFate` quit (Quit: OMG omG!. The Earth will explode the wicked world. Alien or Amen. https://bit.ly/33tb5lx)
14:59:25*ForumUpdaterBot quit (Remote host closed the connection)
14:59:32*ForumUpdaterBot joined #nim
15:01:40shashlick@vieru why do you have a - after ssl and crypto in the dynlib Override cap
15:01:45shashlickCall
15:02:21FromDiscord<vieru> leorize told me to try so
15:06:04FromDiscord<vieru> here's output of `nim c -f -d:ssl -p:. -d:noOpenSSLHacks --dynlibOverride:ssl --dynlibOverride:crypto -d:sslVersion:"(" --passL:src/lib/more/openssl/lib/libssl.dll.a --passL: src/lib/more/openssl/lib/libcrypto.dll.a -r tssl.nim`
15:06:14FromDiscord<vieru> sent a code paste, see https://play.nim-lang.org/#ix=2v06
15:06:25FromDiscord<vieru> and here's output of
15:06:27FromDiscord<vieru> `nim c -f -d:ssl -p:. -d:noOpenSSLHacks --dynlibOverride:ssl --dynlibOverride:crypto --passL:src/lib/more/openssl/lib/libssl.dll.a --passL: src/lib/more/openssl/lib/libcrypto.dll.a -r tssl.nim`
15:06:39FromDiscord<vieru> sent a code paste, see https://play.nim-lang.org/#ix=2v00
15:08:35shashlickDon't use dll.a files
15:09:02shashlickJust the libssl.a
15:10:42shashlickThe snippet you sent above is asking to link other windows libs
15:10:53shashlickhttps://hastebin.com/rujanuvoxa.coffeescript
15:11:24shashlickLook for those symbols on Google, it will tell you what lib they are associated with
15:13:04shashlickWSAGetLastError means you need -lWs2_32
15:13:40shashlickSince your app needs winsock
15:15:53FromDiscord<vieru> ok wait
15:16:00FromDiscord<vieru> imma open my laptop rn
15:18:57FromDiscord<vieru> sent a code paste, see https://play.nim-lang.org/#ix=2v0Z
15:19:04FromDiscord<vieru> ive added -lWs2_32
15:19:13FromDiscord<vieru> now only these ones show up
15:20:35FromDiscord<vieru> can't figure out what lib is __imp___acrt_iob_func from
15:20:40FromDiscord<vieru> (edit) '__imp___acrt_iob_func from' => '`__imp___acrt_iob_func from`'
15:22:01FromDiscord<vieru> (edit) '`__imp___acrt_iob_func from`' => '`__imp___acrt_iob_func` from'
15:29:45ForumUpdaterBotNew thread by Gavr: Does gintro need manually memory manipulations, see https://forum.nim-lang.org/t/6714
15:33:55Zevvvieru: https://stackoverflow.com/questions/30412951/unresolved-external-symbol-imp-fprintf-and-imp-iob-func-sdl2 ?
15:35:21*luis_ joined #nim
15:35:25FromDiscord<vieru> these are the only libs i can see `SDL2.lib SDL2main.lib legacy_stdio_definitions.lib`
15:35:33FromDiscord<vieru> and when i try to include them
15:35:50FromDiscord<vieru> C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lSDL2main
15:35:54FromDiscord<vieru> (edit) 'C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:' => '`C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:' | '-lSDL2main' => '-lSDL2main`'
15:36:17FromDiscord<vieru> and so on
15:36:47FromDiscord<vieru> and idk how to do this in nim
15:36:49FromDiscord<vieru> `To solve the issue, you can try defining __iob_func() yourself which should return an array containing {*stdin,*stdout,*stderr}.`
15:38:22*luis_ quit (Client Quit)
15:47:05shashlickYou are having issues since you are linking vc++ libs with mingw
15:47:11disruptekman the line noise is fierce today.
15:47:30disruptekZevv: am i supposed to be doing some cps stuff?
15:53:11*thomasross joined #nim
15:53:37FromDiscord<Hearthstone> Is there a speech-to-text lib in Nim?
15:53:59YardanicoI don't think so, you'll have better success using an online API for that
15:54:10FromDiscord<Hearthstone> Oh alright then
16:00:08Zevvdisruptek: i dont know who am i to say?
16:03:08disruptekaren't you the one that told me to take the trash out?
16:04:51Zevvi am the last one in the position to tell anyone to do anything these days
16:05:13disruptekare you lying down right now?
16:05:18Zevvsure
16:05:35Zevvi did find out eventually where all those naps came from
16:05:48disruptekyou have the 'rona?
16:06:01Zevvno, its all the whisky in my coffee, apparently
16:06:09disruptekahh, that'll do it.
16:06:14Zevvthat'll do it
16:06:41disrupteki figured out what's dumb about concepts.
16:07:00Zevvyou cant define a concept by concept
16:07:11disruptekyeah, it'd be funny if it wasn't so sad.
16:07:49Zevvbut is it really a *problem* for you?
16:08:10disruptektyping is rarely the problem.
16:08:23Zevvwell
16:08:58Zevvfor me it has been every now and then. but usually when im trying to push it a bit further then i should need to
16:09:25Zevvcpswise, im not sure what the plan should be now
16:09:44Zevvi was considering a clean room reimplementation with a zero-warn
16:09:52disrupteka wut
16:09:53Zevvand zero-break policy
16:10:13Zevvbut not sure if that makes sense to do, because it'll hit the same blocking bugs as we hit now
16:11:05disrupteki have to finish mangling before i fix any other compiler bugs.
16:11:37ZevvI had some other thoughts about things we need to support in the long run. bootstraps should be able to take captured closures into the env I think
16:11:46Zevvcaptured vars, that is
16:12:21disruptekof course.
16:12:29disrupteki don't think this is a problem.
16:12:34Zevvi was trying to implement the clojure `go` way of making a cps block, but thats typically a proc with no args taking everything from a closure
16:13:00Zevvwow i just saw it. clojure. closure.
16:13:08disrupteklol
16:13:28Zevvsometimes i wonder what the hell i think im doing
16:13:31disruptekjava+closure=clojure
16:14:06Zevvif the wrorld wouldnt be better off with me swiping the streeds or brushing donkeys or something
16:14:09disruptekmaybe whatelse -> clonure.
16:14:18Zevvnosure
16:14:33disruptekthe world would be better off with me showering, but i'm on a roll.
16:15:19Zevvirc hides a lot of the gory details
16:15:20disruptektrue.
16:15:50Zevvill see if i can move over a bit to the diner table
16:16:09Zevvi should be able to handle that
16:16:09disruptekit says a lot that i mistook rotten eggs for my brand of funk miasma.
16:17:15*NimBot joined #nim
16:17:18disruptekright.
16:17:29Zevvdrop all the unicode noise and im your man
16:17:47disruptekdude.
16:17:56disruptekyou have to turn that shit on manually.
16:18:10Zevv\o/
16:18:24*Zevv afk, talk talk later
16:18:44*disruptek laments all the donkeys with messy hair.
16:19:44FromDiscord<ache of head> I love this community so much 😆
16:19:47*ja0nz joined #nim
16:23:56*Senketsu quit (Ping timeout: 258 seconds)
16:26:47*icyphox left #nim ("WeeChat 2.8")
16:42:35FromDiscord<k1tt3hk4t> would I be correct to assume that objects in Nim will always be zero initialized, just like is the case for integers and such?
16:42:42disruptekyes.
16:42:48FromDiscord<k1tt3hk4t> ok nice, thank you
16:42:50Yardanico@k1tt3hk4t yes by default
16:42:54Yardanicoyou can tweak it of course
16:44:02FromGitter<gogolxdong> Does jester support IPv6 listening?
16:44:10FromDiscord<k1tt3hk4t> another unrelated question: when I implement =destroy and the like, do I need to make those public with * for other files to use them implicitly?
16:44:50disrupteki don't think so, but that's such an excellent question.
16:45:19disruptekyou'll find out soon enough. 😉
16:45:37FromDiscord<k1tt3hk4t> haha good point
16:45:54FromDiscord<k1tt3hk4t> I think I will just to be safe :^P
16:47:08ZevvYardanico: tweak it?
16:47:24YardanicoZevv: {.noinit.}
16:47:37YardanicoI don't think you can apply it for objects, but you can apply it for variables
16:47:40Zevvyeah ok, but I cant have it filled with 0x42 instead of 0x00 :)
16:47:46Yardanico0xDEADBEEF
16:47:53disruptekyou can alloc an object w/o alloc0.
16:47:55Zevvand the like
16:48:00Zevvtrue
16:55:43*hnOsmium0001 joined #nim
16:58:01*superbia1 joined #nim
16:59:43leorize@k1tt3hk4 you don't have to make them public
17:01:13*superbia quit (Ping timeout: 265 seconds)
17:01:42FromGitter<gogolxdong> would Android block the port of application running in Termux? I wrote a httpserver using jester and listen on the same port with App built by Flutter, later works and former doesn't.
17:01:57leorizeshashlick: I told them to use a trailing `-` due to a bug in how the compiler do dynlibOverride
17:02:02FromDiscord<k1tt3hk4t> ah cool
17:03:17FromDiscord<k1tt3hk4t> on the topic of destructors, I notice the example page for destructors on the nim-lang website doesn't call the destructor on the element previously occupying the space in the []= function... is that a bug? or is the compiler smart enough to figure out that it has to destroy the data that was previously there somehow
17:03:21FromDiscord<k1tt3hk4t> not exactly clear on how that works
17:04:29leorizeit's not a bug
17:05:20Zevvgogolxdong: I don't know, I have a sshd running in termux without problems though. Are you using a high (>1024) port number?
17:05:25FromDiscord<Hearthstone> > would Android block the port of application running in Termux? I wrote a httpserver using jester and listen on the same port with App built by Flutter, later works and former doesn't.↵gogolxdong: No Termux doesn't block the ports. It must either be the configuration or another thing blocking the ports
17:05:34FromDiscord<k1tt3hk4t> ah wait, =sink destroys the destination, ok
17:06:00leorizeyea, the point of destructors is to automagically do this stuff :P
17:06:21FromDiscord<k1tt3hk4t> xP
17:06:27leorizealso in that example the `=` behavior is defined by the contained type
17:07:18ZevvI've been trying to get started on my "nim memory" part II, which should concentrate on ARC and move semantics and all, but I have problems collecting the outlines
17:07:30Zevvthere's a lot of stuff that's related, I don't know how & where to start
17:08:32leorize[m]arc is based on destructors
17:08:34disrupteki would start with the difference between manual memory management and arc. and then you can simply explain how the compiler figures out what to do.
17:08:40leorize[m]so if you cover that first it'd be easy to transistion to arc
17:08:56disruptekthis will teach people that there is nothing scary about arc and they don't need to learn anything.
17:09:05disruptekpeople love learning that they don't need to learn.
17:09:26Zevvshould I bring in the old gc?
17:09:34disrupteki wouldn't.
17:09:53disruptekmaybe at the end. to show that the performance is better with arc.
17:10:49Zevvalso there are still things I'm not sure of myself. How arc & threads should/will play together for example
17:11:00Zevvbut I'll figure those out on the fly
17:11:20FromGitter<gogolxdong> yes. Flutter App with 8090 and jester with 8089
17:11:37disruptekit's simple.
17:11:51disruptekthere are no parts of arc that are explicitly thread-relevant.
17:11:55leorizearc uses a shared heap
17:12:02leorizeso pointer passing works just as usual
17:12:18disruptekso "moving" memory just involves isolating it so that one thread or another can take over ownership.
17:12:29disruptekit's purely compile-time, conceptually.
17:12:45leorizeyep
17:13:01Zevvbut who's taking care of the memory barriers / synchonisation
17:13:02leorizeI think the new isolated types will be used for cross thread pointer passing
17:13:04Zevvno one is, right
17:13:13*krux02 quit (Remote host closed the connection)
17:13:17Zevvyou can't just throw it over the wall
17:13:59Zevvarc will not magically allow shared memory over threads
17:13:59*krux02 joined #nim
17:14:04Zevvthere's always a price to pay for that
17:14:06disruptekit doesn't move because it was never in two places at once in the first place.
17:14:19disruptekor, it never exists in two places.
17:14:33Zevvbut that's enough
17:14:48disruptekperhaps the key realization that you need to drive home is the concept of single-ownership mutability.
17:15:03Zevvpractical example: thread A creates an string. I want thread B to have that and A forget about it
17:15:19Zevvso you're saying we dont do "share nothing" anymore
17:15:29Zevvwe will actuall pass the memory ownership between threads?
17:15:36disruptekif thread B frees it, what do you think that requires?
17:15:36leorizeyes
17:15:42leorize!rfc isolated
17:15:43disbothttps://github.com/nim-lang/RFCs/issues/244 -- 3'isolated' data for Nim 7& 1 more...
17:15:55disruptekit merely requires a free to occur in thread B. when no one is going to use it.
17:15:58Zevvit requires at *least* a mutex or memory barrier to pass the pointer from A to B
17:16:03disruptekwhy?
17:16:14ZevvHow do you share memory over threads?
17:16:18Yardanicoit's already shared
17:16:19Yardanicoshared heap
17:16:30Yardanicoyou just "transfer" the ownership from one thread to another
17:16:37Zevvthat's a common misconception
17:16:43leorizenote that in ARC you don't "share" memory
17:16:46Zevvwhat if A has a pointer that's still in cache
17:16:52Zevvand B has a stale cache line
17:16:59Zevvthat's where locks or barriers come in
17:17:06ZevvNUMA memory is even worse
17:17:17disruptekit's a common misconception that ducks have corkscrew penises.
17:17:29Zevvthey don't?
17:17:35ZevvI learned that crabs have 2
17:17:41Zevvbut back to the subject
17:17:46federico3nim doc -o:./htmldocs --project --index:on src/regex.nim is not including the CSS file - any hint?
17:18:03Zevvthere's locality problems when sharing data over threads, no matter how you do your memory management
17:18:15Zevvif you alloc manually it's also there
17:18:31leorizefederico3: the compiler likely didn't figure out where the css was
17:18:35leorizewe need to make this configurable
17:18:43federico3it's probably still https://github.com/nim-lang/Nim/issues/14424 :(
17:18:44disbotMissing documentation on nimdoc.css
17:18:45disruptekZevv: what you're saying really doesn't make sense; i promise.
17:18:48ZevvI had exactly this discussion with my $team a few weeks ago. It was me against 5 seniors. I felt stupid in the end but man was I right
17:19:08leorizewell prime material for nim memory ii then :P
17:19:12Zevvdisruptek: you are thread D, I am thread Z. I write something to my "memory", yes?
17:19:13disrupteklet's say memory is allocated and its address is JEFF.
17:19:18Zevvyou think we share the same memory
17:19:28disruptekno, you are already too far ahead.
17:19:33Zevvbut on my core I might have this data available at that address, but you might not
17:19:37disruptekthis is all figured out at compile-time.
17:19:46Zevvit might linger in cache. It might be stashed in local NUMA memory.
17:20:20Zevvyou *need* to lock it when writing. and you *need* to lock it with the lock when reading
17:20:36YardanicoI don't think you should actually care about the CPU, should you? you should only care about the RAM
17:20:43Yardanicocpu is a kind of "black box" which does it's own thing
17:20:47disruptekactually, he's right about this part.
17:20:51leorizeyea
17:20:58Zevvman am I right. I had this fight so hard the other day
17:21:08ZevvI was shouting out crying hot tears
17:21:16disruptekoh dear.
17:21:19federico3https://en.wikipedia.org/wiki/Memory_barrier
17:21:21Zevvand people going "huh what the hell is this dude rambling about"
17:21:28Zevv"we always did it like this"
17:21:42disruptekwell, people have been "doing it wrong" for a long time.
17:21:48disruptekit's kinda what we do.
17:22:01disruptekdon't get me started on corkscrew cocks.
17:22:03ZevvI even went to mratsim to ask for solid literature to back my case
17:22:41disruptekraces aren't something you should cover in section II.
17:22:49Zevvanyway, my point was: this is not something ARC is involved with
17:23:01Zevvarc does not do atomic ref counts, or does it?
17:23:07Zevvbecause these are expensive as hell
17:23:11disruptekit's something that could be added into isolate if it isn't there yet.
17:23:17disruptekbut i don't know; i haven't followed isolate.
17:23:22Zevvneither have i
17:24:00disruptekanyway, ignore this part of the tutorial.
17:24:18leorizeisolate don't allow refs to be passed atm
17:24:29Zevvyeah but people have heart the rumours about arc offering a shared heap. so these questions will have to be addressed somewhere. But sure, I can postpone that
17:25:08leorizeyou already saw that most don't understand that shared heap is not the end game :P it needs it's own article to address why
17:25:20Zevvhaha
17:25:38disruptekright, and it's just one leg of the stool.
17:25:49disruptekdon't get me started on corkscrew stools.
17:26:07*superbia1 is now known as superbia
17:27:07disruptekit doesn't do atomic rc because it's not needed.
17:27:15leorizeweave does implement memory barriers so we have that as a base to wrap refs
17:27:51disruptekwe have memory barries in stdlib, iirc.
17:28:21*kitech1 quit (Quit: ZNC 1.7.5 - https://znc.in)
17:28:23disruptekanyway, it's like 6 lines of code.
17:28:47*kitech1 joined #nim
17:28:52Zevvmratsim is the only one I trust on this :)
17:29:28leorizenow I have to go and give all of this an in-depth read because as I expected, I still don't know enough to use threads :P
17:29:32ZevvI made the delibrate decision not to use threads ever again about 10 years ago and stood by it
17:29:38disruptekrude.
17:29:50Zevvwell, that was kind of the cool thing with this discussion I had at my customer with all the seniors
17:30:10ZevvI don't use threads because I'm not smart enough and I'm sure i don't understand everything well
17:30:11disruptekthreads are like crypto. you shouldn't be afraid to use them unless you know enough to be afraid of your use.
17:30:26Zevvgood analogy
17:31:24leorizemratsim will save us with weave :P
17:31:33Zevvnah man, weave is just for the 1%
17:31:39Zevvthe other 99% need threads for I/o
17:31:45leorizenow I feel like learning rust because they appear to have commoditized threads
17:31:59Zevvthat's one of the main reasons to use rust indede
17:32:04Zevvthey got your back
17:32:05disrupteki used to think weave would save us but now it's all about arc+cps.
17:32:08federico3sigh
17:32:10Zevvbut you pay a price
17:32:34leorizeI have only dabbled around rust pre-1.0
17:32:44leorizethe language still looks ugly as hell but I need to know threads
17:32:45disruptekgo is even easier and more expensive.
17:32:55ZevvI was pretty flabbergasted by go. They have this cool concept with channels and share-nothing so the newbies at google would no long write stupid code. But then you find they do _nothing_ to prevent goroutines accessing each others data or globals
17:33:14Zevvso in the end you are just making the same rubbish code again.
17:33:20federico3A lot of application switch often between being CPU-bound, disk and network-bound. We need abstractions that fit this use-case
17:33:38disruptekhence cps.
17:33:54disruptekcps can move continuations between threads adhoc.
17:34:01Zevv*but*
17:34:15Zevv- let's talk about the implications of that later
17:34:33disruptekwell, sure.
17:36:09disruptekfwiw, our csp is gonna suffer the same flaws as go's channels.
17:36:30disruptekin nim's case, these aren't flaws, but you'll be able to make the same criticism in any event.
17:37:10Zevvwell, not really
17:37:31Zevvdid you try weave? The hoops you have jump through to tell Nim to Shut The Feck Up?
17:37:38Zevvyou need to move your data around in ptrs
17:37:51disruptekit's just not what i want.
17:37:52Zevvbecause nim will go "no no" on you all the time with .gcsafe.
17:37:59FromDiscord<k1tt3hk4t> is there a way to denote that a function returns ownership of a resource without requiring a copy? for instance I want to implement a "pop" function for my data structure, and obviously said data structure will no longer hold any reference to it
17:38:00Zevvthat's your protection. You can't just go share data.
17:38:18leorizearaq is putting infrastructure in place to let weave deal with refs
17:38:41leorizebut mratsim seems to be busy on other stuff atm so we will have to wait
17:39:33Zevvk1tt3hk4t: Nim is often able to infer that, but the safest is to use the "result" variable for returning data should, it implise NVRO
17:39:42Zevvleorize: that is pretty cool
17:39:57FromDiscord<k1tt3hk4t> ah ok, nice
17:39:57FromDiscord<k1tt3hk4t> ty
17:39:58leorizedon't quote me on that though, I'm not 100% sure
17:40:29Zevv /implies/
17:41:48Zevvk1tt3hk4t: if you dare you could also use nim's new "arc" memory management model, there's a lot of infering in place for proper moves there.
17:41:56Zevv--gc:arc
17:42:11leorize--gc:orc if unsure if you have cycles
17:42:35FromDiscord<Recruit_main707> can concepts have fields?
17:42:40disruptekno.
17:42:48FromDiscord<Recruit_main707> ok
17:43:06Oddmongeris it interesting using --gc:none , for perfs ?
17:43:17FromDiscord<Recruit_main707> not really
17:43:27FromDiscord<k1tt3hk4t> friendship ended with cyclic data structures, now array backed graphs are my best friend
17:43:43YardanicoOddmonger: not with arc :)
17:43:50FromDiscord<Recruit_main707> regions is gc:none on steroids, but arc is already nuts
17:56:18*arecacea1 quit (Remote host closed the connection)
17:57:13FromDiscord<lakmatiol> is there a modulo operator, such that `-1 % 5 = 4`
17:57:27FromDiscord<Recruit_main707> `mod`
17:58:00FromDiscord<Recruit_main707> there is also `mod` for floats in the math module if you need to use it with floats
17:58:21*arecacea1 joined #nim
17:58:23FromDiscord<lakmatiol> that is the remainder, not modulo, at least according to the docs VSC is showing me https://media.discordapp.net/attachments/371759389889003532/747152769718157312/unknown.png
17:59:05*solitudesf quit (Remote host closed the connection)
17:59:09FromDiscord<lakmatiol> I guess I can do `(k + 5) % 5`
17:59:14FromDiscord<lakmatiol> (edit) '%' => 'mod'
17:59:35FromDiscord<lakmatiol> (not in the general case, but in this one it will work)
17:59:54*natrys joined #nim
18:00:42leorizehttps://nim-lang.org/docs/math.html#floorMod,T,T
18:00:53*solitudesf joined #nim
18:02:21FromDiscord<lakmatiol> thanks
18:02:50*kungtotte quit (Read error: Connection reset by peer)
18:03:08*kungtotte joined #nim
18:06:52*bung quit (Quit: Lost terminal)
18:10:56*solitudesf quit (Remote host closed the connection)
18:11:23ZevvUhm does 'arc' mean "ar4qs reference counting" or something similar?
18:11:34Zevvand 'orc' is called 'orc' because the 'o' is a circle?
18:11:45disruptekyep.
18:11:53Zevvman that's so bad
18:11:58ZevvI even guessed both right
18:12:13Zevvi probable heard that somewhere
18:16:21*solitudesf joined #nim
18:19:37*endragor quit (Remote host closed the connection)
18:27:34*endragor joined #nim
18:32:18*endragor quit (Ping timeout: 256 seconds)
18:34:59ZevvWhat are the different ways by with one can "lose" a ref
18:35:07disruptekwut
18:35:08Zevvit can get out of scope. The object of which it was a part can be deleted
18:35:38disruptekrefs shouldn't be lost; that's what makes them refs.
18:35:58Zevvok, not "lost", but dereffed, causing the refcounter to decrease
18:36:07disruptekyou called it.
18:36:13ZevvWith old-style GC, if I overwrite a pointer with zeros
18:36:22Zevvthe GC will scan the stack, find the pointer is gone and free the memory
18:36:37Zevvnot something that should happen of course, but stil
18:36:40disruptekde-ref'ing is the tried-and-true method to reduce pesky reference counts.
18:36:41FromDiscord<Clyybber> Zevv: Are you talking about memory synchronization across threads?
18:36:54Zevvclyybber: no I dropped that because everybody is stupid and I am smart
18:37:07Zevvor was it the other way around? dang, I forgot
18:37:21ZevvI got started with my "nim memory" part II
18:37:34ZevvI want to make a readable writeup about arc
18:37:38FromDiscord<Clyybber> oh, i was scrolled up so saw the past
18:37:56Zevvyeah, that was one of the things, I will readlly definately get back to you about that
18:38:07Zevvbecause that deserves either a section, or a dedicated part III
18:41:02FromDiscord<Clyybber> we probably need to do a barrier on thread move
18:41:35FromDiscord<Clyybber> so that the thread its getting passed to sees the uptodate state of the memory
18:41:37disruptekit needs a part 3, honestly.
18:41:48FromDiscord<Clyybber> thats what you were getting at zevv?
18:42:05Zevvyeah
18:42:49Zevvbut what will not be the responsibility of ARC I guess
18:43:00FromDiscord<Clyybber> not sure
18:43:18disruptekit will, afaict.
18:43:22Zevvwell, part of the fun you then get is that your destructors will also run in whatever thread happens to trigger the last deref
18:43:26FromDiscord<Clyybber> not of the compiler
18:43:34FromDiscord<Clyybber> but of the stlib
18:43:51Zevvoh probably the stdlib, sure
18:44:06FromDiscord<Clyybber> Zevv now youre jumping ahead of me
18:44:09FromDiscord<Clyybber> what deref
18:44:15FromDiscord<Clyybber> and what destructors
18:44:34ZevvI have a `=destroy` for a thing in thread A
18:44:40Zevvthread A throws the thing over the wall to thread B
18:44:52ZevvAnd B loses the ref so thing can be destroyed
18:44:53FromDiscord<Clyybber> ok
18:44:53Zevvright
18:44:59FromDiscord<Clyybber> no
18:45:05Zevvgood
18:45:05FromDiscord<Clyybber> A doesn't destroy it
18:45:07Zevvexplain it to me
18:45:09FromDiscord<Clyybber> only B does
18:45:11Zevvright
18:45:14Zevvthat's what I mean
18:45:22Zevvso the =destroy will run in context of thread B
18:45:25FromDiscord<Clyybber> A zeros out its pointer, that disables the destroy
18:45:31Zevvsure
18:46:27Zevvso it's all fun and games, until my =destroy does something funky and I was not propared to have it run from a different thread
18:46:35FromDiscord<Clyybber> well
18:46:38disruptekdon't be rude.
18:46:46FromDiscord<Clyybber> ypur destroy shouldn't care
18:46:52disruptekobviously.
18:47:05Zevvno it should not. But this distroy will probably live in a lib someone made and I happen to use
18:47:12FromDiscord<Clyybber> well
18:47:15disruptekso what.
18:47:19FromDiscord<Clyybber> i don't forbid bad code
18:47:32Zevvnot complaining, but it's just that some of these things will just still be there
18:47:33disruptekall threads will be on equal footing as far as arc goes.
18:47:33FromDiscord<Clyybber> don't send that stuff over threads then
18:47:48FromDiscord<Clyybber> Zevv: if you have a 'solution'?
18:48:21disruptekfree it in the thread in which you want to free it; then that'll be the last write.
18:48:27FromDiscord<Clyybber> you can implement your own destroy that sends it back to the main thread to destroy
18:48:54Zevvno solutions, just wanted to mention that you still have to sit on your hands before you type
18:49:10Zevvit's a shared heap, but you still need all the infrastructure to properly handle that
18:49:21Zevv"of course" you say
18:49:22disrupteklet him fix cps first.
18:49:24Zevv"of course" I say
18:49:31Zevvwhat are you fixing?
18:49:34Zevvcps I hear?
18:49:39FromDiscord<Clyybber> well
18:49:44disruptek#5691 or w/e
18:49:45disbothttps://github.com/nim-lang/Nim/issues/5691 -- 3The StmtList processing of template parameters can lead to unexpected errors ; snippet at 12https://play.nim-lang.org/#ix=2tef
18:49:48FromDiscord<Clyybber> currently i don't do anthing
18:49:56FromDiscord<Clyybber> other than cook
18:49:59Zevvclyybber: sure, and that is perefectly fine
18:50:05disruptekno it's not.
18:50:10FromDiscord<Clyybber> lol
18:50:24Zevvit is, because I am on holiday and I'm having a special coffee
18:50:29FromDiscord<Clyybber> good news is I got a good fix
18:50:38Zevvman I got my last good fix years ago
18:50:47FromDiscord<Clyybber> bad news is I need to implement error handling
18:50:51FromDiscord<Clyybber> for shadow scopes
18:51:09Zevvcan't you just not make any errors?
18:51:15FromDiscord<Clyybber> sure
18:51:16Zevvjust say no to errors
18:51:42FromDiscord<Clyybber> see if you do this echo (var a; 1)
18:51:57Zevv!eval echo (var a; 1)
18:51:58NimBotCompile failed: /usercode/in.nim(1, 12) Error: ':' or '=' expected, but got ';'
18:52:21FromDiscord<Clyybber> nitpicky
18:52:44Zevvwhat's cooking then?
18:52:50FromDiscord<Clyybber> now if echo is a proc then we don't want a scope there
18:53:03FromDiscord<Clyybber> Zevv: gulash
18:53:08Zevv\o/
18:53:14Zevvexcellent choice
18:53:22FromDiscord<Clyybber> :D
18:53:25*Zevv afk readread
18:53:49FromDiscord<Clyybber> and if there isn't a scope then var a may be a redeclaration
18:53:55FromDiscord<Clyybber> but if echo is a template
18:54:00FromDiscord<Clyybber> with a typed param
18:54:20FromDiscord<Clyybber> then we don't want a redecleration error
18:54:33FromDiscord<Clyybber> so conceptually we want a scope
18:55:11FromDiscord<Clyybber> but we can't decide wether we want a scope or not, because we don't know what we are calling yef
18:55:18FromDiscord<Clyybber> (edit) 'yef' => 'yet'
18:59:36*endragor joined #nim
18:59:41*Zectbumo joined #nim
19:01:56FromDiscord<haxscramper> I made macro proof-of-concept macro library for automatically deriving traits (like in rust) - https://github.com/haxscramper/nimtraits . Can someone give general comments on the idea or implementation or whatever you want to comment on
19:02:38FromDiscord<haxscramper> There is only `Eq`, `Hash` and some basic getter/setter validator - I just want to test the Idea
19:03:29kinkinkijkinalright, i have an es2 helper library that compiles now
19:03:33FromDiscord<haxscramper> I also want to automatically derive constructor for `initT` but don't really know how to declare constructors for case objects so it would be simple to use
19:04:26FromDiscord<haxscramper> If anyone has some 'this would be cool to do' ides I might try implement it
19:04:35disruptekyou have to do it manually right now.
19:05:35FromDiscord<haxscramper> Yes, and I don't particularly like it tbh. Especially if I have some kind of field where zero-filled is not a valid value.
19:05:44FromDiscord<haxscramper> Oh, and right now I also support immutable fields
19:05:49FromDiscord<Hearthstone> If Nim had an error handler like Rust
19:05:52FromDiscord<Hearthstone> That'd be cool
19:06:02Yardanicowhy?
19:06:05FromDiscord<haxscramper> I don't really think it is all that nice
19:06:23FromDiscord<haxscramper> You basically have to write all error handling over and over again, each time
19:09:04*endragor quit (Ping timeout: 256 seconds)
19:10:03FromDiscord<demotomohiro> @treeform
19:10:04FromDiscord<demotomohiro> I wrote this issue about your flippy repo.↵https://github.com/treeform/flippy/issues/26↵Any comment?
19:10:06disbotLoops in flippy access memory discontinuously ; snippet at 12https://play.nim-lang.org/#ix=2v2l
19:13:55FromGitter<Knaque> I want to make an object where all of its fields should be readable anywhere, but they can only be modified by custom procs. An example of what I mean. (https://hastebin.com/cazetebubo.nim) Is this possible?
19:14:09disrupteksure.
19:15:23FromGitter<Knaque> How might I do that? It's probably something obvious, so I'm prepared to slap myself in the face if that's the case.
19:15:47disruptekhow evil are you prepared to get?
19:15:58disruptekhow little do you trust your users, i mean?
19:17:40FromGitter<Knaque> Well, I'm basically making a module for personal use, but whenever I do I always want to make it as purpose-built and strict as possible since I often make them public anyway. So yes, I am prepared to be super evil.
19:18:00*bouzu_ quit (Quit: Leaving)
19:18:30FromDiscord<demotomohiro> https://play.nim-lang.org/#ix=2v2p
19:18:37FromDiscord<demotomohiro> @Knaque
19:19:32Zevvclyybber: back, let me readup on your echo (var a; 1)
19:19:41FromDiscord<demotomohiro> `val` is readable in other module but not directly modifable
19:21:09FromGitter<Knaque> It still needs to be modifiable though, just exclusively through my own procs.
19:21:31disruptekdefine `val=`()
19:22:22FromDiscord<demotomohiro> just define procs that modify the field in same module
19:22:25FromDiscord<demotomohiro> see https://nim-lang.org/docs/manual.html#procedures-properties
19:24:13*ja0nz quit (Remote host closed the connection)
19:26:35Zevvclyybber
19:27:30Zevvhow is the gulash
19:29:59FromGitter<Knaque> Thank you disruptek and demotomohiro, that works beautifully.
19:36:24kinkinkijkintrying to build a test application of these gles bindings, but I get undefinded references at the gcc stage, do i have to add something to these bindings to make them explicitly load the library?
19:36:41kinkinkijkinthat might not be there, that is
19:36:54kinkinkijkinim using autogenerated bindings from nimio, which is... gone
19:41:08Zevvdisruptek: very first part draft: http://zevv.nl/nim-memory/nim-arc.html
19:41:16ZevvI couldn't resist bringing in the GC
19:41:36disruptek~memory
19:41:37disbotmemory: 11The Nim memory model: https://zevv.nl/nim-memory/
19:41:40disrupteknice.
19:42:16disruptekt will then look at all allocated blocks in memory and try to find which of these are no longer referenced, e.g, there are no longer any pointers referencing the memory block. -- s/referenced/in use/
19:42:31disrupteks/figures/knows/
19:42:56Zevvthanks
19:43:38disrupteki would try to remove more words. s/all allocated/allocated/ s/memory block/memory/ /memory lifetime/memory/ etc.
19:44:12Zevvcool
19:44:33disruptekversion 1.2 introduced arc.
19:44:38Zevvah right
19:45:11disruptekokay, this is important:
19:45:21disruptekARC manages your memory in a totally different way ...
19:45:29Zevvyeah tell me
19:46:15disrupteki think you want to establish garbage collection as "stupid determinations that are easy" and talk about how you could simply do this work manually to achieve better performance, etc.
19:46:33disruptek/then/ you introduce arc as an optimization whereby the compiler does this manual work for you.
19:47:05disruptekthis is why i really just want to pitch arc as /not a GC/ -- it's really automatic manual memory management. 😉
19:47:13Zevvhmm fair enough... let me see how I can fit this in
19:47:21disruptekcompile-time manual memory management, let's say.
19:47:33Zevvbecause on the other hand: most users don't give a crap, they just want stuff that /just works/
19:47:39Zevvif it talks like gC and walks like a GC
19:47:42Zevvto then it's a GC
19:47:44Zevvthem
19:47:49disruptekof course, but we shouldn't tell them it's a gc.
19:48:01disruptekbecause it really isn't.
19:48:10Zevv--gc:isnt
19:48:21FromDiscord<Rika> --notgc:arc
19:48:24Zevvhehe
19:48:26*endragor joined #nim
19:48:28disrupteknim doesn't need a gc because arc is so clever.
19:48:42disrupteknim doesn't need a gc because the compiler is so clever.
19:49:20disruptekit's kinda like the transition from automatic transmissions to auto-manual double-clutch gearboxes.
19:49:44Zevvthe DAF variomatic
19:51:40disrupteks/a counter/an integer/
19:51:52disrupteks/so it Nim/so Nim/
19:52:18disrupteki would probably use compiler vs. runtime instead of the more general "Nim".
19:52:33disruptekyour audience is programmers, and Nim programmers, to boot.
19:53:10disruptekdestructors section looks really good. simple and pretty tight.
19:53:33disrupteks/every single type/each type/
19:53:48disrupteks/is special/is a/
19:53:59disrupteksaying less means more.
19:54:23*endragor quit (Ping timeout: 258 seconds)
19:54:34disrupteks/provide one for your type/define one/ or similar.
19:54:52disruptekthis stuff really is simple. words get in the way.
19:55:26Zevv"With ARC, the compiler got much smarter about memory, so that garbage
19:55:27Zevvcollection is no longer needed."
19:57:03FromDiscord<Avatarfighter> the strategy to not have garbage is just to not
19:57:08disruptekA /destructor/ is a `proc` that is called when the reference counter reaches zero. Every type has a destructor. The compiler generates destructors when they are not defined by the programmer. A destructor has the following signature:
19:57:08FromDiscord<Avatarfighter> that is how ARC works 100%
19:57:27disruptekyep.
19:58:14disruptekgarbage was a stupid idea, turns out.
19:58:31FromDiscord<Avatarfighter> yeah the idea of having garbage was terrible, so it was commented out
19:58:45Zevvyeah yeah first say it looks really good and then rewrite it
19:59:46disruptekyou write it, i'm just suggesting how i'd say less.
19:59:54FromDiscord<Avatarfighter> lmao
19:59:58ZevvI literally copied what you just wrote
20:00:09Zevvapart from some punctuation
20:00:14disruptekit's fine. you get the idea.
20:00:17FromDiscord<Avatarfighter> Are you guys rewriting documentation?
20:01:17Zevv writing
20:01:19disruptekzevv is expanding on his memory article.
20:01:27disruptek~memory
20:01:28disbotmemory: 11The Nim memory model: https://zevv.nl/nim-memory/
20:01:30FromDiscord<Avatarfighter> Oh that's sick!
20:01:33Zevvthere's too many questions floating around about arc and stuff
20:01:45Zevvand araqs doc is really too dense for humans
20:01:48FromDiscord<Avatarfighter> Yeah I can think of so many questions I have
20:01:52disruptekanti-arc-fud campaign.
20:02:01FromDiscord<Avatarfighter> Araq's doc is written in Araq
20:02:12ZevvAvatarfighter: out with them then, now
20:02:16Zevvyour questions
20:02:48FromDiscord<Avatarfighter> allow me to read what you guys have said so I can ask questions im sure other people might have
20:03:11Zevvhttp://zevv.nl/nim-memory/nim-arc.html
20:03:19FromDiscord<Avatarfighter> oh thank you 😄
20:03:22FromDiscord<Avatarfighter> I was scrolling up
20:03:27Zevvit's just the first snippets
20:03:33Zevvvery much work in progress
20:03:49FromDiscord<Avatarfighter> of course dw
20:03:54ZevvI wonder if I should really go all the way talking about `=` and `=sink` already
20:04:08Zevvprobbaly, otherwise the whole 'move semantics' thing does not make sense
20:04:11FromDiscord<Avatarfighter> thats actually I a question I have lol
20:04:22disruptekstart with =
20:04:49disrupteki mean, this is why i wanted to start with manual memory management.
20:05:02disruptekit gives you an easy way to show the transformation.
20:05:27Zevvyeah I know, but I think going back to manual all the way
20:05:41Zevvthat's too far.
20:05:51Zevvpeople start thinking C or have even no clue what this is about
20:06:02FromDiscord<Avatarfighter> Could you explain what `lent` and `sink` do if you're not writing about that
20:06:15Zevvit's hints to the compiler
20:06:16disruptekso start with the arc version, then show the manual version, then walk through it.
20:06:23Zevvtelling it that it is safe not to make a copy
20:06:41FromDiscord<Avatarfighter> that's what lent and sink do?
20:07:30FromDiscord<Avatarfighter> that's really cool actually, I'm reading the destructors docs rn lol
20:07:40Zevvbasically yes. The compiler tries to do the right thing without help, it can infer a lot already
20:07:52FromDiscord<Avatarfighter> yeah I see that now, that's super neat haha
20:08:01Zevvyou can as a programmer hint the compiler about your intentions so it can do the right thing
20:08:15Zevvit you do not, the worst it will do is copy when it needn't
20:08:47FromDiscord<Avatarfighter> I actually have less questions than I thought tbh
20:09:00Zevv\o/
20:09:04FromDiscord<Avatarfighter> one thing that might be good to write about is how memory sharing is supposed to work
20:09:16Zevvnooo do'nt go there
20:09:33FromDiscord<Avatarfighter> lmaoooo
20:09:52FromDiscord<Avatarfighter> I need to know Zevv, I'm so interested in how memory sharing is supposed to work with ARC and I'm sure other people would like to know too
20:10:06Zevvyeah that's what I started with today
20:10:08disruptekyeah, tell us.
20:10:16disruptekdon't be coy, zevv.
20:10:23Zevvbut i'm too stupid for that
20:10:27disruptekawwww
20:10:44FromDiscord<Avatarfighter> im ngl this page should be named something other than destructors bc it talks about so much more than just destructors imo https://nim-lang.org/docs/destructors.html
20:11:11Zevvman I see myself dragging mutexes into destructors end ending up with a deadlock due to priority inversion during a refcount cleanup
20:11:14kinkinkijkintrying to use c2nim on a working c header file and i get "error: token expected: )" on a character that is the token )
20:11:38ZevvAvatarfighter: well, that's the whole point. It talks about so much more, but otoh, it doesn't
20:12:19Zevvit's all related, but it's hard to see how if you just get that dense doc
20:12:25FromDiscord<Avatarfighter> I see, I just think that its a bit misleading to call that page destructors when it talks about all that stuff ahaha
20:12:33*Zectbumo quit (Remote host closed the connection)
20:13:05Zevvtrue
20:13:49*Zectbumo joined #nim
20:14:00FromDiscord<Avatarfighter> As I read I see how each thing is seemingly heavily integrated with one another but I only discovered all this info because I've gone through most pages of the documentation except for the ones that sound boring like this
20:14:32disruptekThe only way to create a pointer of the ref type is by using new() -- /bzzzzt/
20:15:16FromDiscord<Avatarfighter> I dont think I've ever used `new()` I don't even know wtf it does I haven't read the documentation bc it sounds boring lmao
20:15:48ZevvWell, ok. Technically nim does the new() for you if you use sugar
20:15:58FromDiscord<Avatarfighter> the sugar lib?
20:16:09ZevvNo, let thing = Thing()
20:16:14FromDiscord<Avatarfighter> ohhh
20:16:24Zevvits actually the same as let thing = new Thing
20:16:40FromDiscord<Avatarfighter> `new Thing` is just sugar for `Thing()`?
20:16:49FromDiscord<Avatarfighter> or the equivalent?
20:17:33ZevvI think 'new' was the original
20:17:48ZevvThing() is handy because you can construct a type with values. Thing(val: 42)
20:17:59Zevvit's a construction shorthand
20:18:18FromDiscord<Avatarfighter> Gosh I really need to learn these terms
20:18:56FromDiscord<Avatarfighter> I feel so stupid when I can't describe what I mean because I don't know the terms I've been programming self taught for 7 years and only just recently started learning the fundamentals of programming in high school lol
20:19:16ZevvWell, it's not always easy. Nim docs are not always very strict on the lingo
20:19:20Zevvyou should read the C spec
20:19:26FromDiscord<Avatarfighter> I shall 😛
20:19:29Zevvdefinition vs declaration
20:19:55Zevvthe nim manual is really not formal enough in these things, but if it were it probably was too dry to read
20:20:24FromDiscord<Avatarfighter> The issue I have with the nim docs is sometimes the docs feel unstructured or are lacking explanation
20:20:43FromDiscord<Avatarfighter> some of them are excellent though
20:20:50FromDiscord<Avatarfighter> others look like I wrote it 💀
20:20:57kinkinkijkinI have a working install of c2nim and am trying to convert gles2/gl2.h to nim but am met with "gles/gl2.h(395, 50) Error: token expected: )"
20:21:10kinkinkijkinthe issue is that 395,50 in that file is )
20:21:19kinkinkijkinanyone know wtf to do?
20:21:19Yardanicokinkinkijkin: c2nim isn't a 100% automatic tool
20:21:26PrestigeDumb question, are there docs for arrays & sequences? I have seen references in the tutorials but not actual docs for all procedures etc
20:21:27Yardanicoyou're expected to do some manual edits in gl2.h
20:21:30Yardanicoor try nimterop
20:21:41ZevvAvatarfighter: well, theres "the manual", which is really the most important of all. It's pretty long because nim is not a simple language. I've read it dozens of times and still find stuff that I missed
20:21:41YardanicoPrestige: docs for procedures are in system obviously
20:21:57kinkinkijkinim trying to figure out what those edits are in this case but this error makes no sense
20:22:02Yardanicokinkinkijkin: it probably does
20:22:02Zevvfor the libs: yes, these docs have varying levels of quality
20:22:09Yardanicoyou don't need to always limit yourself to that single )
20:22:13Yardanicolook at lines around that
20:22:20Prestigewhy are they in system?
20:22:22Yardanicocheck stuff which might seem too complex, some weird C macros
20:22:23YardanicoPrestige: why not?
20:22:24FromDiscord<Avatarfighter> Zevv: I do too, I read the manual often when I take a break from nim. Its just sometimes the docs for the libs are quite lacking e.g: https://nim-lang.org/docs/endians.html
20:22:26Yardanicosystem is a "base" module
20:22:42kinkinkijkinthe only lines before it are #define lines
20:22:57ZevvAvatarfighter: very true. We recently had a little discussion about Tables. That thing as over 130 procs, only for working with tables.
20:23:03PrestigeI don't see the connection is all, but thanks for telling me where it is
20:23:06ZevvIt's insane, totally unusable and unreadable
20:23:07YardanicoPrestige: wdym?
20:23:11kinkinkijkinthen that line is a typedef line, and the character it expects the ) on already is a ), and adding another doesn't even change the error
20:23:13Yardanicosystem is a _base_ module
20:23:19Yardanicofor basic language stuff
20:23:40Yardanicoof course (I and others have said this before) we need a way to group procs by their first type in docs
20:23:49FromDiscord<Avatarfighter> Zevv: LOL 130 procs?
20:24:05ZevvAvatarfighter: and personally I find a lot of the examples in the docs very messy because everything has this doAssert() in there. I know why its there but it's just so messy to look at
20:24:20YardanicoZevv: what's the alternative?
20:24:23ZevvAvatarfighter: yes, and then there's still the iterators and the macros
20:24:36ZevvYardanico: generated docs vs human readable docs
20:24:41ZevvIT's a lot of work though
20:24:45Zevvand a pain to keep in sync
20:24:51YardanicoZevv: well nim docs are good enough in a lot of cases
20:24:51PrestigeI meant a lexcial correlation
20:24:55FromDiscord<ache of head> I mean, obviously a lack of documentation isn't something good
20:24:57FromDiscord<Avatarfighter> imo the docs need a rewrite, some of them don't feel like they've been touched since before nim 1.0
20:25:04Prestigelexical*
20:25:07ZevvYardanico: sure, but also they suck big time in a lot of cases.
20:25:09FromDiscord<ache of head> But for modules like endians you can just kind of make out what things do
20:25:16ZevvI think its still complaint #1 for the newcomers
20:25:22FromDiscord<ache of head> For me the docs for the most part are AMAZING
20:25:31ZevvI can't complain because I hardly betterified any docs myself
20:25:33FromDiscord<ache of head> I think I'm the only person in the world who actually thinks this xD
20:25:37FromDiscord<Avatarfighter> @ache of head I'm sad to say that I spent a whole week trying to figure out how tf im supposed to use Endians lmaooo
20:25:50FromDiscord<ache of head> Ah, sorry 😬
20:26:02Yardanicowell it's not hard
20:26:04Yardanicothere's also endians2
20:26:14FromDiscord<ache of head> I remember I was using the module in one project and I made out what the procs do
20:26:17FromDiscord<ache of head> and which ones I should use
20:26:19FromDiscord<Avatarfighter> Endians2 should replace the stdlib endians imo
20:27:05FromDiscord<Avatarfighter> I've gotten better at nim over time so I can guess more easily how things work/should work but for a new person without much experience I feel like they would cry
20:27:47ZevvYardanico: and really, I don't know how to do it better, but it doesn't help that for example in tables there is 4 times `[]` in the left column. You can't tell the difference. They are not next to eachother.
20:29:02Zevvonly thing I know is that writing docs is just hard and takes so much time.
20:29:05Zevvand it's not fun
20:29:40FromDiscord<Avatarfighter> Yeah, I'm thankful for those who took the time to write the docs and generate them, without them I would be lost.
20:29:50FromDiscord<ache of head> one thing:
20:29:54FromDiscord<ache of head> the docs are **readable**
20:30:09FromDiscord<ache of head> they don't bloat the screen and they make sense design-wise
20:30:27Zevvtrue that
20:30:36FromDiscord<Avatarfighter> yeah for sure
20:30:41kinkinkijkinagh i cannot find any reason this wouldn't be working in c2nim
20:30:45ZevvI think one big problem often is that the order in most things feels so random
20:30:51kinkinkijkinthe error is just too vague
20:30:57Zevvyou get 130 procs in a row, but you want the important ones first, probably
20:31:00*hzx joined #nim
20:31:08Zevvor in the top level docs, there's a section 'containers'. Starts with 'critbits'
20:31:12Zevvwhat the fuck are critbits?
20:31:14FromDiscord<Avatarfighter> Zevv: Especially when the docs were autogenerated and not reordered by a human
20:31:22ZevvThe most important one everybody uses is on the bottom: Tables
20:31:25Zevvright
20:31:39ZevvTwo times a week someone comes in here on irc looking for dicts or maps
20:31:43FromDiscord<Avatarfighter> OH MY GOD NIM HAS RADIX TREES
20:31:47FromDiscord<Avatarfighter> I NEEDED THIS MONTHS AGO
20:31:59FromDiscord<ache of head> For example (totally not picked on purpose), Rust docs feel very out of place
20:31:59FromDiscord<Avatarfighter> Zevv: ily
20:32:02FromDiscord<ache of head> and unorganized
20:32:04FromDiscord<ache of head> compared to Nim's docs
20:32:31FromDiscord<Avatarfighter> https://nim-lang.org/docs/critbits.html this name is not at all what I thought it is lmao
20:32:42Yardanicowell, it's pretty self explanatory though :)
20:32:47Zevvok, I don't know rust docs well. I had a small affair with Go the other day, and was delighted by the consistency of it all. It was all just at the place where you'd expect it to be
20:32:48hzxHey! I have used "nimble install tiny_sqlite", and it installed v0.1.2, but it is older, than the recent source from the github page. Can I instruct nimble to download the latest source for packages?
20:32:59FromDiscord<ache of head> > OH MY GOD NIM HAS RADIX TREES↵My man, Nim has CPU relaxing
20:33:00FromDiscord<ache of head> xD
20:33:02Zevvhzx: nimble install <git url
20:33:04Yardanicohzx: nimble install tiny_sqlite@#head
20:33:04Zevvhzx: nimble install <git url>
20:33:09FromDiscord<ache of head> For when you need to "calm your horses"
20:33:10Zevvor that
20:33:27hzxThanks!!!
20:33:31FromDiscord<Avatarfighter> I needed a Radix a while back because i was being "very efficient" with the way I was storing strings and had like 14GB of strings in memory
20:33:48FromDiscord<ache of head> ofo
20:33:50FromDiscord<ache of head> (edit) 'ofo' => 'oof'
20:34:01FromDiscord<Avatarfighter> my chromebook was very unhappy
20:34:41Zevvwrong tool
20:35:07FromDiscord<lqdev> @ache of head cpuRelax() is used to help the branch predictor in spinlocks
20:35:37FromDiscord<ache of head> What's a spinlock?
20:35:51Yardanicolmgtfy
20:35:55Yardanicohttps://en.wikipedia.org/wiki/Spinlock :P
20:36:09Zevvache of head: is it ready? is it ready? is it ready? is it ready yet? is it ready yet?
20:36:09FromDiscord<ache of head> Sorry!
20:36:13Zevvit's like a 5yo
20:36:17hzxthe nimble install git-url installs the old one, the name@#head installs the latest one.
20:36:24Yardanicohzx: yes
20:36:31Yardaniconimble installs latest _release_ tag by default
20:36:34Yardanicoif tags exist
20:36:37FromDiscord<Avatarfighter> oh my god rtorrent gets spinlocks if you mess up the config file
20:36:38FromDiscord<ache of head> Oh man, this is advanced stuff
20:36:42FromDiscord<ache of head> I get most of it
20:36:44Yardaniconot really
20:36:45FromDiscord<ache of head> But still
20:36:50Yardanicoit's just while not ready: checkReady()
20:36:53Zevvdisruptek: still here?
20:36:54Yardanicomostly
20:37:00hzxyepp, but the latest release tag is an old version in this case
20:37:02FromDiscord<haxscramper> How do I disable `[CommentXIgnored]` warning in `c2nim`? It ingores command flags, nim.cfg, there is nothing in `--help` either
20:37:07hzxbut it works now, thanks again
20:37:14Yardanico@haxscramper like other warnings
20:37:20Yardanicoah wait nvm
20:37:30FromDiscord<haxscramper> `c2nim --warning[CommentXIgnored]:off index.h` has no effect
20:37:39Yardanicobut does it really matter for c2nim?
20:38:03FromDiscord<haxscramper> what do you mean?
20:38:08Zevvdisruptek: wdit if after the refcounts and the destructots we bring it like "well, now you know all you need to know about arc", and then say "...but there's some optimizations we can do" and then bring up the whole move semantics business.
20:38:14FromDiscord<haxscramper> Well, from what I can see it does not matter
20:38:19Zevvbecause that's basically what it is
20:38:43FromDiscord<haxscramper> Which means there should be some other way of disabling it
20:40:21disruptekyes, but posit it as a question -- what happens when we "copy" a ref and then remove the original instance?
20:40:57Zevvhmm
20:41:07disruptekthe only reason move is interesting is because it can cause a destroy, right?
20:41:27Zevvsure
20:42:08disruptekRefs are originally managed in Nim by a garbage collector, or GC in short. -- i would say this more generally, so arc has room to provide "managed pointers" as well as a GC.
20:42:17disruptekbbiab
20:42:31kinkinkijkinwhat I'm getting from looking into this error right now is that it's expected to just rewrite this entire header from scratch, and since it's an extremely large header (800 lines) that's auto-generated, and I don't know the api it's for very well, the actual solution seems to be "get someone else to do it"
20:44:11kinkinkijkinthe only info I've found on it is "use [different thing] instead of [thing in code], closed"
20:53:22FromDiscord<haxscramper> The Fastest solution to disable warnings turned out to be just clone c2nim, find where this warning is printed and add `if msg in {warnCommentXIgnored}:`
20:53:54FromDiscord<haxscramper> Maybe I"m just blind but nothing else worked at all
21:18:54*hzx quit (Quit: Going offline, see ya! (www.adiirc.com))
21:19:26*guelosk[m] joined #nim
21:23:19*Vladar quit (Quit: Leaving)
21:24:54leorizeZevv: I'm pretty sure the term is "use-after-free" and not the other way around
21:25:09*Jesin quit (Quit: Leaving)
21:29:25kinkinkijkini just found out what glad is and let me just say, i am very disappointed in myself
21:31:32leorizekinkinkijkin: if you're having issues with c2nim and headers, you should remember that c2nim does not expand C macros by default
21:31:40leorizeit attempts to translate them into Nim instead
21:31:59kinkinkijkinhmm
21:32:11kinkinkijkini dont really need that anymore though, since i just found out what glad is
21:32:25leorize~c2nim
21:32:26disbotno footnotes for `c2nim`. 🙁
21:32:30kinkinkijkinglad literally just... generates working bindings for a bunch of different languages, including nim
21:32:38kinkinkijkinglad i found glad
21:32:49leorize~c2nim is c2nim user manual: https://github.com/nim-lang/c2nim/blob/master/doc/c2nim.rst
21:32:50disbotc2nim: 11c2nim user manual: https://github.com/nim-lang/c2nim/blob/master/doc/c2nim.rst
21:34:05PrestigeNeat bot
21:37:39FromDiscord<Recruit_main707> kinkinkijkin: do you have any references for that glad tool?
21:38:11kinkinkijkini mean there's a website for it and it's FOSS, MIT
21:38:27FromDiscord<Recruit_main707> i cant find it, its name is too generic :p
21:38:40kinkinkijkingoogle es2 nim glad
21:39:55*PMunch quit (Quit: leaving)
21:39:55FromDiscord<Recruit_main707> nothing still
21:40:59kinkinkijkinhttps://glad.dav1d.de/
21:41:50FromDiscord<Recruit_main707> thx 😄
21:41:55*hnOsmium0001 quit (Ping timeout: 240 seconds)
21:43:38*hnOsmium0001 joined #nim
21:46:06*Zectbumo quit (Remote host closed the connection)
21:47:02*hnOsmium0001 quit (Max SendQ exceeded)
21:47:05FromDiscord<Recruit_main707> what would be faster, constantly allocate and deallocate an array (of 9 floats) on the stack? or rather passing a pointer of that array to a function to update it?
21:48:55*hnOsmium0001 joined #nim
22:00:46*Jesin joined #nim
22:01:25*vicfred quit (Quit: Leaving)
22:02:32*vicfred joined #nim
22:04:08*schurig quit (Ping timeout: 244 seconds)
22:04:54*bung joined #nim
22:05:03leorize[m]it depends
22:05:35*natrys quit (Quit: natrys)
22:05:46leorize[m]if the floats managed to stay in the cache line for the majority of all your calculations, then you might want a heap-alloc array
22:06:01leorize[m]otherwise recalculating might be faster
22:06:33disruptekit's pretty likely that the compiler will be able to keep it in the cpu.
22:07:04disruptekdepending on the calculation, though, the calculation might be virtually free.
22:08:24leorize[m]if in doubt just profile everything
22:08:31*tane quit (Quit: Leaving)
22:10:05bung`let f = max(l - 1 - s.find("."),0)` is there better way get number of digits after dot of a float value ?
22:11:05FromDiscord<Recruit_main707> There is no calculation really, just new values
22:14:47bunghttps://stackoverflow.com/questions/8464131/counting-the-number-of-digits-before-and-after-the-decimal-point-in-c
22:15:03bungseems only string calculation
22:16:00bungok, thank you! for now leave it as is.
22:18:55*schurig joined #nim
22:25:54disruptekshashlick: what do you think about adding some more path substitutions? any ideas? i am thinking of impl $xdg stuff, maybe.
22:42:47*smitop joined #nim
22:42:58FromDiscord<tomck> sent a code paste, see https://play.nim-lang.org/#ix=2v3l
22:44:35*solitudesf quit (Ping timeout: 258 seconds)
22:49:17*arecacea1 quit (Remote host closed the connection)
22:49:50*arecacea1 joined #nim
22:50:09FromDiscord<tomck> also: with nimble, what's the recommended way to structure examples in your project?
22:50:41disrupteki like runnableExamples but i seem to be in the minority.
22:51:04FromDiscord<dom96> if you mean standalone examples then there are no formal conventions AFAIK
22:51:13FromDiscord<tomck> cool ta
22:58:50disruptektomck: in your example, i'm not sure what you're trying to achieve.
22:59:00disruptekyou don't want `echo x` to print 2?
22:59:41disruptekif you want to run echo at compile-time, put it in a static: block.
23:00:09disruptekthe proc gets a {.compileTime.} as does the variable.
23:01:17FromGitter<gogolxdong> @Zevv succeed, Thanks!
23:03:00disruptektomck: ^
23:03:30FromGitter<gogolxdong> httpbeast needs a new field of Settings to make something like `let server = newSocket(domain = Domain.AF_INET6)` to support IPv6 listening. It's solved by hard coded though for now.
23:06:12FromDiscord<lqdev> disruptek: runnableExamples is super cool, i have to use it more
23:06:26disruptekit's just hard to debug.
23:06:48FromDiscord<lqdev> but afaik it also runs your code so that's a little problematic for graphics-related stuff
23:06:52disrupteki made a macro somewhere to help output which example it was compiling.
23:07:08FromDiscord<lqdev> i don't want windows poppin' up when i rebuild my docs :(
23:07:30disrupteki'm planning on having my testes emit markdown.
23:08:04disruptek!repo gram
23:08:05disbothttps://github.com/disruptek/gram -- 9gram: 11Generic graphs in Nim 15 6⭐ 0🍴 7& 4 more...
23:08:15disruptekgood demo of runnableExamples and testes.
23:29:37*lritter quit (Quit: Leaving)
23:39:31*krux02_ joined #nim
23:39:45FromDiscord<dk> You can't easily make VS Code do Nim suggestions in snake_case, right?
23:41:55*krux02 quit (Ping timeout: 240 seconds)
23:42:11disrupteknope, but that's probably because i don't use vscode.
23:43:01FromDiscord<Elegant Beef> Can nimsuggest suggest camelCase idents?
23:44:33FromDiscord<dk> As far as I see it uses the style the ident was written in
23:44:50FromDiscord<Elegant Beef> Yea that's what i figured
23:47:16FromDiscord<Elegant Beef> You could probably change the extension so it inserts underscores wherever there is a case change
23:47:45FromDiscord<Elegant Beef> But snakecasing is bad