<< 08-10-2021 >>

00:10:57*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
00:30:27*NeoCron quit (Remote host closed the connection)
00:35:11*vicfred quit (Quit: Leaving)
00:39:43*vicfred joined #nim
00:48:19*vicfred quit (Quit: Leaving)
01:25:44*Gustavo6046 quit (Remote host closed the connection)
01:27:52*Gustavo6046 joined #nim
02:05:07*rockcavera quit (Remote host closed the connection)
02:11:01*rockcavera joined #nim
02:11:02*rockcavera quit (Changing host)
02:11:02*rockcavera joined #nim
03:12:20*arkurious quit (Quit: Leaving)
03:27:33*xet7 quit (Quit: Leaving)
03:54:41*rockcavera quit (Remote host closed the connection)
04:03:06NimEventerNew thread by Geekrelief: Suggestion on wrapping C union with anonymous struct?, see https://forum.nim-lang.org/t/8486
04:06:02*supakeen quit (Quit: WeeChat 3.3)
04:06:03FromDiscord<gogolxdong (liuxiaodong)> https://github.com/hypercore-protocol/hypercore
04:06:04nrds<R2D299> itHub: 7"Hypercore is a secure, distributed append-only log."
04:06:31*supakeen joined #nim
04:26:41*xet7 joined #nim
04:28:16FromDiscord<Rika> In reply to @gogolxdong (liuxiaodong) "https://github.com/hypercore-protocol/hypercore": ?
05:09:02FromDiscord<gogolxdong (liuxiaodong)> https://github.com/beakerbrowser/beaker
05:09:03nrds<R2D299> itHub: 7"An experimental peer-to-peer Web browser"
05:09:21FromDiscord<gogolxdong (liuxiaodong)> We need these!
05:09:23FromDiscord<Rika> ??
05:09:24FromDiscord<Rika> Oh
05:09:45FromDiscord<Rika> Well first we need a robust distributed framework library
05:10:03FromDiscord<Rika> Or components of such like message passing and coordination
06:10:23FromDiscord<NullCode> wtf LMFAO
06:10:25FromDiscord<NullCode> https://media.discordapp.net/attachments/371759389889003532/895916019145642024/unknown.png
06:10:41nrds<Prestige99> Lol
06:10:42nrds<Prestige99> context?
06:10:59FromDiscord<NullCode> "windows declared but not used"↵"undeclared identifier: windows"
06:11:10FromDiscord<NullCode> In reply to @nrds "<Prestige> context?": context: im trying to get nim working on linux
06:11:17FromDiscord<NullCode> (edit) "In reply to @nrds "<Prestige> context?": context: im trying to get ... nimtool" added "a" | "anim ... working" added "tool"
06:11:23FromDiscord<impbox [ftsf]> they may be in different scopes
06:11:25nrds<Prestige99> Can you show the code?
06:12:39FromDiscord<NullCode> sent a code paste, see https://play.nim-lang.org/#ix=3Baw
06:12:53FromDiscord<NullCode> heres the jist of thigns
06:12:56nrds<Prestige99> ah yes
06:12:57FromDiscord<NullCode> (edit) "thigns" => "things"
06:13:09FromDiscord<impbox [ftsf]> `when defined(windows):`
06:13:16FromDiscord<impbox [ftsf]> doesn't create a new scope
06:13:20FromDiscord<impbox [ftsf]> if creates a new scope
06:13:37FromDiscord<impbox [ftsf]> if you use `let` inside an if block it only exists within that block
06:13:47FromDiscord<NullCode> oh on
06:13:53FromDiscord<NullCode> (edit) "on" => "no"
06:14:03FromDiscord<NullCode> man i feel stupid
06:14:06FromDiscord<impbox [ftsf]> `when defined(windows):`↵is the correct way to do different stuff depending on OS
06:17:32FromDiscord<NullCode> thank
06:22:10FromDiscord<NullCode> `
06:22:32FromDiscord<NullCode> i dont understand this
06:22:33FromDiscord<NullCode> (edit) "`" => "sent a code paste, see https://play.nim-lang.org/#ix=3Bax"
06:22:43FromDiscord<NullCode> whats a dso
06:25:01FromDiscord<Rika> The pthread dynamic shared object is missing
06:25:08FromDiscord<Rika> Do you use threading
06:25:17FromDiscord<NullCode> nope
06:26:01FromDiscord<impbox [ftsf]> compile with `--threads:on` ?
06:26:25FromDiscord<impbox [ftsf]> miniaudio whatever it is probably uses threads
06:27:04FromDiscord<NullCode> why didnt i need that on windows?
06:27:26FromDiscord<NullCode> on win i just did `nim c file.nim` for test builds
06:27:40FromDiscord<impbox [ftsf]> pthreads is a linux thing
06:28:00FromDiscord<impbox [ftsf]> (may not be entirely true)
06:28:07FromDiscord<impbox [ftsf]> pretty sure you can use pthreads on other things
06:28:31FromDiscord<NullCode> In reply to @impbox "pthreads is a linux": oh
06:52:39*Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in)
06:54:16*Gustavo6046 joined #nim
07:23:51*PMunch joined #nim
07:35:51FromDiscord<Schelz> What's in nim (try:... except:...) ?
07:35:59PMunchtry: catch:
07:36:13FromDiscord<Schelz> thx
07:36:18PMunchAnd finally:
07:36:35FromDiscord<Elegantbeef> Are you ok pmunch? https://nim-lang.org/docs/manual.html#exception-handling-except-clauses
07:37:04PMunchWait.. shit
07:37:29PMunchI assumed it wasn't except since he asked
07:37:54PMunchBut I guess now that his question might've been "what does try: except: mean in Nim", to which my answer still applies :P
07:52:57*jjido joined #nim
07:54:46FromDiscord<Rika> Lol
08:07:19*max22- joined #nim
08:16:06nrds<Prestige99> Is there a way to alias a package name? E.g. I have `chipmunk7` but I want to `import chipmunk`
08:16:37FromDiscord<impbox [ftsf]> import chipmunk7 as chipmunk
08:17:06FromDiscord<impbox [ftsf]> https://nim-lang.org/docs/manual.html#modules-module-names-in-imports
08:17:24nrds<Prestige99> Sorry I meant globally
08:17:36FromDiscord<impbox [ftsf]> what do you mean by globally?
08:17:55FromDiscord<impbox [ftsf]> import is as global as it gets
08:17:55nrds<Prestige99> like I could just `import chipmunk` instead of `import x as y`
08:18:08nrds<Prestige99> maybe I'll just symlink in my nimble cache
08:18:09FromDiscord<impbox [ftsf]> rename chipmunk7 to chipmunk?
08:18:19FromDiscord<impbox [ftsf]> but that'll be problematic for other users
08:18:44nrds<Prestige99> basically - I had to change change chipmunk to chipmunk7 because of nimble having chipmunk as an alias to chipmunk6
08:18:54nrds<Prestige99> https://github.com/nim-lang/packages/pull/2018
08:19:08nrds<Prestige99> but locally I don't want to deal with the 7
08:19:18FromDiscord<impbox [ftsf]> why not?
08:19:29FromDiscord<impbox [ftsf]> chipmunk7 is the name of the package
08:19:58nrds<Prestige99> Idk maybe I'm weird - I want chipmunk to be the most recent chipmunk version, instead of chipmunk version 6
08:20:22FromDiscord<impbox [ftsf]> you can have a `common.nim` which does `import chipmunk7 as chipmunk; export chipmunk` then `import common.nim`
08:20:39nrds<Prestige99> Hm that's better, thanks
08:20:39FromDiscord<impbox [ftsf]> or call it chipmunk.nim if you like
08:21:49nrds<Prestige99> Isn't there a way to sort of inject an import in all files with config.nims?
08:22:12nrds<Prestige99> ah yes, switch("import", "./foo")
08:31:18PMunchHmm, I have a bit of a conundrum
08:31:51PMunchI have a DLL that sends me requests, so my code generally only runs when it gets called
08:32:12PMunchBut I want to handle the requests as fast as possible, so I keep a cache of some web resources
08:32:21PMunchBut I also need to refresh this cache
08:33:08FromDiscord<impbox [ftsf]> what's the invalidation criteria?
08:33:30PMunchThey are invalidated by a 404 from the server
08:33:50FromDiscord<Rika> You need a different criteria
08:33:58PMunchBut I re-check them in a round-robin fashion so that I check every entry every 24 hours
08:34:07FromDiscord<impbox [ftsf]> so you get a request to tell your it's invalid?
08:34:39PMunchLet's say I have 24 entries in my cache, that means I check one entry every hour. If I get a 404 back I invalidate it from the cache
08:34:58FromDiscord<Rika> Refresh after serving the last request
08:35:11PMunchThe last request?
08:35:19FromDiscord<Rika> So on a request you serve then check if you need to refresh
08:35:36PMunchHmm, that would be a lot of refreshes
08:35:52FromDiscord<impbox [ftsf]> well not if you have 24, but if it's 240000 maybe
08:35:57FromDiscord<Rika> The data may be staler than if you had a long running process but i don’t know a better way
08:36:09FromDiscord<impbox [ftsf]> cache invalidation is hard
08:36:15PMunchI might have 24 entries in my cache, but I get about 500k requests a day IIRC
08:36:22FromDiscord<Rika> In reply to @PMunch "Hmm, that would be": I mean put the “refresh cache” after serving a request
08:36:49PMunchThat would mean that instead of refreshing 24 hours a day I now refresh 500k times a day..
08:36:57PMunch24 times a day *
08:36:57FromDiscord<Rika> No
08:37:07FromDiscord<Rika> You have to check if it’s after 24 hours still of course
08:37:42PMunchAh right
08:37:42FromDiscord<Rika> So: ↵Serve↵Check if invalidated↵If so, refresh
08:37:51FromDiscord<impbox [ftsf]> how often do these things become invalid?
08:37:59PMunchVery infrequently
08:38:00FromDiscord<impbox [ftsf]> if ever?
08:38:00FromDiscord<Rika> He did just say 24 hours
08:38:09PMunchHence why 24 hours is chosen
08:38:35FromDiscord<impbox [ftsf]> how bad is it if someone gets a stale entry?
08:38:40FromDiscord<Rika> What is priority, fresh data or latency?
08:38:47PMunchlatency for sure
08:39:07FromDiscord<Rika> Then yeah the refresh after serve should be good
08:39:37FromDiscord<impbox [ftsf]> oh the source data can change?
08:39:40PMunchThe entries are keys which only get invalidated manually. So it's more a question about how much time after deactivation is it acceptable that they can still connect
08:47:30*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
08:50:06PMunchIn a perfect world I would have a cache that I could share between the two threads
08:50:37PMunchThe thread needing the entries just getting them, and the updating thread just adding them
09:23:01FromDiscord<Clonkk> Is there a way to use importcpp on C++ constexpr variable ?
10:52:23*jjido joined #nim
10:57:42FromDiscord<tandy> juancarlos says cstring does work on js↵(<@709044657232936960_krux02=5b=49=52=43=5d>)
10:58:38PMunchHmm, I have a macro in Futhark. I want to get the version of the Futhark library it comes from. How can I do that?
10:59:54FromDiscord<haxscramper> Is it a nim macro or C macro?
10:59:59PMunchNim macro
11:01:04FromDiscord<tandy> apparently you just need to check if the cstring is nil first
11:02:48FromDiscord<haxscramper> I'm not sure what do you mean by "version of the library macro comes from".
11:02:49FromDiscord<haxscramper> You can add some defines so macro knows a version
11:02:49FromDiscord<haxscramper> but there is no built-in way to do this
11:03:29PMunchAh okay, thanks
11:09:44PMunchHm, can't I import things into a Nimble file?
11:10:02FromDiscord<haxscramper> you can, but you need a hack with realtive paths
11:10:07PMunchI tried to create a file with `const VERSION* = "0.3.0"`
11:10:14PMunchAha, which hack?
11:11:13FromDiscord<haxscramper> `when exists("src"): import src/XXX else: import XXX`
11:11:59PMunchHmm, still doesn't work
11:12:47PMunchhttp://ix.io/3BbA/
11:12:52PMunchGot a different error though
11:13:33PMunchBefore it complained that `Error: expression 'version' has no type (or is ambiguous)`
11:16:23FromDiscord<haxscramper> image.png https://media.discordapp.net/attachments/371759389889003532/895993019243827240/image.png
11:16:35FromDiscord<haxscramper> i'm sorry, but this is unreadable
11:16:45PMunchJust remove the last / from the url
11:19:23FromDiscord<haxscramper> `import std/os`, `existsDir` then
11:19:37FromDiscord<haxscramper> I forgot that https://nim-lang.org/docs/nimscript.html#exists%2Cstring exists in nimscript is a completely different thing
11:19:52PMunchAha :P
11:19:59PMunchI was wondering about that
11:21:36PMunchError: expression 'version' has no type (or is ambiguous)
11:21:37PMunchHmm
11:22:01FromDiscord<tandy> ok i think i did it a bit better now but, when i run my md5.js in the browser it says `charCodeAt` is not a function?
11:22:16FromDiscord<tandy> https://github.com/nim-lang/Nim/issues/14157
11:22:17FromDiscord<tandy> is it this bug?
11:22:41FromDiscord<tandy> https://github.com/tandy-1000/Nim/commit/6b9fe865053e3705c20181c54ce21967c6efa71f
11:22:44FromDiscord<tandy> my code
11:23:49FromDiscord<haxscramper> You have `VERSION` screamcase const↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
11:24:04FromDiscord<haxscramper> and `version` is a module
11:24:29PMunchAh shit
11:24:33PMunchOf course
11:24:37FromDiscord<haxscramper> Though I would suggest you use `futhartMajorVer = 0`, `futharkMinorVer = 3` etc
11:24:50FromDiscord<haxscramper> So users can actually use this without having to parse and re-parse
11:25:12PMunchThere we go
11:27:42PMunchHmm, still a bit broken
11:28:00PMunchIt seems to have cached the old file somehow
11:29:12PMunchAs you can see it says "Installing [email protected]" even though the versionFile is updated
11:29:14PMunchhttp://ix.io/3BbI
11:29:27FromDiscord<tandy> strange thing is, im not modifying a cstring, but i am modifying an aray...
11:32:13FromDiscord<haxscramper> because nimble uses git tabs↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
11:32:16FromDiscord<haxscramper> tags\
11:32:54FromDiscord<haxscramper> also, please, please, is it that hard to update version manually?
11:33:07FromDiscord<haxscramper> You just went from manifest that can be statically parsed
11:33:14FromDiscord<haxscramper> to a one that requires whole compiler to read
11:33:29FromDiscord<haxscramper> because you need to resolve imports, read external files, resolve constants and so on
11:33:32PMunchI just don't want to forget to update it
11:33:47PMunchAnd if you're trying to statically read nimble files you're doing it wrong anyways..
11:33:55PMunchThey are supposed to be read as NimScript
11:34:10FromDiscord<haxscramper> no, I'm not doing it wrong
11:34:11FromDiscord<haxscramper> "wrong" t
11:34:21FromDiscord<FastnFree> You think nim will someday be a major player for game dev like lua or other languages are?
11:34:31FromDiscord<haxscramper> almost all metadata in nimble manifest can be statically evaluated
11:35:24FromDiscord<haxscramper> Well, to be precise \~99.2%+ of all metadata fields in the ecosystem
11:35:59FromDiscord<haxscramper> https://github.com/nim-lang/RFCs/issues/398#issuecomment-874681058
11:36:18PMunchIt can be, but it shouldn't
11:36:29FromDiscord<haxscramper> why it shouldn't be?
11:36:43PMunchSame reason I'm using libclang to read C files, because reading C files statically is wrong
11:37:00FromDiscord<haxscramper> Is it that bad to expect my tooling to not reach for the whole compiler infrastructure when reading data that is almost univers
11:37:04FromDiscord<haxscramper> haha funny↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
11:37:16FromDiscord<haxscramper> C is not the same as .`nimble`, and we both know it
11:37:27FromDiscord<haxscramper> so this comparison makes absolutely no sense
11:37:33PMunchWell, it's not far from it
11:37:38PMunch.nimble files are NimScript
11:37:45PMunchAnd should be treated as NimScript
11:37:47FromDiscord<haxscramper> I'm trying to read strictly defined set of `key = value` assignments
11:37:59FromDiscord<haxscramper> vs parsing whole langauge with 50 years of hacks and API misuses
11:38:01FromDiscord<haxscramper> yeah, pretty close
11:38:22PMunchThrow on the Nimble header and a footer that exports all the fields to JSON or something and pass it through `nim e` if you want to read the data out
11:38:26NimEventerNew thread by Jorjun_arch: Block-chain binary certification, see https://forum.nim-lang.org/t/8487
11:38:33FromDiscord<FastnFree> Does zetashift still come here?
11:38:33PMunchBut don't try to read them without using the compiler
11:39:02PMunch.nimble files are probably touring complete, don't treat them like text
11:39:13FromDiscord<haxscramper> Number of nimble files that cannot be statically evaluated is within a margin of error
11:39:32FromDiscord<haxscramper> there are at most tens of them, and overwhelming majority of those use version hack
11:40:16FromDiscord<haxscramper> Like yeah, they might not be supposed to be read statically fully, but I'm not talking about doing it fully
11:40:20PMunchStill, they aren't text files, and shouldn't be read as text files
11:40:26FromDiscord<haxscramper> I'm talking about begin able to read `version = "string"`
11:40:36FromDiscord<haxscramper> that's all I'm talking about
11:40:54PMunchSure if you want to read a format that looks like a Nim file but isn't really a Nim file, knock yourself out
11:40:57FromDiscord<haxscramper> `version = "string"` and some strictly defined set of metadata fields
11:41:13PMunchBut if you want to read Nimble files then read Nimble files and not your own imagined text format
11:41:48FromDiscord<haxscramper> This is not "my own imagined text format", that's how everyone writes their nimble files
11:41:54FromDiscord<haxscramper> I'm not imagining anything
11:42:04PMunchIt's like reading ASCII only because "most text doesn't need UTF-8"
11:42:09PMunchIt's just a flawed logic
11:43:05FromDiscord<haxscramper> I'm saying that it is not that controversial to expect my tooling to be able to statically read metadata that needs to be static in the first place
11:43:13PMunchHmm @FastnFree, haven't seen them in a while
11:43:15FromDiscord<haxscramper> Without jumping into whole code evaluation
11:43:22FromDiscord<haxscramper> there was a package whose version depended on a time of the day
11:43:27FromDiscord<haxscramper> or some other random crap
11:43:54FromDiscord<tandy> is there any reason not to do this?↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
11:44:00PMunchI have written nimble files in the past that grabbed the version from Git tags
11:44:05FromDiscord<haxscramper> And I don't understand how this can be extended to "it is the same as using libclang for C" or "same as using ASCII instead of UTF8"
11:44:18PMunch@tandy, sorry on IRC I can't see what you replied to
11:44:42FromDiscord<tandy> > ↵> Throw on the Nimble header and a footer that exports all the fields to JSON or something and pass it through nim e if you want to read the data out↵>
11:44:49PMunchBecause you're trying to read a complex thing assuming it's a simple thing
11:45:01FromDiscord<haxscramper> Is there any reason to prefer static subset of turing-complete language for your configuration?
11:45:10FromDiscord<haxscramper> well, I don't know
11:45:13PMunch@tandy, ah, no there isn't really a reason not to do that
11:45:29FromDiscord<haxscramper> It is not a complex thing↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
11:45:57FromDiscord<haxscramper> I'm talking specifically about strictly defined set of `key = "value"` pairs
11:45:58FromDiscord<haxscramper> nothing more
11:46:01FromDiscord<haxscramper> that's it
11:46:10FromDiscord<haxscramper> everyone already writes it this way
11:46:22PMunchOf course, there is an argument to be made for whether Nimble files should use NimScript or not, but as it is now they are NimScript files and should be treated as NimScript files
11:46:27PMunchAnything else is simply incorrect
11:46:39FromDiscord<haxscramper> and by everyone I mean actually everyone as my nimble package analysis shows
11:46:58PMunchYeah as I said, if you want to parse a format that looks like a Nimble file, but isn't a Nimble file be my guest
11:47:08PMunchBut if you want to actually read Nimble files, then do it properly
11:47:40FromDiscord<haxscramper> well, there is a question about what is "properly" https://github.com/nim-lang/RFCs/issues/398#issuecomment-874681058
11:47:56FromDiscord<haxscramper> and I think "properly" would be a static `key = value`
11:48:37PMunchLinking to your own proposal on "improvements" for Nimble isn't proving anything
11:49:54FromDiscord<haxscramper> If I just copied it to you directly then, would it change something?
11:50:17FromDiscord<haxscramper> There is a stats in the main proposal with more elaborate explanation
11:50:23FromDiscord<haxscramper> And concrete numbers
11:50:38PMunchYes, but it's still a proposal
11:50:42FromDiscord<haxscramper> And lengthy suggestion how it should function
11:50:48FromDiscord<haxscramper> and how it is going to be implemneted
11:50:49FromDiscord<haxscramper> and so on
11:51:12PMunchSure, but I can write the same thing for having Nimble files be written in Brainfuck
11:51:33PMunchDoesn't make it less true that you should treat the current Nimble format as NimScript files
11:52:01FromDiscord<haxscramper> well, so your point is basically "for now I don't care"
11:52:33FromDiscord<haxscramper> and it does not matter unless this better solution would be actually accepted?
11:53:09FromDiscord<tandy> i think pmunch just wants stuff to work even in edge cases
11:53:10FromDiscord<tandy> where ppl do dum stuf
11:53:33FromDiscord<haxscramper> And I want to scale back edge cases so ecosyste would not end up in the infinite mantainance mode
11:53:38PMunchNo, my point is that when faced with a file that has a well-defined format you should read that file according to the well defined format instead of making up your own rules
11:53:48FromDiscord<haxscramper> where we are forced to keep backward compat for \~20 ppl who use this "feature"
11:54:14FromDiscord<haxscramper> If you think that nimble is a well-defined format↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
11:54:29PMunchUnless you're planning on killing NimScript any time soon there isn't really all that much to maintain
11:54:29FromDiscord<haxscramper> I mean there is no format
11:54:36PMunchIt's NimScript
11:54:41FromDiscord<haxscramper> there is a way to just read it in a way that supposedly works
11:54:57FromDiscord<haxscramper> and nimble itself does multistage copy-paste-eval-read-back routine
11:55:17FromDiscord<haxscramper> just to read `version = "version"`
11:57:32PMunchhttps://github.com/nim-lang/nimble/blob/master/src/nimblepkg/nimscriptwrapper.nim#L80-L120 <- how you should handle Nimble files
11:58:02FromDiscord<haxscramper> What current approach promotes is just a backwards data flow, where package manager manifest cannot be used as a single source of truth
11:58:38FromDiscord<haxscramper> and the only real use case I've seen (that is used more than couple of times at least) for this is a version hack
11:59:16FromDiscord<haxscramper> there was a suggestion to deprecate version fields entirely actually
11:59:23FromDiscord<haxscramper> because it also duplicates information
12:00:00FromDiscord<Rika> In reply to @haxscramper "there was a suggestion": i'd like this but then again that would lock-in to git i assume
12:00:11PMunchProbably
12:00:31PMunchNow the question becomes, is locking the version number into a Version Control System a bad idea?
12:00:44FromDiscord<Rika> idk if subversion or mercurial or w/e other vcs nim supports has tags, not sure if its a git only thing actly
12:00:55FromDiscord<Rika> In reply to @PMunch "Now the question becomes,": id say it is yeah
12:00:58FromDiscord<haxscramper> we only support mercurial
12:01:09FromDiscord<haxscramper> nimble can only work with git and mercurial
12:01:13FromDiscord<Rika> i mean i gues stheyre an extreme minority
12:01:20FromDiscord<Rika> mercurial users, i mean
12:01:33FromDiscord<haxscramper> I would actually suggest using libgit
12:01:44FromDiscord<haxscramper> instead of relying on the git binary
12:02:17PMunchWhy don't you just read the .git folder yourself directly and parse it statically? Instead of reading the format the way it's supposed to be read? :P
12:02:37PMunchSorry, just messing with you
12:03:32PMunchI mean you can use `nimble dump` in order to get your nice statically readable list of data from a Nimble file
12:03:36FromDiscord<haxscramper> if .git was just as simple as `key = value` for 99% of cases and actually had specified format then why not?
12:04:02*max22- quit (Ping timeout: 265 seconds)
12:04:19PMunchProbably works for both .nimble and the old .ini format as well
12:04:52FromDiscord<haxscramper> well, nimble first tries to parse it as `.ini`
12:04:59FromDiscord<haxscramper> if there is an exception it tries to eval it as nimscript
12:05:08FromDiscord<haxscramper> and both formats can be store in the `.babel`
12:05:11FromDiscord<haxscramper> `.nimble`
12:05:27PMunchBut if you just want to read simple static keys, just use `nimble dump`
12:05:38PMunchIt handles all the logic of Nimble for you
12:05:46PMunchIn the way it is supposed to be handled
12:06:01*supakeen quit (Quit: WeeChat 3.3)
12:06:07FromDiscord<haxscramper> if you think I'm trying to find a way to read nimble file metadaa
12:06:19FromDiscord<haxscramper> I'm not
12:06:29FromDiscord<haxscramper> And I'm aware of all ways to do this
12:06:31*supakeen joined #nim
12:06:34FromDiscord<haxscramper> including `nimble dump --json`
12:07:07FromDiscord<haxscramper> where `--json` is undocumented as of 1.4.8 at least, but I think that's what you probably meant by how it supposed to be handled?
12:07:44FromDiscord<haxscramper> you know' static evaluation still implies I have to parse it, and this part can be done by compiler etc.
12:07:58FromDiscord<haxscramper> so I'm not going to run around with ad-hoc regexes
12:08:45FromDiscord<haxscramper> Araq also used compiler to parse nimble files in the atlas tool
12:09:04FromDiscord<haxscramper> https://github.com/nim-lang/Nim/pull/18497/files#diff-8c33f91f01f7d86206dba0344835180d03954f29def8fd72197cb59b1f7d1f8a
12:09:30FromDiscord<haxscramper> so I'm not sure even about "supposed" part, I'd rather say that's just how it was implemented
12:09:53FromDiscord<haxscramper> and nobody exploits this anyway
12:10:11FromDiscord<haxscramper> also I'm not trying to take away precious `task` evaluation and try to substitute it with something else
12:10:20FromDiscord<haxscramper> and before/after hooks
12:13:15FromDiscord<haxscramper> So "supposed" is questionable, even if it wasn't (i.e. it was the original design goal, which is apparently not the case judging by generally welcome response when static toplevel was discussed) I would still question its necessity based on the real-world data (only extremely small minority of users actually exploit this) and general idea that static way of storing metadata is preferable to the one which requires whole compiler to eva
12:15:06PMunchThis is all besides the point I was arguing though. I don't have a horse in the race for what .nimble files should look like. But the fact of the matter is that right now they are NimScript files and should be treated as such by anyone interfacing with them.
12:15:57FromDiscord<haxscramper> guess I need to make a PR into compiler then to fix atals
12:15:58PMunchAnd since a new spec would effectively introduce a third format I would still expect people to use something like `nimble dump --json` to actually read any data out of it
12:16:57FromDiscord<haxscramper> that one I have no argument against
12:17:24FromDiscord<haxscramper> I just object to making changes that force whole compiler infrastructure in the configuration file reading
12:17:39FromDiscord<haxscramper> make it mandatory\
12:18:11PMunchThat's not a change though, that is how Nimble files already are
12:18:30PMunchYou're a couple years late to object to that change :P
12:19:20FromDiscord<haxscramper> again, looking at the ecosystem, it is clear that I'm not late
12:19:38FromDiscord<haxscramper> since there is almost nobody who exploits this
12:20:16FromDiscord<haxscramper> so I won't break anything
12:20:18FromDiscord<dom96> In reply to @haxscramper "I would actually suggest": I saw a tweet recommending against libgit just today 🙂
12:20:29FromDiscord<haxscramper> in favor of git binary?
12:20:32FromDiscord<dom96> yes
12:20:41FromDiscord<dom96> apparently libgit is subtly crappier than git binary
12:20:47FromDiscord<haxscramper> well, it is easier to package at least, or something
12:20:58FromDiscord<haxscramper> well, it is a C library
12:21:14FromDiscord<haxscramper> certainly harder to use than `git` with some subcommands
12:21:37FromDiscord<dom96> meh, we're using `git` already, it works fine
12:21:59FromDiscord<dom96> btw PMunch, Nimble defines a `NIMBLE_VERSION` constant.
12:22:03FromDiscord<dom96> which you can use
12:22:17FromDiscord<haxscramper> it does?
12:22:38PMunchYeah, but that is only when compiling the module right?
12:22:55PMunchSo I can't use it from my macro, because that would pull the version of the project you're in
12:23:32FromDiscord<haxscramper> by the way, why do your macro need to know library version?
12:23:55FromDiscord<dom96> oh, you want library version, I see
12:24:17PMunchBecause it caches its own output, and to ensure it gets rebuilt when you need to it hashes all the inputs and attaches that to the cache filename
12:24:57FromDiscord<dom96> sounds like you might want to use the path of the module
12:25:00FromDiscord<dom96> it'll include the version
12:25:07FromDiscord<dom96> (if it's installed via Nimble)
12:25:26PMunchSo I would like to also add the version of the library because that obviously means the output might be different
12:25:48PMunchYeah, problem is if it isn't installed via Nimble..
12:26:00PMunchI tried to create a version.nim file that exported a constant
12:26:14PMunchAnd then import than in both the nimble file and the file with the macro
12:26:26PMunchWhich is the way I would expect it to work
12:27:04PMunchBut since installing it flattens the library it was surprisingly tricky..
12:28:42PMunchI gave up when I had installed a version 0.3.0, updated the file to say 0.3.1 and trying to update and it said that 0.3.0 was already installed and saying yes to overwrite threw an error
12:29:13PMunchI guess I could get the module path and then go looking for the nimble file
12:32:56FromDiscord<dom96> maybe Nimble should also define a `NIMBLE_FUTHARK_VERSION` (and the same for each package) lol
12:33:56FromDiscord<dom96> but some people don't want to compile using `nimble` anyway which means this doesn't get defined
12:34:15FromDiscord<dom96> hm, could go into the nim.cfg file just like the --path's now though
12:35:11PMunchDoesn't nim.cfg have the same issue as the .nimble file?
12:35:37FromDiscord<dom96> what issue is that?
12:36:07PMunchThat it would read the nim.cfg of the project you're building and not that of Futhark
12:38:34FromDiscord<dom96> well no, Nimble would add `NIMBLE_FUTHARK_VERSION` in there
12:39:25PMunchOoh, so you're talking about having nimble add that when you're installing, and then the macro could grab it when it's run?
12:41:05FromDiscord<dom96> sure
12:41:39FromDiscord<dom96> When you compile with Nimble it calls `nim` with the `--path` and `-d:NimblePkgVersion=ver`
12:42:21FromDiscord<dom96> Now since some people don't want to use `nimble` to compile their code, the proposed solution was to just have Nimble put these flags into nim.cfg
12:42:32FromDiscord<dom96> (or .nims, can't remember where they go now tbh)
12:42:43FromDiscord<dom96> and Nimble now supports this when it's in a special mode
12:42:46*Guest67 joined #nim
12:42:53Guest67hello :)
12:42:59FromDiscord<dom96> so I think putting the defines in there would make sense too
12:43:15Guest67Anyways where can i learn nim?
12:43:23PMunchBut what do you do if you already have a .nims file?
12:43:23Guest67also you guys have discord?
12:43:40PMunchYup, there is a Discord, but it's all linked to this IRC channel
12:44:06PMunchHere is a nice list of learning resources: https://nim-lang.org/documentation.html
12:44:24Guest67thanks
12:44:55Guest67nim is underrated dont you agree?
12:45:32PMunchDefinitely!
12:45:43PMunchWell around here it's rated pretty well :P
12:45:54FromDiscord<NullCode> yeah lmfao
12:45:58Guest67its also good for hacking ngl
12:46:05FromDiscord<NullCode> but aside from the nim underworld, very underrated
12:46:11PMunchWhat kind of hacking?
12:46:23Guest67making malware since usually it is undetectable
12:46:31PMunchHacking like "haha, got your password" or hacking like "look at this cool thing I made"
12:46:35PMunchAh right
12:47:09PMunchYeah it has seen some utilization there, which unfortunately means that Nim an Nimble now sometimes gets flagged as a virus when people install it
12:47:20PMunchBecause of poor fingerprinting
12:48:46Guest67where is it being flagged as a virus?
12:49:13FromDiscord<haxscramper> windows
12:49:29Guest67hmm
12:49:38FromDiscord<haxscramper> It has been a recurssing problem since someone wrote a malware in nim seveal months ago
12:49:38Guest67oh right anyways i gotta learn nim
12:50:09FromDiscord<haxscramper> Windows defender and other 10^9 IQ antivirus vendors flag it (and nimble/choosenim) as a malware
12:50:27PMunchhttps://forum.nim-lang.org/t/7830
12:50:43FromDiscord<impbox [ftsf]> so it may not be as undetectable as you might imagine
12:50:53FromDiscord<impbox [ftsf]> but it is a great language
12:51:23Guest67hmm, yea but still its not as well known compared to other programming languages
12:51:25PMunchThat's the problem though, I'm 99% sure that people writing malware in Nim could apply some sort of avoidance scheme..
12:51:32Guest67so making a malware on it is a good idea
12:51:39Guest67haha not that i encourage it
12:53:02Guest67FonderElite#1366
12:53:07Guest67discord
12:53:30PMunchI never really got that argument. I mean Nim does make a perfect language for writing malware, easy to use, small binaries, down to the metal, fast, flexible, etc. but the "hard to detect because it's not commonly used" isn't really that strong of an argument
12:53:56FromDiscord<NullCode> In reply to @Guest67 "making malware since usually": nah
12:54:04FromDiscord<NullCode> it was undetectable before i did my thing
12:54:08FromDiscord<NullCode> 3 detects back in the day
12:54:21FromDiscord<NullCode> now it's gotten to the point where fucking nim is being false +'d
12:54:34FromDiscord<haxscramper> what thing↵(@NullCode)
12:54:51FromDiscord<NullCode> yes
12:55:32Guest67Hmm so maybe obfuscating it will do the trick or encoding it in base64 then program it to decode itself
12:55:37FromDiscord<NullCode> In reply to @Guest67 "oh right anyways i": you shouldnt learn a language just because you wanna hack
12:55:41FromDiscord<NullCode> just some advice
12:55:47FromDiscord<NullCode> hacking isn't good
12:56:09Guest67hacking depends on the person, i use it for research purposes
12:56:14FromDiscord<NullCode> In reply to @Guest67 "Hmm so maybe obfuscating": obf idk but base64 hella detects
12:56:17Guest67learn more about computer
12:56:23Guest67*Computers*
12:56:26FromDiscord<NullCode> base64 in any program will land you detects
12:56:33FromDiscord<NullCode> In reply to @Guest67 "*Computers*": yes definitely
12:56:41FromDiscord<NullCode> research purposes lmfao
12:56:50Guest67What?
12:57:01FromDiscord<NullCode> (edit) "base64 ... inlanguage" added "the program" | "program" => "language"
12:57:08FromDiscord<NullCode> (edit) "base64" => "base64'ing"
12:57:13FromDiscord<NullCode> nothing
12:57:26FromDiscord<NullCode> anyway i like editing a lot
12:57:29FromDiscord<NullCode> how does it look in irc
12:57:37FromDiscord<NullCode> (edit) "anyway i like editing ... a" added "messages in discord"
12:57:43Guest67cool
12:57:54Guest67```py
12:57:57FromDiscord<NullCode> like, am i spamming the entire chat in irc land
12:58:08FromDiscord<NullCode> bridges are weird
12:58:28Guest67anyways whats your discord username?
12:58:57FromDiscord<NullCode> NullCode#0187
12:59:37*arkurious joined #nim
12:59:59*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
13:01:00FromDiscord<Rika> you two sus
13:01:07FromDiscord<NullCode> no
13:01:11FromDiscord<NullCode> wait, how am i sus
13:01:27FromDiscord<NullCode> I'm already glowing
13:01:30FromDiscord<Rika> mr "i have malware on my github but i totally didnt write it" or whatever your awful excuse was
13:01:32Guest67wrong username?
13:01:52FromDiscord<NullCode> In reply to @Guest67 "wrong username?": no https://media.discordapp.net/attachments/371759389889003532/896019563077050378/unknown.png
13:02:04FromDiscord<NullCode> In reply to @Rika "mr "i have malware": i was just fucking around are you serious
13:02:16FromDiscord<NullCode> lmfao
13:02:28FromDiscord<dom96> In reply to @NullCode "it was undetectable before": 🧐
13:02:29FromDiscord<Rika> dafuq do you even mean
13:02:38FromDiscord<NullCode> In reply to @Rika "dafuq do you even": i was kidding when i said that
13:02:40Guest67eh you have to add me lol
13:02:53FromDiscord<Rika> ah yes that excuse too
13:03:00FromDiscord<NullCode> which one
13:03:23FromDiscord<NullCode> In reply to @Guest67 "eh you have to": sent req
13:03:24FromDiscord<Rika> i seriously cant trust you when you've made so many remarks that would easily point to "ive tried making malware"
13:03:32*Guest67 is now known as FonderElite
13:03:50FromDiscord<NullCode> ok so
13:03:52FromDiscord<NullCode> listen up
13:04:02FromDiscord<NullCode> no need to believe "I've tried making malware"
13:04:10FromDiscord<NullCode> i have made stuff, and theres no denying that
13:04:13FromDiscord<NullCode> it's on my github ffs
13:04:26FromDiscord<NullCode> i was just messing around when i said "oh i didn't do it" etc
13:04:34FromDiscord<dom96> tbf I've made some "hacking" tools too
13:04:40FromDiscord<NullCode> like?
13:05:09FromDiscord<dom96> 🙊
13:05:26PMunchhttps://github.com/nim-lang/packages/pull/2025
13:05:33FromDiscord<NullCode> In reply to @dom96 "🙊": guess we shall never know
13:05:45FromDiscord<Rika> okay
13:05:53FromDiscord<Rika> then what reason did you have for the malware
13:06:03FromDiscord<NullCode> um so
13:06:04FromDiscord<Rika> were you pentesting or what
13:06:11FromDiscord<NullCode> can't say here dm
13:06:14FromDiscord<Rika> what
13:06:15FromDiscord<Rika> why
13:06:17FromDiscord<Rika> why not
13:06:18FromDiscord<Rika> ratehr
13:06:20FromDiscord<Rika> (edit) "ratehr" => "rather"
13:06:29FromDiscord<dom96> In reply to @NullCode "guess we shall never": it is on my github, I'll leave it to you to find 😛
13:06:33FromDiscord<Rika> if you cant say here then just dont tell me
13:06:55FromDiscord<NullCode> ok won't tell you then
13:07:02FromDiscord<NullCode> In reply to @dom96 "it is on my": alright I'm on it
13:07:13FromDiscord<NullCode> too curious now
13:07:19FromDiscord<dom96> In reply to @NullCode "can't say here dm": Russian contract eh? 😄
13:07:25FromDiscord<NullCode> XD
13:07:36FromDiscord<NullCode> hired by the remnants of the soviet union
13:07:48FromDiscord<NullCode> with plans to take control of the world using NullCode Malware™️
13:07:54FromDiscord<dom96> Yes Comrade, bring us back to our former glory
13:08:26FromDiscord<NullCode> wait are you russian
13:08:33PMunchBy the way NullCode, editing Discord messages looks pretty disgusting in the IRC chat :P
13:08:35FromDiscord<Rika> no
13:08:42FromDiscord<dom96> lol no
13:08:44FromDiscord<NullCode> In reply to @PMunch "By the way NullCode,": oh no i was scared of that
13:09:07FromDiscord<dom96> Not too far off though
13:09:24FromDiscord<NullCode> I see
13:09:26PMunchI mean it's not super terrible: https://irclogs.nim-lang.org/08-10-2021.html#12:57:01
13:09:39PMunchBut it's not great
13:09:47FromDiscord<NullCode> https://media.discordapp.net/attachments/371759389889003532/896021550552211456/unknown.png
13:09:48FromDiscord<NullCode> my god thats gross
13:09:56FromDiscord<NullCode> literally chat flooding lmfao
13:10:06PMunchYup
13:10:21PMunchAt least the bridge creates pastes from long messages now :P
13:10:31PMunchAlways fun when someone pasted code into Discord..
13:10:37FromDiscord<dom96> come on, it ain't even that bad
13:10:48FromDiscord<dom96> props to @Yardanico for implementing it
13:10:58PMunchOh for sure, it's not that bad
13:11:18PMunchBut if you're changing a single letter or something I'd say it's best to just leave it
13:11:29FromDiscord<NullCode> is there an irc web client
13:11:30FromDiscord<Yardanico> In reply to @NullCode "": yeah, there are no edits on IRC, although there was a discussion about it
13:11:34FromDiscord<Yardanico> In reply to @NullCode "is there an irc": yes, multiple
13:11:40PMunchThen again, on IRC I can see ages back in the history without scrolling
13:11:47FromDiscord<Yardanico> also you can use matrix which might be a better experience if you've only used modern apps like discord or telegram
13:11:58FromDiscord<NullCode> i like old stuff lmao
13:12:01*max22- joined #nim
13:12:06FromDiscord<dom96> yeah, we need irc logs for the other channels
13:12:12FromDiscord<dom96> really need to set that up
13:12:13PMunchFirst message on my screen right now is my comment saying I don't get the argument about the undetectability of Nim
13:12:24FromDiscord<NullCode> matrix is also alright, but I'd rather experiment with everything there is
13:12:38FromDiscord<impbox [ftsf]> I gave matrix a try, but it seemed suboptimal
13:12:45FromDiscord<NullCode> In reply to @PMunch "First message on my": your text gotta be hella small then
13:12:46FromDiscord<impbox [ftsf]> at least for this
13:12:54PMunchOh yeah, always annoying when I need to reference something we discussed in #nim-offtopic :P
13:13:03PMunchNah, not really
13:13:26PMunchInconsolata at font size 13
13:13:40FromDiscord<Rika> 13 on what screen dpu]
13:13:41FromDiscord<Rika> (edit) "dpu]" => "dpi"
13:13:42PMunchMy client just doesn't add a bunch of silly whitespace everywhere
13:13:53PMunchAnd this is a pretty big 4K monitor :P
13:14:15PMunchBut it's perfectly legible from like a meter away
13:14:16FromDiscord<NullCode> yikes https://media.discordapp.net/attachments/371759389889003532/896022686743003156/unknown.png
13:14:30FromDiscord<NullCode> am i legally blind, or is this hard to read
13:14:38FromDiscord<NullCode> In reply to @PMunch "And this is a": oh makes sense
13:14:49FromDiscord<dom96> Yeah, I was just about to say
13:14:51FromDiscord<Rika> its hard to read
13:14:56FromDiscord<dom96> Discord supports condensed mode
13:15:01FromDiscord<Rika> but its not good
13:15:01FromDiscord<dom96> which is basically the same as IRC
13:15:09FromDiscord<dom96> It's good enough
13:15:16FromDiscord<Rika> its not
13:15:18FromDiscord<Rika> imo
13:15:29FromDiscord<NullCode> In reply to @Rika "but its not good": it works if you don't set it to 14 font scaling
13:15:31FromDiscord<dom96> although I do find it funny that it doesn't have a central margin like XChat
13:15:41FromDiscord<dom96> I remember trying to implement that myself in GTK for my own IRC client
13:15:50FromDiscord<dom96> and now I'm using Discord without it
13:15:56FromDiscord<NullCode> lmao
13:17:10PMunchYeah those nicks being all over the place isn't great
13:17:23FromDiscord<NullCode> yeah
13:17:32PMunchI kinda want to create an IRC client that allows you to apply custom parsers to nicks
13:17:52PMunchSo I could pull out the <dom96> part of the FromDiscord bot message and use that as the nick
13:18:46FromDiscord<dom96> you can easily do that with an XChat plugin
13:18:56FromDiscord<dom96> (and I'm guessing other IRC clients support it too)
13:18:58FromDiscord<NullCode> aight so what irc webclient should i use
13:19:04FromDiscord<dom96> wouldn't be surprised if plugins exist for this already
13:20:05*happycorsair[m] quit (Read error: Connection reset by peer)
13:20:08*nixfreak_nim[m]1 quit (Read error: Connection reset by peer)
13:20:08*Theodore[m] quit (Read error: Connection reset by peer)
13:21:02FromDiscord<tandy> use element.io with libera chat \:&)↵(@NullCode)
13:21:34FromDiscord<NullCode> oh i use element for matrix
13:21:39FromDiscord<NullCode> it has irc too?
13:22:25*nixfreak_nim[m] joined #nim
13:23:11FromDiscord<Yardanico> @NullCode matrix has had a network-wide IRC bridge for a long time (so Matrix people appear as `Nick[m]` in IRC and IRC people appear as `Nick` in Matrix)
13:23:18FromDiscord<Yardanico> and after the freenode stuff they switched the bridge to libera.chat
13:23:20*rockcavera joined #nim
13:23:20*rockcavera quit (Changing host)
13:23:20*rockcavera joined #nim
13:23:22*happycorsair[m] joined #nim
13:23:34*Theodore[m] joined #nim
13:24:12FromDiscord<Yardanico> ah actually they have multiple, yes
13:24:28FromDiscord<NullCode> oh
13:24:39FromDiscord<NullCode> so tandy's telling me to just use matrix?
13:24:54FromDiscord<Yardanico> yes
13:24:59FromDiscord<tandy> yes heheh
13:41:39PMunchHmm XChat looks suspiciously much like HexChat
13:41:57PMunchAh "HexChat is an IRC client based on XChat"
13:42:04*krux02 quit (Remote host closed the connection)
13:42:10FromDiscord<dom96> indeed
13:42:23*krux02 joined #nim
13:42:31PMunchHmm, apparently it is highly scriptable
13:42:50PMunchI guess I can just write a plug-in to HexChat then if it doesn't exist yet
13:50:59PMunchHmm, can't find one
13:51:27PMunchMaybe this is what I should stream. Using Futhark to wrap the HexChat C plug-in library and create an .so addon that fixes nicks
13:59:17*krux02 quit (Remote host closed the connection)
14:04:22*bkay quit (Quit: Leaving)
14:07:30*PMunch quit (Quit: Leaving)
14:07:47*PMunch joined #nim
14:08:17PMunchThink I might've found a plug-in that does it
14:08:25PMunchSomeone from Discord, could you say something?
14:09:01FromDiscord<dom96> Foo
14:09:16PMunchHmm, damn it. Didn't work
14:11:04PMunchMight've been an incorrect config. Could you try again?
14:11:29FromDiscord<pointystick> Bar
14:11:39PMunchStill no luc
14:11:41PMunchluck*
14:11:53PMunchEh, I'll have to look at it later
14:11:55FromDiscord<Rika> stiww no wuck huh
14:11:57PMunchgotta go
14:11:59*PMunch quit (Client Quit)
14:12:02FromDiscord<Rika> go where
14:19:25FromDiscord<tandy> lol
14:34:22NimEventerNew Nimble package! futhark - Zero-wrapping C imports in Nim, see https://github.com/PMunch/futhark
14:34:22NimEventerNew Nimble package! chipmunk7 - Bindings for Chipmunk, a fast and lightweight 2D game physics library., see https://github.com/avahe-kellenberger/nim-chipmunk
14:34:24nrds<R2D299> itHub: 7"Automatic wrapping of C headers in Nim"
14:34:25nrds<R2D299> itHub: 7"Nim bindings to Chipmunk, a fast and lightweight 2D game physics library"
14:43:43FromDiscord<NullCode> whats the best way to convert string to int?
14:43:56FromDiscord<NullCode> there are 2 modules with parseint
14:45:34FromDiscord<Rika> whichever fits your needs more
14:45:38FromDiscord<Rika> one time? strutils
14:45:44FromDiscord<Rika> for parsing? parseutils
14:45:48FromDiscord<enthus1ast> the one in parseutils is better when writing a parser imho
14:46:03FromDiscord<enthus1ast> for normal stuff i use the one in strutils
14:46:36FromDiscord<enthus1ast> its better for parsers because it hase the same interface as the other procs from parseutils
14:46:42FromDiscord<NullCode> oh i just wanted to convert a tainted str to int
14:46:47FromDiscord<NullCode> ill just go with strutils then
14:47:00FromDiscord<Rika> taint mode is deprecated
14:47:15FromDiscord<NullCode> execCmdEx still does it idk
14:47:35FromDiscord<NullCode> osproc modul
14:47:37FromDiscord<NullCode> (edit) "modul" => "module"
14:48:07FromDiscord<NullCode> dishes out a taintedstr instead of str
14:48:34FromDiscord<Yardanico> In reply to @NullCode "dishes out a taintedstr": TaintedString is just string
14:48:40FromDiscord<Yardanico> unless you use taintMode which is deprecated
14:49:01FromDiscord<NullCode> what does this tainted mode do tho
14:49:23FromDiscord<Yardanico> it forces you to handle strings from external sources properly
14:49:26FromDiscord<Rika> nothing that matters now
14:49:29FromDiscord<Yardanico> but yeah
14:49:43FromDiscord<NullCode> aight got it
14:51:06FromDiscord<enthus1ast> i actually liked the idea of tainted string, but in practice i was just converting them to str all the time \:)
15:11:13FromDiscord<gerwy> Hi hmm i tried using nimx, i wanted to try samples that they are and i just cloned the repo and run nake but i always get this error ↵`nimx/nimx/perform_on_main_thread.nim(83, 12) Error: cannot open file: sdl2`
15:11:46FromDiscord<gerwy> and i do have sdl2 installed
15:14:04FromDiscord<Yardanico> In reply to @Life Sucks "and i do have": which one
15:14:21FromDiscord<gerwy> hmm actually i it doesn't import it at all, even in some test script
15:14:22FromDiscord<gerwy> hmm
15:14:29FromDiscord<gerwy> In reply to @Yardanico "which one": both↵sdl2 and sdl2_nim
15:14:36FromDiscord<Yardanico> you can't have "both"
15:14:39FromDiscord<Yardanico> they overwrite files
15:14:39FromDiscord<gerwy> oh
15:14:50FromDiscord<gerwy> so remove the sdl2 and leave sdl2_nim?
15:15:10FromDiscord<Yardanico> other way
15:15:27FromDiscord<Yardanico> remove sdl2_nim and reinstall sdl2
15:15:33FromDiscord<gerwy> okaay
15:15:46FromDiscord<Yardanico> and don't forget to run nimble install to install all dependencies - https://github.com/yglukhov/nimx/blob/master/nimx.nimble
15:16:09FromDiscord<gerwy> In reply to @Yardanico "and don't forget to": yep did that, there is a lot of deps lol
15:16:13FromDiscord<gerwy> (edit) "is" => "are"
15:17:30FromDiscord<gerwy> okay after reinstalling it works thaanks :> also a question, because i didn't had luck with web app guis for nim, like neel or nimview, does nimx has ability to do like drag and drop for files?↵or is there a way to have file as input?
15:19:42FromDiscord<gerwy> doesn't look like it
15:25:36*neurocyte0132889 joined #nim
15:25:36*neurocyte0132889 quit (Changing host)
15:25:36*neurocyte0132889 joined #nim
15:38:20FromDiscord<FastnFree> Does nim have the ability to run scripts without compiling first?
15:38:42FromDiscord<Rika> nimscript only
15:39:08FromDiscord<Rika> or do you mean "without seeing the compiling part"
15:39:29FromDiscord<enthus1ast> nim r yourScript.nim
15:39:31FromDiscord<Rika> you can do `nim r <the nim file>` and it'll just compile and run
15:39:38FromDiscord<Rika> binary wont be in the dir
15:39:45FromDiscord<Rika> feels like a script
15:42:30FromDiscord<enthus1ast> and also\:↵↵nim e yourScript.nim
15:43:02FromDiscord<enthus1ast> r compiles and runs it, e evaluates it with nim vm, but e is limited
15:49:35FromDiscord<sebbe> Which language does nim compare to
15:49:41FromDiscord<sebbe> I know it’s a broad question
15:54:00FromDiscord<gerwy> In reply to @sebbe "Which language does nim": Pascal? If you mean by syntax, or python by some people↵In speed probably around C++, slower than Rust
15:54:22FromDiscord<Yardanico> "In speed probably around C++, slower than Rust" this is not really a good thing to say
15:54:27FromDiscord<Yardanico> comparing native language performance is hard
15:54:30FromDiscord<gerwy> But idk what langs you compare it with, they all have their own goals and they are used in different regions
15:54:38FromDiscord<Yardanico> they're all in the same ballpark
15:54:44FromDiscord<Yardanico> c/c++/nim/rust/zig
15:54:45FromDiscord<Yardanico> etc
15:55:13FromDiscord<gerwy> In reply to @Yardanico "comparing native language performance": Hehe just to clarify↵Its data from benchmarks↵Obviously real world examples may be different but it all depends on your skill
15:55:39FromDiscord<Yardanico> what benchmarks specifically? curious to check them out
15:56:59FromDiscord<gerwy> Hmm i saw one benchmark on github that had a few langs, comparing them in like 4 types of script but i need to find it on my pc and im on my phone now
15:57:58FromDiscord<gerwy> The other one was public project to try and make counting prime numbers script for popular languages and compare the results, with a lot of data and be able to reproduce it easily
15:59:22FromDiscord<dom96> Benchmarks are all just a function of how much time the person implementing the benchmark has
15:59:24FromDiscord<Yardanico> In reply to @Life Sucks "Hmm i saw one": You mean https://github.com/kostya/benchmarks ? Nim there is pretty close to Rust
15:59:26nrds<R2D299> itHub: 7"Some benchmarks of different languages"
15:59:46FromDiscord<dom96> A language has an effect on the time it takes to create a solution that wins benchmarks
15:59:52FromDiscord<dom96> but it always is all down to time
16:00:02FromDiscord<Yardanico> In reply to @dom96 "Benchmarks are all just": some benchmark repos have pretty strict rules on how benchmarks have to be implemented
16:00:05FromDiscord<dom96> important to keep that in mind
16:00:27FromDiscord<dom96> all rules can be bent
16:00:39FromDiscord<dom96> again, down to how much time the person has to look for ways to bend them 🙂
16:01:00FromDiscord<Yardanico> well yeah, some of these benchmarks even in kostya's repo are stupid
16:01:06FromDiscord<Yardanico> https://github.com/kostya/benchmarks/blob/master/brainfuck/bf.rs
16:01:15FromDiscord<Yardanico> like wtf is thisd https://media.discordapp.net/attachments/371759389889003532/896064705062387772/unknown.png
16:01:16FromDiscord<gerwy> In reply to @Yardanico "You mean https://github.com/kostya/benchmarks ?": Yes!↵And the other one is from that video↵https://www.youtube.com/watch?v=tQtFdsEcK_s
16:01:18nrds<R2D299> outube: 7"E01: What is the FASTEST Computer Language? 45 Languages Tested!"
16:01:19FromDiscord<Yardanico> (edit) "thisd" => "this"
16:01:30FromDiscord<Yardanico> normal rust isn't written like that
16:01:48*neurocyte0132889 quit (Read error: Connection reset by peer)
16:02:09FromDiscord<gerwy> In reply to @dom96 "Benchmarks are all just": Thats why i like the other benchmark because people are allowed to make their own solutions and nim has 3
16:03:01*neurocyte0132889 joined #nim
16:03:01*neurocyte0132889 quit (Changing host)
16:03:01*neurocyte0132889 joined #nim
16:03:37FromDiscord<dom96> and what if nobody bothered to spend time on the 3 benchmarks?
16:03:43FromDiscord<dom96> you'd think Nim was slow
16:06:23FromDiscord<gerwy> I wouldn't but you can see how high nim is in those benchmarks↵Pretty interesting what you can pump out of it
16:07:37FromDiscord<dom96> yes, but a lot of it is to do with luck, Nim is lucky to have someone that knows how to write such highly efficient code
16:07:55FromDiscord<dom96> and I recall that person saying that it can be done in other languages too
16:08:12FromDiscord<dom96> maybe it's not as easy but it can be done, and then you'll see another language above Nim and think "oh, I guess Nim is slower"
16:08:25FromDiscord<dom96> and not know that this person spent a month full-time optimising their benchmark
16:08:28FromDiscord<dom96> vs. 1 week for Nim
16:09:03FromDiscord<gerwy> I checked Rust's solution source code and compared with Nim's one and well yeah i need to say Rust one looks like it required much less work
16:09:25FromDiscord<gerwy> And is still a little quicker
16:10:06FromDiscord<Yardanico> In reply to @dom96 "and not know that": yeah in this case (primes benchmark) I agree
16:10:21FromDiscord<Yardanico> as I said, generally native languages are in the same ballpark
16:10:35FromDiscord<dom96> yep
16:10:36FromDiscord<Yardanico> and for nim this is a big advantage as it feels like a scripting language
16:13:17FromDiscord<gerwy> Btw can someone on linux help me with this?↵I wanted to use nimqml and i need to have dotherside for that↵The problem is that there are no binaries for dotherside for linux, only for windows↵And i tried to compile it multiple times and always failed, even using their dockerfile....
16:13:21FromDiscord<gerwy> https://github.com/filcuc/dotherside
16:13:23nrds<R2D299> itHub: 7"C language library for creating bindings for the Qt QML language"
16:13:46FromDiscord<Yardanico> In reply to @Life Sucks "Btw can someone on": how did you compile it?
16:13:50FromDiscord<Yardanico> it was really easy for me, I can try now again
16:15:11FromDiscord<IsaacPaul> Yea some benchmarks require you to do x a certain way unless it's builtin like an arena allocator in rust. So of course rust is going to out perform any language where you are not allowed to avoid allocations in the rules.
16:15:27FromDiscord<gerwy> I mean i just have errors all the time and if anyone could provide me with binary i would be soo thankful
16:15:44FromDiscord<IsaacPaul> (edit) "any" => "~~any~~ some"
16:15:45FromDiscord<Yardanico> @gerwy i can provide the binary, but it's much better if you actually fix compilation on your end
16:15:48FromDiscord<Yardanico> what's the error message?
16:16:14FromDiscord<IsaacPaul> (edit) "language" => "languages"
16:16:19FromDiscord<gerwy> Ugh im still on my phone, but i have a history of me ranting that it doesnt work i will look for it, im in store now
16:16:22FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3Bdi
16:17:16FromDiscord<gerwy> In reply to @Yardanico "The build process is": Of course im not a moron, i always check for building instructions and do them exactly like they say ↵I think it was something with cmake
16:17:23FromDiscord<Yardanico> Of course you need Qt installed (with dev libraries), the compiler environment, and cmake itself
16:17:34FromDiscord<Yardanico> what distro are you on?
16:21:17FromDiscord<gerwy> I have Qt installed i thought it could be the problem too
16:21:28FromDiscord<gerwy> In reply to @Yardanico "what distro are you": PopOS, so basically Ubuntu
16:21:31FromDiscord<Yardanico> not just Qt, but Qt with development libraries
16:21:45FromDiscord<Yardanico> debian-based distros have separate packages for binaries and headers (for development) of packages
16:22:08FromDiscord<Yardanico> So yeah, when you get home, try `sudo apt-get install qtbase5-dev` and compiling again
16:23:02FromDiscord<Yardanico> Also might need `qtdeclarative5-dev`
16:23:16FromDiscord<gerwy> In reply to @Yardanico "not just Qt, but": Yeah, the one with -dev suffix
16:23:30FromDiscord<gerwy> In reply to @Yardanico "So yeah, when you": I will try thanks !
16:23:41FromDiscord<gerwy> In reply to @Yardanico "Also might need `qtdeclarative5-dev`": Thats more likely for me
16:25:18*neurocyte0132889 quit (Ping timeout: 260 seconds)
16:32:54FromDiscord<gerwy> Oh btw i found my rant about it and what didnt worked
16:32:58FromDiscord<gerwy> Can i paste it?
16:33:14FromDiscord<gerwy> Or screenshot it
16:34:05FromDiscord<Yardanico> sure
16:36:07FromDiscord<gerwy> https://media.discordapp.net/attachments/371759389889003532/896073481328930876/Screenshot_2021-10-08-18-35-58-20.jpg
16:40:35FromDiscord<gerwy> So can be qt lib i guess
16:40:45FromDiscord<gerwy> (edit) "So can be qt ... lib" added "dev"
16:41:09nixfreak_nim[m]is there a js backend repl for nim ?
16:44:47FromDiscord<Rika> no
16:48:07*jjido joined #nim
16:49:39nixfreak_nim[m]ok thanks
17:00:46FromDiscord<Yardanico> In reply to @Life Sucks "": you need to install qtbase-dev itself for this command, yeah
17:01:10FromDiscord<gerwy> i installed qtdeclarative5-dev and it failed to cmake
17:01:16FromDiscord<gerwy> installing qtbase-dev now
17:01:55FromDiscord<gerwy> already installed
17:02:08FromDiscord<Yardanico> qtbase5-dev ?
17:02:14FromDiscord<gerwy> qtbase5-dev yeah
17:02:23FromDiscord<gerwy> so i guess its not that
17:02:27FromDiscord<gerwy> but i found something
17:02:38FromDiscord<Yardanico> can you show a screenshot of full error message
17:02:47FromDiscord<Yardanico> also yeah, you need to remove the cmake files so it's not cached
17:02:49FromDiscord<gerwy> it has github workflows and there is linux section, there are packages that this CI uses
17:02:59FromDiscord<gerwy> `sudo apt-get install -y build-essential cmake qt5-default qtbase5-dev qtdeclarative5-dev qtquickcontrols2-5-dev qml-module-qtquick2 qml-module-qtquick-controls2 qml-module-qtquick-window2 xvfb lcov `
17:03:18FromDiscord<Yardanico> try this I guess, but you don't need xvfb
17:03:27FromDiscord<Yardanico> i assume you also already have build-essential installed
17:04:06FromDiscord<gerwy> okay trying to install them
17:04:22*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
17:04:27FromDiscord<gerwy> cmake without any errors 😳
17:04:50FromDiscord<gerwy> unless it used the previous one, i will delete everything in dir and try again
17:05:34FromDiscord<gerwy> 😳
17:06:33FromDiscord<gerwy> okay i did everything
17:06:56FromDiscord<gerwy> and it looks like it works... i mean it built and installed
17:08:06FromDiscord<gerwy> so i guess it was that↵thanks Yardanico! idk what i would do without you<3 and i wish this line of deps will be helpful for someone who will work with dotherside, because why put those deps in readme :) when you can hide them in CI
17:15:12FromDiscord<gerwy> okay i think everything is now good, it don't want to load a lib but its sure is just i didn't included it in PATH
17:22:21FromDiscord<gerwy> okay no i still have a problem
17:34:31*FonderElite quit (Ping timeout: 256 seconds)
17:35:45FromDiscord<IsaacPaul> In reply to @Life Sucks "so i guess it": Wait until you run into tools that only use CI for builds and have 0 support for doing it yourself. xD
17:41:49FromDiscord<gerwy> i made it work :DDD↵it was a lot of pain, installing Qt modules, searching for them but i made it work
17:42:21FromDiscord<NullCode> In reply to @IsaacPaul "Wait until you run": lmfao ikr
17:43:00FromDiscord<gerwy> now my only problems are↵-How to link libs statically, because i want to take the binary with me without needing libs↵-How to compile to Windows and compile it statically (fortunately i don't think to compile it again i think because they distribute dll files, at least i think so)
17:43:25FromDiscord<Rika> Static compilation is a pain in windows
17:43:51FromDiscord<gerwy> In reply to @IsaacPaul "Wait until you run": im still amazed that their own dockerfile didn't worked with it xD↵also i think the examples for that repo are so old they used `random()` function instead of `rand()` which i fixed
17:44:34FromDiscord<gerwy> In reply to @Rika "Static compilation is a": if i will be forced too... can i always do like, copy the .so or dll file into the same directory where binary is and make it use it?
17:49:29FromDiscord<NullCode> In reply to @Life Sucks "if i will be": yes
17:49:36FromDiscord<NullCode> but they need to be like
17:49:40FromDiscord<NullCode> right beside each other
17:49:44FromDiscord<NullCode> (aka same dir)
17:49:45FromDiscord<NullCode> to work
17:49:59FromDiscord<NullCode> I've wanted to static link some stuff myself tbh
17:50:13FromDiscord<NullCode> but found it was easier to just use pure Nim alternatives
17:53:55FromDiscord<gerwy> yeah i can have binary in the same dir as lib on windows its not a problem
17:54:50*neurocyte0132889 joined #nim
17:56:37FromDiscord<gerwy> but i will in future need to know if i can use it like that
17:56:47FromDiscord<gerwy> other than that im done thank youuu for your precious time
18:27:35*max22- quit (Ping timeout: 260 seconds)
18:48:47*tiorock joined #nim
18:48:47*tiorock quit (Changing host)
18:48:47*tiorock joined #nim
18:48:47*rockcavera is now known as Guest6566
18:48:48*Guest6566 quit (Killed (sodium.libera.chat (Nickname regained by services)))
18:48:48*tiorock is now known as rockcavera
18:56:49*max22- joined #nim
19:02:29*vicfred joined #nim
19:17:17*PMunch joined #nim
19:28:16*kayabaNerve quit (Remote host closed the connection)
19:28:34*kayabaNerve joined #nim
19:50:58*Gustavo6046 quit (Remote host closed the connection)
19:51:25*Gustavo6046 joined #nim
20:20:59FromDiscord<DMisener> sent a code paste, see https://play.nim-lang.org/#ix=3Beq
20:33:15FromDiscord<auxym> You need to create your nodes as `NodeRef` rather than `Node`
20:34:23FromDiscord<auxym> You can't create a ref to an existing value type
20:40:17FromDiscord<DMisener> Thanks.. I’ll give that as a try… seems like a shame that such a conversion or idiomatic scheme is not available. Would you happen to know why?
20:40:48FromDiscord<DMisener> (edit) removed "as"
21:03:10FromDiscord<Elegantbeef> It's simple memory allocation @DMisener Nodes are stack allocated so if you make a reference to them and they go out of scope you've now got either nil or pointers pointing at bad memory
21:03:30FromDiscord<Elegantbeef> But if you use reference nodes, you now have heap allocated objects which are not reliant on the scope state to be valid
21:04:09*PMunch quit (Quit: leaving)
21:04:13FromDiscord<Elegantbeef> If you know it's safe to use pointers you can do `ptr Node` and `link = node1.addr` but that's only if you know it's actually safe
21:04:50NimEventerNew post on r/nim by zemja_: What's the point in `ref object`?, see https://reddit.com/r/nim/comments/q46sc5/whats_the_point_in_ref_object/
21:07:04FromDiscord<DMisener> Are all local var stored on the stack ... and is it safe to assume their lifetime will last until the exit of the proc stack frame??
21:07:21FromDiscord<haxscramper> They have a point about function argument mutability↵(<@709044657232936960_=4eim=45venter=5b=49=52=43=5d>)
21:08:02FromDiscord<Elegantbeef> I think it's generally safe to assume all that
21:09:06FromDiscord<Elegantbeef> They have some sort of point, but given strict funcs and what a mutable ref is i dont follow
21:10:34FromDiscord<haxscramper> If you don't enable strict funcs ref argument can be either mutable or not
21:10:46FromDiscord<haxscramper> And strict funcs are experimental
21:11:06FromDiscord<haxscramper> So I'm pretty sure they don't know about it, and even if they do this still makes code unclear
21:11:06FromDiscord<Elegantbeef> The reference isnt mutable, what it points to is
21:11:16FromDiscord<Elegantbeef> Which is what i meant
21:12:34FromDiscord<haxscramper> Strict funcs turn this upside down anyway, but I guess that's how nim's version of constT vs const T looks like
21:12:52FromDiscord<Elegantbeef> But anywho my oddities aside, someone should provide a nice comment 😛
21:13:06FromDiscord<haxscramper> Rtfm
21:13:31FromDiscord<Elegantbeef> There's that heart warming attitude we've grown to expect 🙂
21:13:59FromDiscord<haxscramper> This is the best advice I can come up, at least considering long-term effects
21:32:28FromDiscord<DMisener> In reply to @NimEventer "New post on r/nim": Re: New post on r/nim by zemja_: What's the point in ref object?, see https://reddit.com/r/nim/comments/q46sc5/whats_the_point_in_ref_object/↵↵Same basic question as I had... but not replies/comments yet 😦
21:33:26FromDiscord<DMisener> (edit) "not" => "no"
21:35:03*xet7 quit (Remote host closed the connection)
21:36:02*xet7 joined #nim
21:59:29*vicfred quit (Ping timeout: 245 seconds)
22:03:22FromDiscord<auxym> I find ref objects mostly useful to model many-to-one relationships, where you want many objects to hold a reference to a given object
22:05:04FromDiscord<auxym> If you're used to java/python/etc, everything there is a ref (or almost), so you can use ref objects everywhere if you want to replicate this behavior.
22:05:33FromDiscord<auxym> Thus nim's OOP features (inheritance, methods) are based on ref objects
22:27:58*max22- quit (Quit: Leaving)
22:49:11*resumin joined #nim
22:49:52*resumin quit (Read error: Connection reset by peer)
23:58:39*Gustavo6046 quit (Remote host closed the connection)
23:58:59*Gustavo6046 joined #nim