<< 15-09-2023 >>

00:00:04*Batzy quit (*.net *.split)
00:00:04*Arthur quit (*.net *.split)
00:00:04*cm quit (*.net *.split)
00:00:04*acidsys quit (*.net *.split)
00:00:04*tk quit (*.net *.split)
00:00:35FromDiscord<sOkam! đŸ«> sent a code paste, see https://play.nim-lang.org/#ix=4Gpi
00:00:55*Batzy joined #nim
00:01:04FromDiscord<kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4Gpk
00:01:15FromDiscord<kingterrytheterrible12> in my case it doesnt matter really
00:01:21FromDiscord<kingterrytheterrible12> i just use it once then discard it
00:02:17*cm joined #nim
00:04:28*tk joined #nim
00:05:22*acidsys joined #nim
00:13:05FromDiscord<fenilli> So based on a question I had here: https://discord.com/channels/371759389889003530/753721959308853319/1152029565615616051 I would like to ask what is the pre/post proccess of writing an application that uses a c library?↔meaning, before writting the code, does I have to install sdks for it? add to path? or would it be better to git clone and use the C files? and post how do I link the files/headers if its needed to the compiler/linker?
00:13:37FromDiscord<kingterrytheterrible12> In reply to @fenilli "So based on a": its a bit complicated
00:14:11FromDiscord<kingterrytheterrible12> but it depends on what you doing ngl
00:16:19FromDiscord<demotomohiro> @fenilli Using C library from Nim is almost same to using C library from C.
00:17:25FromDiscord<fenilli> that is the problem, not a c developer but a js developer, so I'm accustomed to just install it and it runs, no need for compiling nor linking.
00:18:06FromDiscord<fenilli> so I have no clue on how to compile/link things in C, even so to wrap a library with it.
00:18:39FromDiscord<kingterrytheterrible12> In reply to @fenilli "that is the problem,": xd welcome to building C
00:19:14FromDiscord<kingterrytheterrible12> i literally stopped using C++ because configuring libs would take an awful long time and also messing with linker and other shit
00:19:22FromDiscord<demotomohiro> In reply to @fenilli "so I have no": These articles might help you:↔https://internet-of-tomohiro.netlify.app/nim/gccguide.en↔https://internet-of-tomohiro.netlify.app/nim/clibrary.en
00:23:45FromDiscord<fenilli> In reply to @demotomohiro "These articles might help": Awesome, I will read it to see if it helps me understand better on how to actually use C itself.
00:26:46FromDiscord<demotomohiro> In reply to @fenilli "Awesome, I will read": More document: https://nim-lang.org/docs/backends.html
00:28:58FromDiscord<fenilli> is this a typo or intended? `compileToC, cc` but it is `nim c hallo.nim`
00:32:03FromDiscord<demotomohiro> In reply to @fenilli "is this a typo": They are nim command compile to c: https://nim-lang.org/docs/nimc.html
00:32:37FromDiscord<demotomohiro> People just run `nim c hello.nim`
00:33:47FromDiscord<fenilli> yeh yeh, I meant that all others match, cpp to nim cpp, objs to nim objc but the cc goes to nim c in the docs.
00:33:56FromDiscord<fenilli> (edit) "objs" => "objc"
00:35:55FromDiscord<raynei486> I guess `cc` can be short for "c compiler"
00:36:29FromDiscord<fenilli> yeh but wouldn't that make cpp to ccpp and objc to cobjc instead to?
00:36:51FromDiscord<fenilli> not really a big deal, just found it odd that its the only different one.
00:41:51FromDiscord<kingterrytheterrible12> https://play.nim-lang.org/↔neat, never knew i can do this with version numbers in nim. its gonna help a whole lot with updating my app
00:58:28FromDiscord<raynei486> you didn't send anything in your link 💀
01:01:15FromDiscord<kingterrytheterrible12> In reply to @raynei486 "you didn't send anything": oh shit
01:02:07FromDiscord<kingterrytheterrible12> i fix
01:03:13FromDiscord<raynei486> oh I didn't even know string comparison could be like that
01:03:22FromDiscord<raynei486> lexicographical comparison powers?
01:03:26FromDiscord<kingterrytheterrible12> In reply to @raynei486 "oh I didn't even": yeah it helps a lot with version numbers
01:03:35FromDiscord<kingterrytheterrible12> In reply to @raynei486 "lexicographical comparison powers?": idk what that it but sounds like fax
01:03:46FromDiscord<kingterrytheterrible12> (edit) "it" => "is"
01:13:16*syl quit (Server closed connection)
01:16:32*syl joined #nim
01:21:51*lucasta_ quit (Quit: Quit)
01:41:26FromDiscord<kots> "11.1.1" > "3.2.1" = false, which might not be what you want
01:47:25FromDiscord<fenilli> I guess it would be more of a problem for minor and patch versions, as major 10 is really a lot already.
01:50:59*xmachina quit (Quit: WeeChat 4.0.4)
01:52:59*xmachina joined #nim
01:53:44*cm quit (Ping timeout: 246 seconds)
02:09:09*cm joined #nim
02:13:58FromDiscord<kingterrytheterrible12> In reply to @k0ts ""11.1.1" > "3.2.1" =": Oh shit
02:14:10FromDiscord<fenilli> In reply to @demotomohiro "These articles might help": Those pages where great! I think it was the best explanation ever for how C works with linking and how to use Nim in that.
02:14:22FromDiscord<fenilli> thanks for that page, helped a lot.
02:17:59*cm quit (Ping timeout: 245 seconds)
02:18:26*cm joined #nim
02:51:57*azimut quit (Ping timeout: 246 seconds)
03:15:49FromDiscord<m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=4GpK
03:15:56FromDiscord<m4ul3r> (edit) "https://play.nim-lang.org/#ix=4GpK" => "https://play.nim-lang.org/#ix=4GpL"
04:14:39*koltrast quit (Server closed connection)
04:18:30*koltrast joined #nim
04:39:13*blop_ quit (Remote host closed the connection)
04:39:44*blop_ joined #nim
04:40:20*Guest49 joined #nim
04:40:47*Guest49 quit (Client Quit)
04:54:16FromDiscord<pmunch> In reply to @Elegantbeef "install libclang": Have people stopped reading error messages? I mean sure, nobody ever reads a README, but now we won't even read the error message?
04:56:28FromDiscord<Elegantbeef> Reading is hard
05:04:55NimEventerNew Nimble package! zuhyo - The easiest way to interact with a graphql api, see https://github.com/arashi-software/zuhyo
05:27:39*attah quit (Server closed connection)
05:28:30*attah joined #nim
05:30:05*advesperacit joined #nim
05:39:39*cornfeedhobo quit (Server closed connection)
05:43:39*adium quit (Server closed connection)
05:45:47*adium joined #nim
05:49:06FromDiscord<nasuray> In reply to @k0ts ""11.1.1" > "3.2.1" =": For applications I've started using a version scheme of `YYYY.BUILD` where build is an incrementing number starting at `1001` that maintains lexicographical order meaning that for example after `1999` would be `22000` so this type of comparison would always be valid. Not that this is a the best way to attempt to compare version identifiers. But useful in other situations where you might get a l
05:51:26*cornfeedhobo joined #nim
06:11:39*PMunch joined #nim
06:40:52*NimBot quit (Server closed connection)
06:41:04*NimBot joined #nim
07:00:33*xet7 quit (Remote host closed the connection)
07:02:35*ntat joined #nim
07:08:19*xet7 joined #nim
07:16:08*cnx quit (Remote host closed the connection)
07:16:58*cnx joined #nim
08:22:23*ntat quit (Quit: leaving)
09:42:45*krux02 joined #nim
10:12:55om3gaconversion to enum with holes is unsafe <-- why?? :)
10:14:04om3gahttps://github.com/PMunch/nim-pcap/blob/36886f0162bba99efd0c57ca771275d561957cc2/pcap.nim#L261
10:15:50Amun-Raby design
10:15:55om3gaI googled, found a lot talks about warning, just cant get into it. Can this warning lead to bug or why compiler warns about this?
10:16:53Amun-Rait'll lead to an error iirc
10:17:32*blop_ quit (Remote host closed the connection)
10:17:52om3gaAmun-Ra: sad news
10:17:59*blop_ joined #nim
10:18:37om3gaand, how to deal with it? is there any alternatives? what I found not eliminates the warning
10:19:15om3gaeven enumutils .items iterator triggers warning
10:19:28Amun-Raone solution is to use case for conversion
10:20:24om3gathanks, I will try this now
10:20:33Amun-Rait doesn't end with an error, https://play.nim-lang.org/#ix=4GqL
10:21:23om3gaawesome thanks
10:24:55om3gawell.. maybe with this code it will not work? still reports warning
10:25:11Amun-Rayes, you'll always end with a warning
10:25:31Amun-Rathe compiler can't be sure the conversion is safe (except pehaps compile time conversion)
10:25:39PMunchom3ga, it has a warning because it's not a great situation to be in
10:25:40Amun-Raperhaps*
10:25:59om3gaaah, so I should not pay attention
10:26:10om3galike false positive issue
10:26:11Amun-Rause case for all the possible values and you'll be fine
10:26:18PMunchFor the PCAP library it shouldn't be an issue
10:26:28Amun-Raor disable the hint ;>
10:26:29PMunchAll the values that should be present in this field is covered by the enum
10:26:55PMunchThe problem is if you get a number like 175, which doesn't correspond to a LinkLayerType
10:27:08om3gayes, that's why this warning confuses
10:27:28PMunchBut as long as you have a valid PCAP file then you should never encounter any issues with it
10:27:50om3gaeven if I do: for n in LinkLayerType.low..LinkLayerType.high: ...
10:29:25om3gaPMunch, Amun-Ra thanks for explanation
10:29:32om3gaI will leave original code
10:30:32PMunchom3ga, if you do `for n in LinkLayerType.low..LinkLayerType.high:` it will produce invalid enum values, because there are numbers in that range which don't correspond to a value
10:32:36om3gaI tried all examples that found, all of them trigger warning
10:33:13om3gabetter to leave original code, if the warning will not dissapear anyway
10:33:20PMunchYes, they will all trigger a warning
10:33:27PMunchBut they don't trigger an error
10:33:38PMunchThey only trigger a warning during compilation right?
10:33:41om3gayes, everything works well
10:34:01om3gaPMunch: yes, it's compiler warning
10:34:13PMunchYeah, you won't get rid of that
10:34:38om3gavery confusing :)
10:34:53PMunchWell, you could. By padding the enum with something like InvalidLinkLayer1, InvalidLinkLayer2, etc.
10:35:02PMunchBut there's no benefit
10:35:26PMunchI guess you could also push a pragma to ignore the warning
10:37:49FromDiscord<_gumbercules> hmmm... I'm trying to invoke `llvm-ar` via emscripten's `emar.bat` but the list of bytecode files I'm asking it to archive is apparently exceeding the max size of the allowed command
10:38:19FromDiscord<_gumbercules> wonder if I can send it in a wildcard
10:51:18FromDiscord<_gumbercules> have a feeling this has something to do with windows and batch files
10:55:47FromDiscord<_gumbercules> okay - not ideal but storing the input file names in a text file and passing `@filename.txt` to `emar.bat` which invokes `llvm-ar` worked
10:58:08*azimut joined #nim
11:06:14om3gaPMunch: I believe users will not notice this, in any case if someone will feed strange pcap file, I will respond that such file is not supported haha
11:16:37*krux02 quit (Remote host closed the connection)
11:16:56*krux02 joined #nim
11:32:35*Mister_Magister joined #nim
11:48:39*Mister_Magister quit (Read error: Connection reset by peer)
11:51:36*Mister_Magister joined #nim
12:27:36FromDiscord<Chronos [She/Her]> If only I had the energy to actually work on my programming language
12:37:03FromDiscord<toma400> Funnily, before I get to know Nim, I was working on my own programming language...↔Then I found out Nim exists and fulfills literally everything my language wanted to be, and yet it is even better in several aspects (metaprogramming).↔↔Won't say that my plans for language are now gone, but I definitely feel like it's no longer that needed.
12:37:37FromDiscord<toma400> (edit) "(metaprogramming).↔↔Won't" => "(metaprogramming, cleaner approach of syntax, etc.).↔↔Won't"
12:37:59FromDiscord<toma400> (edit) "needed." => "urgent."
12:38:38FromDiscord<toma400> (edit) "get" => "got"
12:39:31*cm_ joined #nim
12:39:48*cm quit (Ping timeout: 240 seconds)
12:39:48*cm_ is now known as cm
12:47:26*rockcavera quit (Remote host closed the connection)
12:51:53FromDiscord<Chronos [She/Her]> That's fair
12:52:08FromDiscord<Chronos [She/Her]> I'm still wanting a JVM language tbh that's closer to Nim
12:54:18*rockcavera joined #nim
12:57:05FromDiscord<ShalokShalom (ShalokShalom)> Still pointing to Sulong \:D
12:57:05FromDiscord<ShalokShalom (ShalokShalom)> Still poiting to Sulong \:D
12:57:39FromDiscord<ShalokShalom (ShalokShalom)> It originally did mean C Compiler and got later renamed↔(@raynei486)
12:57:48FromDiscord<ShalokShalom (ShalokShalom)> As more compiler got added.
12:59:11FromDiscord<toma400> In reply to @chronos.vitaqua "I'm still wanting a": Oh yeah, this would be neat. Kotlin is super cool, but it also has its own quirks
12:59:45FromDiscord<Chronos [She/Her]> In reply to @ShalokShalom (ShalokShalom) "Still poiting to Sulong": Doesn't have JVM interop, is GraalVM specific
12:59:50FromDiscord<Chronos [She/Her]> In reply to @toma400 "Oh yeah, this would": For sure!
13:01:12FromDiscord<ShalokShalom (ShalokShalom)> Every Truffle language has interop with JVM↔(@Chronos [She/Her])
13:01:40FromDiscord<odexine> @treeform i apologise if you do not want to be pinged. I would like to ask about pixie and the colour it decodes into; is ColorRGBX assumed to be sRGB gamma-encoded or linear?
13:03:24FromDiscord<ShalokShalom (ShalokShalom)> And most of all, Java itself is implemented as Truffle language
13:03:44FromDiscord<ShalokShalom (ShalokShalom)> https://www.graalvm.org/latest/reference-manual/java-on-truffle/interoperability/
13:04:16FromDiscord<Chronos [She/Her]> In reply to @ShalokShalom (ShalokShalom) "Every Truffle language has": Hm, still has the issue of being Graal specific
13:04:26FromDiscord<Chronos [She/Her]> Though the interop part is nicer
13:05:52FromDiscord<odexine> In reply to @odexine "<@107140179025735680> i apologise if": please ping me along with the answer when (if?) you answer this, thank you
13:09:41FromDiscord<jviega> I mean, the JVM isn't particularly relevant anymore. It's still too heavyweight for really low end hardware, and in the server/desktop world it was built for, there are only two platforms. In 1995 when it came out, there were dozens. The Java ecosystem sure, I guess that could be a good reason to want a language targeted to the VM, but it feels crufty and legacy
13:11:06FromDiscord<Chronos [She/Her]> In reply to @jviega "I mean, the JVM": Minecraft modding is the biggest reason I want it
13:11:07FromDiscord<Chronos [She/Her]> And pretty much the only reason
13:11:15FromDiscord<Chronos [She/Her]> That's literally it lol
13:12:00FromDiscord<Chronos [She/Her]> Also aren't desktop devices seeing more variation again?
13:12:24FromDiscord<Chronos [She/Her]> Risc-V is on the rise, x64 is still obviously a major player, Mac is using arm now for Macs
13:13:19FromDiscord<toma400> In reply to @chronos.vitaqua "Minecraft modding is the": Gosh, yeah, there are already Kotlin and Groovy adopters for Forge, imagine Nim-like one. This would be huge
13:13:22FromDiscord<Chronos [She/Her]> But WASM is likely better for that anyway once WASI has a good API for interop with the host system
13:13:32FromDiscord<Chronos [She/Her]> In reply to @toma400 "Gosh, yeah, there are": It'd be hella cool tbh
13:13:37FromDiscord<toma400> Also funny to speedrun knowing you in one day, fellow Minecraft modding enthusiast 😅
13:13:46FromDiscord<toma400> (edit) "Also funny to speedrun knowing you in one day, fellow Minecraft modding enthusiast ... 😅" added "here"
13:14:10FromDiscord<Chronos [She/Her]> I'd port Nim to the JVM but... I tried that a while ago and gave up because it was just too much for me rip, may give it ago again but hm
13:14:31FromDiscord<Chronos [She/Her]> In reply to @toma400 "Also funny to speedrun": Haha yeah, I'm not active in the modding scene tbh but I would be if the JVM languages that currently existed suited me
13:15:23FromDiscord<Chronos [She/Her]> In reply to @chronos.vitaqua "I'd port Nim to": Tho tbh I did try that when I was much more inexperienced so... and I tried making it output to an assembler language instead of a subset of Java so hm
13:15:56FromDiscord<odexine> In reply to @odexine "<@107140179025735680> i apologise if": https://github.com/treeform/pixie/issues/545 I've opened an issue about this, sorry if it's irrelevant
13:16:08FromDiscord<toma400> In reply to @chronos.vitaqua "Haha yeah, I'm not": Honestly, Minecraft modding even with current ecosystem is super fun, given how much potential for extensions Mc gameplay has. Either way, wishing you good luck with it, or staying wherever you are feeling comfy right now.
13:16:21FromDiscord<Chronos [She/Her]> Thanks haha
13:16:38FromDiscord<Chronos [She/Her]> Honestly all I need to do is make a parser for my language then I could do codegen
13:16:46FromDiscord<Chronos [She/Her]> Oh well
13:19:58FromDiscord<toma400> sent a long message, see http://ix.io/4GrH
13:20:30FromDiscord<toma400> In reply to @chronos.vitaqua "Honestly all I need": Oh yeah, that sounds pretty good as well. Java seem like good language to make codegen for, given its verbosity 😅
13:20:30FromDiscord<toma400> (edit) "verbosity" => "verbosity, but also direct structure"
13:21:25FromDiscord<Chronos [She/Her]> Yeah haha
13:21:29FromDiscord<Chronos [She/Her]> It'll still suck majorly though aha
13:21:41FromDiscord<Chronos [She/Her]> The language will likely have major differences tho
13:21:45FromDiscord<jviega> amd64 and arm, don't think there's anything else worth supporting. When Java came out, there were two Sun hardware platforms, an IBM one, a DEC one, an SGI one, Intel, Motorolla, and probably 3 or 4 others I'm forgetting about, and the OSes were much more diverse than they are now
13:22:15FromDiscord<Chronos [She/Her]> Risc-V is gaining traction though, there's even a laptop released using a Risc-V CPU now apparently
13:22:36FromDiscord<Chronos [She/Her]> In reply to @jviega "amd64 and arm, don't": Yeah that's fair though
13:23:26FromDiscord<jviega> Posix is also far broader than it was then, and very well implemented.
13:24:30FromDiscord<jviega> Across any platform even remotely unix based, which has become almost all of them (Mac wasn't at the time), you can reliably target the Posix API
13:25:16FromDiscord<jviega> So the JVM is just overhead and cruft now that it's far more practical to automatically target all hardware your users are likely to use.
13:25:56FromDiscord<jviega> Even if that becomes 3 platforms, the JVM is still a solution to a portability problem the world currently doesn't have, so it seems like a dinosaur
13:27:23FromDiscord<Chronos [She/Her]> In reply to @jviega "Across any platform even": Windows is an exception now, no?
13:27:32FromDiscord<Chronos [She/Her]> In reply to @jviega "Even if that becomes": How about WASM, what do you think about that?
13:33:39NimEventerNew thread by sls1005: Usage of rawProc, see https://forum.nim-lang.org/t/10485
13:52:41*PMunch quit (Quit: Leaving)
13:56:42*ntat joined #nim
13:59:20*genr8eofl quit (Ping timeout: 255 seconds)
14:02:00FromDiscord<nnsee> In reply to @chronos.vitaqua "Minecraft modding is the": i wrote an extension for Burp Suite which uses Graal's polyglot functionality and lets the user load up scripts in any polyglot-supported language (this isn't it's _main_ feature, just a neat thing to show off). Currently I'm fronting javascript for it but it works with any Polyglottable language
14:02:18FromDiscord<Chronos [She/Her]> Burp Suite?
14:02:59FromDiscord<nnsee> not really important here, but it's a local proxy application tailored for web app pentesters
14:03:13FromDiscord<nnsee> what's important is that it's a Java application :p
14:04:21FromDiscord<nnsee> the neat thing is that my extension doesn't require the host to run a graal JVM at all, the polyglot functionality can be loaded into any Java runtime (which I do - although without Graal, it's a tad bit slower)
14:05:20FromDiscord<Chronos [She/Her]> I'm pretty sure SuLong is the exception which is the issue
14:05:56FromDiscord<Chronos [She/Her]> Hm... debating on if I should take a crack again at making a JVM backend for Nim
14:06:05*jmdaemon quit (Ping timeout: 248 seconds)
14:06:57FromDiscord<Chronos [She/Her]> I could modify jsgen this time
14:07:05FromDiscord<Chronos [She/Her]> Instead of trying to roll my own
14:07:09FromDiscord<Chronos [She/Her]> Hm...
14:08:43FromDiscord<nnsee> here's a cursed idea: run the jsgen'd code using Truffle
14:09:22FromDiscord<Chronos [She/Her]> Slow though
14:09:32FromDiscord<Chronos [She/Her]> Also I'd imagine it wouldn't run too well
14:10:00FromDiscord<Chronos [She/Her]> Also Nim's JS is meant for web, Truffle also does web JS (and doesn't support using NodeJS interop from Java)
14:10:28FromDiscord<Chronos [She/Her]> And most stuff just doesn't work with js purely because certain libs aren't available
14:12:07FromDiscord<Chronos [She/Her]> With Java, a lot more libs can be filled
14:12:39FromDiscord<Chronos [She/Her]> In reply to @chronos.vitaqua "Also I'd imagine it": (Because of Nim generating a lot of code occasionally, with Java this isn't as much of an issue bc the compiler optimises it)
14:12:58FromDiscord<Chronos [She/Her]> Also would be fun to see if the entire compiler could be compiled to Java too
14:13:16FromDiscord<nnsee> I don't really know about Nim's jsgen capabilities, but considering it has a `-d:nodejs` which enables NodeJS features, I wouldn't say it's "just for the web"
14:13:27FromDiscord<nnsee> at least the hello world works :p https://media.discordapp.net/attachments/371759389889003532/1152245799867129898/image.png
14:13:34FromDiscord<nnsee> there you go, nim on the jvm
14:13:35FromDiscord<Chronos [She/Her]> That doesn't do much, still supports barely anything
14:14:24FromDiscord<nnsee> although I have no idea how you would do java interop with this :p
14:14:57FromDiscord<Chronos [She/Her]> https://nim-lang.org/docs/backends.html#backends-the-javascript-target
14:15:11FromDiscord<Chronos [She/Her]> In reply to @nnsee "although I have no": Likely a lot of `Java.type`s and similar
14:18:10FromDiscord<nnsee> oh, the `-d` flag just _runs_ it with node
14:18:14FromDiscord<nnsee> that's kind of underwhelming
14:18:21FromDiscord<Chronos [She/Her]> https://github.com/Yu-Vitaqua-fer-Chronos/Nimpiler also realised I have this abomination from ages ago xD
14:18:43FromDiscord<Chronos [She/Her]> Nimskull folks helped me a lot tho and I appreciate it even tho it wen't nowhere in the end
14:25:47FromDiscord<nnsee> well this was incredibly surprising
14:26:20FromDiscord<nnsee> the JS code seems to run faster on the JVM than using node... (in this one specific benchmark I got from the first result of google)
14:26:36FromDiscord<nnsee> https://media.discordapp.net/attachments/371759389889003532/1152249108661284914/image.png
14:27:04FromDiscord<nnsee> is there a large collection of nim benchmarks anywhere?
14:27:37FromDiscord<Chronos [She/Her]> In reply to @nnsee "is there a large": Not sure
14:27:43FromDiscord<Chronos [She/Her]> In reply to @nnsee "the JS code seems": Hm odd
14:27:58FromDiscord<Chronos [She/Her]> I mean tbf V8 is bulkier
14:29:14FromDiscord<nervecenter> Is this using Nashorn?
14:29:16FromDiscord<nnsee> I would've V8 to be slightly faster or maybe on par, but not 3x slower (i'm not measuring startup, just actual runtime)
14:29:23FromDiscord<nnsee> In reply to @nervecenter "Is this using Nashorn?": no, Graal
14:29:31FromDiscord<nnsee> graaljs specifically
14:29:40FromDiscord<nervecenter> that might explain it, Graal is an optimizing compiler is it not?
14:30:39FromDiscord<nnsee> I mean so is V8
14:30:42FromDiscord<nnsee> both are JIT compilers
14:31:06FromDiscord<nervecenter> Yeah but V8 can only compile some subset of what it's fed, the rest has to be interpreted
14:31:31FromDiscord<nervecenter> Graal has to find a way to compile all the JS code to JVM bytecode, right?
14:31:42FromDiscord<Chronos [She/Her]> They still have an interpreted mode
14:32:48FromDiscord<Chronos [She/Her]> I'd know bc I used to do some small work on Grakkit lol, was something that used GraalJS to let you make MC plugins for Spigot with JS
14:33:19FromDiscord<nnsee> that sounds incredibly similar to my burp extension
14:34:40FromDiscord<Chronos [She/Her]> Oh?
14:41:45FromDiscord<Chronos [She/Her]> Hm... Trying to think about how I should work on my java backend
14:41:57FromDiscord<Chronos [She/Her]> Fork the compiler or use it as a library hm...
14:50:13FromDiscord<Chronos [She/Her]> Incremental compilation is uselsss currently, right? In the code (as in no reason to implement it in my project as the work needed isn't done on the Nim compiler side)
14:55:05FromDiscord<Chronos [She/Her]> GC stuff is useless to me, right? Because, Java has many GCs-
14:55:13FromDiscord<Chronos [She/Her]> Sigh this is how I lose motivation~
14:56:13FromDiscord<nnsee> i would assume so
14:56:17FromDiscord<nnsee> same for the js backend, no?
15:03:21FromDiscord<Phil> TFW you can't assign to nil because that segfaults
15:04:06FromDiscord<Chronos [She/Her]> In reply to @nnsee "same for the js": Yeah
15:04:35FromDiscord<nnsee> all of the benchmarks i've run have been faster on the graal js implementation than on node
15:04:41FromDiscord<nnsee> this is... very surprising to me
15:04:57FromDiscord<nnsee> the nim benchmarks, specifically
15:05:22FromDiscord<nomad> sent a code paste, see https://play.nim-lang.org/#ix=4Gsj
15:05:42FromDiscord<nnsee> install zlib?
15:06:04FromDiscord<nomad> https://zlib.net ?
15:07:50FromDiscord<nomad> or from where?
15:08:10FromDiscord<nomad> i dont know much about headers and C and all that
15:14:28FromDiscord<Phil> sent a long message, see http://ix.io/4Gsp
15:14:41FromDiscord<Phil> (edit) "http://ix.io/4Gsp" => "http://ix.io/4Gsq"
15:14:48FromDiscord<nomad> omg 😭
15:14:50FromDiscord<Phil> Where I'd just go to my package manager and type in "please install zlip"
15:14:53FromDiscord<Phil> (edit) "zlip"" => "zlib""
15:17:39FromDiscord<Phil> Pointers. are. hell.
15:17:49FromDiscord<enthus1ast> @nomad\: just put it somewhere mingw is looking for includes and/or add the path where the stuff lies to mingw include path (-I)
15:18:38FromDiscord<nomad> idek where zlib is 😭
15:18:59FromDiscord<enthus1ast> why are you want to use zip anyhow?
15:19:13FromDiscord<Phil> enthus1ast with the greatest of english
15:19:13FromDiscord<enthus1ast> why not just use zippy? (pure nim zip library)
15:19:29FromDiscord<nomad> appearently i need zlib.h to send post requests
15:19:32FromDiscord<nomad> ://
15:19:39FromDiscord<enthus1ast> what?
15:19:41FromDiscord<Phil> code or it didn't happen!
15:19:51FromDiscord<enthus1ast> post requests with what?
15:19:58FromDiscord<nomad> puppy
15:21:23FromDiscord<enthus1ast> mh puppy uses zippy
15:21:58FromDiscord<nomad> then idk whats the error
15:22:14FromDiscord<nomad> im gonna do some more debugging
15:22:24FromDiscord<enthus1ast> to which api you wanna send requests to?
15:22:26FromDiscord<nomad> my own
15:22:59FromDiscord<enthus1ast> can you try\:↔↔nimble remove puppy↔numble install puppy
15:23:04FromDiscord<enthus1ast> nimble^
15:23:15FromDiscord<nomad> sent a code paste, see https://play.nim-lang.org/#ix=4Gsw
15:23:15FromDiscord<nomad> so thats not the error
15:23:22FromDiscord<nomad> In reply to @enthus1ast "can you try\: ": sure
15:23:23FromDiscord<enthus1ast> well
15:23:37FromDiscord<enthus1ast> maybe the js code sets a compression header
15:23:47FromDiscord<nomad> OH WAIT
15:24:04FromDiscord<nomad> DOESNT PUPPY AUTOMATICALLY MAKE SOME HEADER THING GZIP IF EMPTY
15:24:07FromDiscord<nomad> that might be the error here
15:24:29FromDiscord<enthus1ast> but it uses zippy which imho can actually do zlib
15:24:53FromDiscord<enthus1ast> idk where zlib comes from actually
15:25:49FromDiscord<enthus1ast> "Zippy is an implementation of DEFLATE, ZLIB and GZIP data compression formats."
15:26:01FromDiscord<enthus1ast> so it CAN do zlib on its own
15:26:36FromDiscord<nomad> alr
15:26:36FromDiscord<enthus1ast> i would reinstall puppy and zippy and see if you just had an ancient version
15:27:48FromDiscord<enthus1ast> for me, puppy worked remarkably good so far, i use it quite often
15:29:31FromDiscord<enthus1ast> hey, i give my best here \:)↔(@Phil)
15:34:22FromDiscord<jviega> @Chronos [She/Her] I like WASM. Browsers shouldn't let untrusted people run native code, and it's much more appropriate than the JVM for that use case.
16:07:20*junaid_ joined #nim
16:19:56FromDiscord<millymox> Any prospect for NIM on Android app development? Or IOS?
16:20:19FromDiscord<millymox> (edit) "NIM" => "nim"
16:23:06FromDiscord<Langosta> In reply to @millymox "Any prospect for nim": https://github.com/treeform/glfm
16:23:16FromDiscord<Langosta> This is what I have found regarding mobile
16:31:16FromDiscord<Chronos [She/Her]> In reply to @jviega "<@524288464422830095> I like WASM.": Neato!
16:32:10FromDiscord<Chronos [She/Her]> What do you think about using it for plugin systems, for example? For games or similar
16:32:42*azimut quit (Ping timeout: 246 seconds)
16:39:11*calebjohn quit (Server closed connection)
16:39:35*calebjohn joined #nim
16:47:48FromDiscord<jmgomez> In reply to @millymox "Any prospect for nim": There is also NimForUE
16:48:18*disso-peach quit (Quit: Leaving)
17:05:43FromDiscord<taperfade>
17:06:51*krux02 quit (Remote host closed the connection)
17:24:43FromDiscord<bhunao> yo, anyone here know a lot of git?
17:25:11*attah quit (Read error: Connection reset by peer)
17:25:31FromDiscord<bhunao> i wanna create a repo to save notes and auto commit
17:25:45FromDiscord<bhunao> but i don't know where do even start
17:26:02FromDiscord<Chronos [She/Her]> Debating on if I should just remake Nim's CLI stuff for my JVM backend
17:27:07FromDiscord<Chronos [She/Her]> Yeah I'll prolly do that, since that way I can properly understand the code
17:29:01*attah joined #nim
17:29:10FromDiscord<Langosta> In reply to @bhunao "yo, anyone here know": I'm not as versed in git, but I took a free course that was very helpful
17:29:16FromDiscord<Langosta> I could link if you're interested
17:29:54FromDiscord<Langosta> As for auto-commits, that may be a simple shell script on your host that you can set on a timer/event
17:30:40FromDiscord<bhunao> i know how to use git, just wanna know if theres a good way of doing that ideia
17:31:08FromDiscord<Langosta> I see, I apologize
17:31:26FromDiscord<bhunao> no need for apologies
17:31:32FromDiscord<bhunao> u did nothing wrong
17:38:59FromDiscord<bhunao> In reply to @alendrik "As for auto-commits, that": gonna try to make this with nim
17:42:16FromDiscord<Langosta> oooo, I definitely think you can do it in nim too
17:42:31FromDiscord<Langosta> that'd a cool project
18:05:56FromDiscord<frobnicate> In reply to @millymox "Any prospect for nim": I'm trying to figure out porting to Android without Android studio but it sucks
18:11:41*advesperacit_ joined #nim
18:11:43*advesperacit quit (Ping timeout: 264 seconds)
18:13:39FromDiscord<Chronos [She/Her]> In reply to @frobnicate "I'm trying to figure": Porting?
18:18:04FromDiscord<Chronos [She/Her]> Need to figure out how to accept define flags like how Nim does
18:18:16FromDiscord<Chronos [She/Her]> With cligen
18:23:46*krux02 joined #nim
18:51:26FromDiscord<gnubyte> Howdy, was wondering if anyones familiar with the Norm library (ORM)? A lot of ORMs have like a DB init or startup to create the initial tables but I wasn't seeing that in norm's docs. Anyone know if thats a thing?
19:10:08*advesperacit_ quit (Ping timeout: 244 seconds)
19:10:50*advesperacit joined #nim
19:12:52FromDiscord<gnubyte> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1152315760803315793): Howdy, was wondering if anyones familiar with the Norm library (ORM)? A lot of ORMs have like a DB init or startup to create the initial tables but I wasn't seeing that in norm's docs. Anyone know if thats a thing?↔↔edit\: Nevermind I'm seeing a statement to call createTables. I think Im set.
19:27:21FromDiscord<raynei486> In reply to @bhunao "i wanna create a": you can make a script to auto commit, then if you need more flexibility there's hooks
19:27:30FromDiscord<raynei486> pretty sure there's hooks for commit messages?
19:27:37FromDiscord<raynei486> if you're into that
19:30:32*om3ga quit (Read error: Connection reset by peer)
19:33:17*om3ga joined #nim
19:34:34FromDiscord<bhunao> In reply to @raynei486 "you can make a": can you explain me what are hooks? i'm confused by this word
19:56:37FromDiscord<Phil> In reply to @jviega "<@524288464422830095> I like WASM.": How does WASM address this usecase?↔In the end you can just serve a WASM program and the browser will eat and execute it, no? ↔I haven't used WASM myself so no idea if there are additional mechanisms that enable trusting anything from or happening in a browser in any capacity.
19:57:35FromDiscord<Phil> In reply to @bhunao "gonna try to make": bash script on a cronjob if you're on Linux
19:58:01FromDiscord<jviega> Notice how browsers already have a sandbox for JavaScript
19:58:48FromDiscord<jviega> Just need to be able to use languages other than JavaScript 🙂
19:58:53FromDiscord<Phil> In reply to @bhunao "can you explain me": Git has hook file. You actually already have some dummy files in your .git folders in your projects
19:59:07FromDiscord<Phil> In reply to @jviega "Just need to be": Ohhhh you meant it's safer by virtue of not having access to the native environment and that is the safe part of it
19:59:11FromDiscord<Phil> Okay that I get
19:59:19FromDiscord<Phil> (edit) "file." => "files."
19:59:37FromDiscord<jviega> Yup
19:59:58FromDiscord<Phil> Git executes those hook files when the scenario is triggered.↔https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks↔For docs on it
20:00:00FromDiscord<Phil> (edit)
20:00:20FromDiscord<Phil> (edit) "is triggered.↔https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks↔For" => "for that hook occurs.↔https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks↔For"
20:04:03*ntat quit (Quit: leaving)
20:12:56FromDiscord<bhunao> In reply to @isofruit "<@108320936549158912> Git executes": ty, gonna take a look
20:15:26*junaid_ quit (Remote host closed the connection)
20:35:39*advesperacit quit ()
20:35:57FromDiscord<acornes> is it possible to use nim for github pages?
20:36:08FromDiscord<raynei486> as in html?
20:36:21FromDiscord<acornes> like use jester for github pages
20:38:25FromDiscord<Phil> In reply to @acornes "like use jester for": I'm fairly sure github doesn't allow you to execute server-side code period. It does allow you to use it as a server to serve files and thus static webpages, like nimibook uses it for
20:38:34FromDiscord<Phil> (edit) "code" => "codem"
20:38:39FromDiscord<Phil> (edit) "codem" => "code,"
20:39:37FromDiscord<acornes> oooh ok thanks, i was setting up my page and in github actions i searched nim by curiosity and saw a couple things
20:39:51FromDiscord<acornes> https://github.com/marketplace/actions/install-nim
20:40:09FromDiscord<Phil> In reply to @acornes "oooh ok thanks, i": Yeh that's to one-time execute nim-code in order to build pages
20:40:25FromDiscord<Phil> But you don't get to have a server to permanently execute code on said github pages
20:41:15FromDiscord<Phil> In reply to @acornes "oooh ok thanks, i": Sidenote, if you want workflow examples to run tests and generate and deploy docs I've got various examples in a documentation-repo I maintain on github should you want
20:41:19FromDiscord<Phil> (edit) removed "should you want"
20:41:50FromDiscord<acornes> oooh alright thank you
20:59:08*jmdaemon joined #nim
21:03:45FromDiscord<kingterrytheterrible12> does nim have something like java interfaces
21:06:50FromDiscord<_gumbercules> No
21:07:05FromDiscord<_gumbercules> People have added support for interfaces via macros
21:07:11FromDiscord<kingterrytheterrible12> 💀
21:07:18FromDiscord<_gumbercules> well you don't need interfaces with Nim really
21:07:25FromDiscord<_gumbercules> you can get away with using parametric polymorphism + concepts
21:07:32FromDiscord<Phil> sent a long message, see http://ix.io/4GtN
21:07:36FromDiscord<Langosta> I meannnn Javva interfaces are basically types that guarantee behavior
21:07:38FromDiscord<_gumbercules> and you have something that works similar to an interface or behavior or trait or whatever
21:07:43FromDiscord<Langosta> so by design, the type system does that
21:07:56FromDiscord<Phil> (edit) "http://ix.io/4GtN" => "http://ix.io/4GtO"
21:08:04FromDiscord<kingterrytheterrible12> In reply to @isofruit "Not fully. An interface": alright thanks
21:08:45FromDiscord<Phil> (edit) "http://ix.io/4GtO" => "http://ix.io/4GtQ"
21:08:53FromDiscord<Phil> (edit) "http://ix.io/4GtQ" => "http://ix.io/4GtR"
21:27:05FromDiscord<Chronos [She/Her]> In reply to @isofruit "But you don't get": Not with that attitude you can't!
21:27:42FromDiscord<Chronos [She/Her]> Compile a C compiler to WASM (that can output WASM) then compile Nim itself to WASM then just fill some missing WASI functions, ez
21:29:31FromDiscord<Phil> In reply to @chronos.vitaqua "Compile a C compiler": Reasonably sure that still only executes in your browser and any RPC calls or the like to github itself will fail because the process that'd need to run there would be stopped 😛
21:29:54FromDiscord<Chronos [She/Her]> Ehhhh fair enough
21:31:28FromDiscord<Langosta> Pages is only for static pages
21:31:36FromDiscord<Langosta> so like, nothing at all will run on backend
21:32:15FromDiscord<Chronos [She/Her]> ~~Long running GitHub action~~
21:41:32*nmz quit (Server closed connection)
21:41:42*nmz joined #nim
21:51:06*disso-peach joined #nim
22:06:03FromDiscord<millymox> You guys should make a channel for crypto (not cryptocurrency, cryptographic algs)
22:07:19FromDiscord<raynei486> that could be #security
22:24:56FromDiscord<that_dude.> Or #science
22:31:31FromDiscord<Langosta> In reply to @millymox "You guys should make": ya, that's in science
22:39:20FromDiscord<raynei486> Is there any tutorials on writing macros
22:39:24FromDiscord<raynei486> other than the official one
22:56:02FromDiscord<Elegantbeef> https://dev.to/beef331/demystification-of-macros-in-nim-13n8
23:00:58FromDiscord<Phil> sent a long message, see http://ix.io/4Gue
23:02:02FromDiscord<Phil> (edit) "http://ix.io/4Gue" => "http://ix.io/4Guf"
23:02:33FromDiscord<Phil> I guess 4) There's so many nimnode kinds it makes no sense to learn them all by heart
23:03:12FromDiscord<raynei486> Everything is just `NimNode`?
23:04:07FromDiscord<Phil> Everything is just a bunch of NimNodes containing other NimNodes, containing even more NimNodes.
23:04:10FromDiscord<_gumbercules> In the ast
23:05:54FromDiscord<_gumbercules> Before it is lowered to C or C++ etc
23:06:02FromDiscord<_gumbercules> Via codegen
23:06:28FromDiscord<_gumbercules> Nims macros are simply ast munging
23:07:53FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Gug
23:08:33FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4Gug" => "https://play.nim-lang.org/#ix=4Guh"
23:11:05FromDiscord<Phil> And like that is at least how I proceed with macros all the time:↔I am aware of the nim syntax I want, I look via dumpTree how the AST (Abstract syntax tree) for that is structured and look at how I can generate that exact same AST.↔Then I define myself what the user should write, write a macro that accepts that input (the "input AST"), parses the relevant necessary info out of the AST and generates the actual AST I want and returns that
23:11:37FromDiscord<Phil> (edit) "And like that is at least how I proceed with macros all the time:↔I am aware of the nim syntax I want, I look via dumpTree how the AST (Abstract syntax tree) for that is structured and look at how I can generate that exact same AST.↔Then I define myself what the user should write, write" => "sent" | "macro that accepts that input (the "input AST"), parses the relevant necessary info out of the AST and generates the actual AST I
23:11:47FromDiscord<Phil> (edit) "http://ix.io/4Guk" => "http://ix.io/4Gul"
23:26:28FromDiscord<millymox> sent a code paste, see https://paste.rs/HugHM
23:27:10FromDiscord<millymox> The entire message decrypts fine, “This is a test message.” But is followed by
 some characters?
23:33:31FromDiscord<Elegantbeef> The best description of Nim macros really are "User defined compiler passes"
23:34:41FromDiscord<Phil> While that's true, if you start with zero knowledge that statement about tells you nothing
23:35:28FromDiscord<demotomohiro> Macro is like writing Nim code that generates Nim code (actually NimNode)
23:35:51FromDiscord<_gumbercules> Metaprogramming
23:36:02FromDiscord<_gumbercules> Writing a program that programs itself
23:36:45FromDiscord<demotomohiro> In reply to @_gumbercules "Metaprogramming": Exactly
23:43:51FromDiscord<astrolemonade> Is Mastering Nim relevant for Nim 2. Also: is there a place to buy Mastering Nim at a cheaper price+elecronic version? On Amazon it's expensive.
23:45:39FromDiscord<kingterrytheterrible12> In reply to @astrolemonade "Is Mastering Nim relevant": what is that
23:54:49FromDiscord<Phil> In reply to @kingterrytheterrible12 "what is that": Araqs book
23:54:57FromDiscord<kingterrytheterrible12> wheresit at
23:55:37FromDiscord<Phil> In reply to @astrolemonade "Is Mastering Nim relevant": There's a mastering nim 2.0 which has an electronic version the prior one didn't offer.↔And yeah that one is I think specifically aimed at 2.0 as I'm willing to bet it also includes ARC/ORC
23:55:56FromDiscord<Phil> In reply to @kingterrytheterrible12 "wheresit at": Amazon. Note that you shou
23:56:03FromDiscord<Phil> (edit) "shou" => "should pay close attention to what the book is"
23:56:10FromDiscord<kingterrytheterrible12> In reply to @isofruit "Amazon. Note that you": i aint buying shit
23:56:13FromDiscord<Phil> There's plenty a scam book on there, written together via AI and not proof-read
23:56:22FromDiscord<kingterrytheterrible12> the book is not FREE AS IN FREEDOM
23:58:14FromDiscord<Phil> If you want a book thrown at you, read the manual and module-docs 😛