<< 05-04-2020 >>

00:00:02*junland quit (Quit: %ZNC Disconnected%)
00:00:17ryukopostinghexchat probably moved more bytes around to send this message than your kernel needs to copy in order to make a forked page table
00:00:38ryukopostingthe cost comes in when you deal with the page faults caused by exec
00:00:55ryukopostingbut either way, you're loading something from disk
00:01:43*junland joined #nim
00:02:46FromGitter<awr1> https://unix.stackexchange.com/a/155020
00:02:46FromGitter<awr1> hm
00:02:55FromGitter<awr1> so the whole memory image is COW'd
00:03:34ryukopostingmy *guess* is that linux probably immediately makes a copy of whatever page the bottom of the stack is currently in, since those are almost certainly going to change very quickly
00:04:19ryukopostingand, if it's immediately followed by an exec in one of the processes, copying anything else would be inefficient
00:05:27leorizehttps://github.com/rtomayko/posix-spawn#benchmarks
00:05:53leorizewell so instead of guessing, we can just know the difference and use whatever suits the use case best
00:07:58ryukopostingthe numbers illustrate exactly what I'm saying. If the linux implementation copies the entire page table, it copies the entire page table. That's a performance problem. The OSX one works fine
00:08:49leorizestill 2x the time though :P
00:08:55ryukopostinguse the faster tool when it makes sense, but that doesn't make fork() bad
00:09:03ryukopostingthat's the thing I'm trying to defend here
00:09:41leorizewell you could have just said the other use cases of fork() than trying to defend fork-exec :P
00:09:56leorizeopenbsd got a pretty compelling one regarding security
00:10:02ryukopostingno, it's the thread thing that set me off
00:10:19ryukopostingtotally different thing for a totally different purpose
00:10:56leorizepthreads doesn't exist until posix finally gets that fork() is not a replacement for it
00:11:31*couven92 quit (Quit: Client Disconnecting)
00:11:50ryukopostingyou wanna know what sets me off even more than people trying to compare processes and threads
00:12:07ryukopostingpeople that use C for things C isn't designed to do, then complain about how bad it is
00:12:25ryukopostinggo write a kernel in Java, have fun
00:13:17leorizeC is designed to do everything, except when it isn't :)
00:13:38ryukopostingthat's what posix thinks at least
00:13:49leorizesomeone even have the balls to write a kernel in C# actually, I've seen it
00:14:52ryukopostinguntil some other language has even half the support for cross-compilation, C will always rule the worlds of systems and embedded programming
00:15:06leorizezig pulled it off
00:15:24ryukopostingis Zig LLVM?
00:15:33leorizetheir aim is to dethrone C anyway
00:15:47leorizeyea, zig is llvm-based
00:15:57ryukopostingthat's the only way anyone is gonna do it within the next 10 years
00:16:09leorizeand yes, I do know places where llvm don't want to support :P
00:16:31ryukopostingZig makes Nim look like a well-known mainstream project
00:16:59leorizegotta say, you can hate the gpl all you want, but thanks to gcc's licensing we got compilers for all sorts of weird architectures
00:17:41ryukopostinggood god dude
00:17:48FromDiscord<Rika> `Zig makes Nim look like a well-known mainstream project` what do you mean
00:17:56ryukopostingthe weird abominations of ancient versions of GCC I see at work
00:18:33ryukopostingNim's not exactly a ubiquitous thing is all I'm saying. It SHOULD be
00:20:22leorizeto be fair, zig has shown how slow nim grow :P
00:20:42ryukopostingI think nim's long beta stage was good
00:21:25leorizeit's rather poor marketing
00:21:35FromDiscord<Rika> nim needs more media prescence
00:21:38leorizeour userbase doesn't even grow half the rate of everyone else
00:21:39FromDiscord<Rika> presence
00:22:04leorizewhich is the main reason why nim has so little users compared to its age
00:22:23leorize4raq solo-ed the project for several years before dom joins in iirc
00:22:40FromDiscord<Rika> he's got some dedication
00:22:52ryukopostingeven worse marketing would have been going 1.0 with a compiler that doesn't work right, no package manager, and a miniscule support team that couldn't handle millions of scornful HackerNews comments
00:22:54FromDiscord<Rika> or maybe intense disliking of other languages 😛
00:23:17FromDiscord<Rika> ryukoposting, who are you implying lmao
00:23:21FromDiscord<Rika> V?
00:23:43ryukopostingnobody, but that's what Nim would have been if it went 1.0 say, 2 years ago
00:24:30FromDiscord<Rika> did nimble exist back in 0.18 or so?
00:25:41leorizeiirc nim only got a surge of contributors around 2017
00:25:44*IWSnim joined #nim
00:26:04leorize4raq was ahead of his time :p
00:26:35*voltist quit (Quit: Leaving)
00:26:45leorizeit appears that when he first advertised it on the Lazarus forums, they shunned him away
00:26:53ryukopostingRika: yes, but it didn't work great. I don't remember exactly when nimble.directory became it came long after I started using Nim around 0.17
00:27:08IWSnimNew to nim...how do I turn @[84, 69, 84, 82, 73, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0] back into an ASCII string?
00:27:19IWSnimI've been digging through the stdlib for quite a while now
00:27:24ryukopostingoh i had to do this like 2 days ago and now I forgot
00:27:25ryukopostingone sec
00:28:00leorizeIWSnim: a for loop should do there
00:28:21IWSnimoh, then I can just use $ on the standalone to cast back to ascii?
00:28:27ryukopostingis it a char sequence or a seq of bytes?
00:28:33IWSnimsequence of bytes
00:29:13ryukopostingif it's seq[char] then yeah I'd do import sequtils, strutils; asdf.mapIt($it).join
00:29:20*dwdv quit (Ping timeout: 265 seconds)
00:30:14leorizehttps://play.nim-lang.org/#ix=2gGE
00:30:17leorizeIWSnim: ^
00:30:28ryukopostingI always forget that exists lol
00:30:37leorizeI'd advice against using `$` unless needed
00:30:40leorizeit's slow by design
00:30:43IWSnimfantastic
00:30:53FromDiscord<Rika> then its still the same `import sequtils, strutils; asdf.mapIt(chr it).join`
00:30:58ryukopostingthat's a better way to do it for sure
00:31:11ryukopostingeither leorize's or rika's
00:31:21leorizethere's a faster way but not beginner friendly
00:31:38IWSnimThank you all :) Yea, I started implementing opcodes and started on the template route
00:31:42ryukopostingdoes it involve alloc
00:31:44IWSnimnopped out of that for now :)
00:31:54leorizeryukoposting: once
00:31:58ryukopostingdude I love alloc so much
00:32:04leorizehttps://play.nim-lang.org/#ix=2gGF
00:32:05IWSnimbut otherwise I'm loving this language. so clean :)
00:32:13leorizeimplicitly alloc :P
00:32:44ryukopostingthat is the thing every new lang like nim is missing. All of them want to be so much better than C that they refuse to allow access to the very thing that makes C useful
00:33:42leorizeIWSnim: here's the safe but faster version: https://play.nim-lang.org/#ix=2gGG
00:33:52ryukopostingIWSnim watch these 2 videos I made a while ago if you wanna learn about iterators https://ryuk.ooo/videos.html
00:34:08FromDiscord<Rika> leorize: aint it time to also show off nim's new collect macro? 😛
00:34:17leorizeit creates a string with the right length so you don't have to pay the cost associated with `.add` (resizing strings so it fits more)
00:34:22leorize@Rika: ah, yea
00:34:44IWSnimThanks ryukoposting :)
00:35:37ryukopostingso, I have a connundrum
00:35:55ryukopostingconundrum? conunndrum. idk
00:36:03leorize@Rika: nope it doesn't work here :(
00:37:09ryukopostingI am nearly done with a beta version of a nim visual novel engine. however, I am not an artist and cannot make my proper art for a demo of the engine
00:37:27ryukopostingso, do I make stick figures in MS paint, or do I go out and find an artist
00:37:30FromDiscord<Rika> what??? how doesnt it work?
00:38:10leorize@Rika: it requires a function with signature of proc[T](...): Container[T]
00:38:20leorizeobviously newString isn't one of them
00:38:58FromDiscord<Rika> eeeh
00:39:11FromDiscord<Rika> boo
00:39:24ryukopostingalso going to put together a modified version of the Kate text editor and make that into a little IDE for the engine. very excited about this, I'm gonna post some sample code of how the engine is used one sec
00:39:51leorizego find an artist :)
00:40:09FromDiscord<KingDarBoja> Hey guys, it is possible to get all type definitions from a module and filter (like grouping) by inherited parent object?
00:40:34leorizewdym?
00:41:23FromDiscord<KingDarBoja> For example, moduleA has several types that inherit from MyHumbleType and other that doesn't. I want to extract all the ones that inherit from MyHumbleType in another module and save its names in a list.
00:42:11leorizewell you can, though not in the way that you would expect
00:42:39FromDiscord<KingDarBoja> 😛 wdym
00:43:03leorizeyou gotta use parseStmt(readFile"/path/to/other/module.nim")
00:43:10leorizethen you got the entire AST to play with
00:43:37FromDiscord<KingDarBoja> That sounds interesting and complex at the same time 😄
00:43:43*IWSnim quit (Quit: leaving)
00:44:23*IWSnim joined #nim
00:47:27FromGitter<awr1> do you need `readFile`?
00:47:33FromDiscord<KingDarBoja> The funny thing is that the file I want to get the types is called AST too 😄
00:47:41FromGitter<awr1> why not pass `include` to a `typed` macro
00:49:32ryukopostingwhipping up a demo real quick
00:51:14*krux02_ quit (Remote host closed the connection)
01:07:05FromGitter<awr1> @KingDarBoja https://play.nim-lang.org/#ix=2gGL
01:08:33FromDiscord<KingDarBoja> Woaaah
01:09:34FromDiscord<KingDarBoja> Clever solution awr1
01:10:01FromDiscord<KingDarBoja> Can I use that macro you made?
01:10:51FromGitter<awr1> sure thing
01:11:18FromDiscord<KingDarBoja> So the input can be some module by using include, right?
01:11:40FromDiscord<KingDarBoja> let x = grabTypes:include filepath ?
01:12:02leorizetry it I guess?
01:12:05FromGitter<awr1> i think so
01:12:08FromGitter<awr1> because it is `typed`
01:12:10FromDiscord<KingDarBoja> On it
01:12:26FromGitter<awr1> and `include` is kind of like a template expansion
01:14:16ryukopostingan example of the VN stuff https://play.nim-lang.org/#ix=2gGN
01:15:13FromGitter<awr1> interesting DSL
01:15:31ryukopostingeverything in that sample compiles into a fully-functioning game. Only major feature still in progress is audio, and I just pushed out a PR today that will get that stuff very close to completion
01:16:04FromGitter<awr1> in regards to the `if` exprs, e.g. `alice_happiness`
01:16:18FromGitter<awr1> are the layers reeavluated on certain events
01:16:35ryukopostingyep, they get reevaluated when the user touches any gamevar
01:16:56ryukopostingI make up the performance hit by caching images very aggressively
01:17:21FromGitter<awr1> that was the other thing i was going to ask
01:17:26FromGitter<awr1> whether this was all cached or not
01:17:35FromDiscord<clyybber> disruptek: I'm probably missing something, but why not blacklist $nim from the path minifying thing
01:17:49FromGitter<awr1> do you just grab everything from images/, etc. on program boot
01:17:54ryukopostingI designed the image caching thing so that I could come back and swap it out for a better one later.
01:18:03FromDiscord<clyybber> getting the path to be as short as possible is a heuristic anyways right?
01:18:30ryukopostingright now, it caches any image shown in the game, forever, without ever evicting any of them. So the game runs fast as hell but it's rather memory hungry
01:19:16ryukopostingthat's an easy thing to fix, though, since all images get cached in a common structure that's part of that `internal` variable you see in there
01:20:27FromGitter<awr1> how will text be stored
01:20:32FromGitter<awr1> plan on using something like gettext?
01:21:21FromGitter<awr1> or making something yourself
01:21:27ryukopostingit uses a font texture caching system, which is set up so that certain changes (color and alpha) don't require re-drawing of the same text
01:21:47ryukopostingeverything sits on top of SDL2
01:21:49FromGitter<awr1> no i mean
01:21:53FromGitter<awr1> the source text
01:22:19ryukopostingoh, like how does the game get compiled?
01:22:38FromGitter<awr1> more or less
01:22:46ryukopostingeverything you see there is a nim macro. there's a couple of imports that go at the top of the file, and you're off to the races
01:22:59*chemist69 quit (Ping timeout: 265 seconds)
01:23:11FromGitter<awr1> oh so all your strings for dialogue, etc. will be in a nim DSL?
01:24:03FromDiscord<clyybber> ryukoposting: Damn nice. So thats why you added audio stream support to sdl?
01:24:12FromDiscord<clyybber> the nim wrapper I mean
01:24:22ryukoposting*are* in a nim DSL. All of that stuff compiles, and the game loads. you can save the game, load one, go backwards and forwards in the script, everything
01:24:28ryukopostingclyybber yep
01:24:40ryukopostingAudioCVT is annoying to use so I wanted something better
01:24:50FromGitter<awr1> interesting
01:24:52*chemist69 joined #nim
01:24:58FromGitter<awr1> plan to handle i18n with it?
01:25:01FromDiscord<clyybber> Incidentally I just finished wrapping libsndfile this minute
01:25:04FromDiscord<clyybber> 😄
01:25:28ryukopostingi18n is a long term goal
01:25:54FromDiscord<KingDarBoja> awr1: Sorry for the noob question but how I can pass another parameter to that macro? like change the ancestor string comparison so I can compare with different strings instead of fixed one
01:26:03ryukopostingwith a VN, localization is really not a task the engine can help much with. No matter what you do, the game developer is gonna have to translate their entire script.
01:27:02FromGitter<awr1> @KingDarBoja you might want to add a `static[string]` as the first parameter and leave the `typed` as the second, then you could do: `grabTypes("myType"): include blah blah`
01:27:14ryukopostingthat is why I have it set up so you can put every part of the game in separate files. that way, you could have a script block for each language. still thinking about ways to make that better though
01:28:02ryukopostinglong story short, I took on a freelancing job helping this guy make a game in ren'py, a python-based VN engine. Ren'py was great until you try to do anything beyond a couple characters on screen, and a single line of dialogue you click through one screen at a time.
01:28:55ryukopostingbeyond the most basic stuff, ren'py fights with you the whole way. So, I want to make a better ren'py, something with all of its strengths and fewer of its weaknesses
01:29:05FromDiscord<clyybber> ryukoposting: i18n support is killer
01:29:17FromDiscord<clyybber> This whole VN engine in nim thing is killer
01:29:22FromDiscord<clyybber> Is it on your gitlab?
01:29:30ryukopostingdude I didn't know how to use quote do: for a long time
01:29:44ryukopostingand quote do: doesn't even work for a lot of these macros
01:30:07ryukopostingso at least 2/3rds of the macro code is literally nnkWhatever.newTree(nnkSomeOtherThing.newTree(...))
01:30:35FromDiscord<Rika> thats most macros in a nutshell though tbh
01:30:47FromDiscord<clyybber> I almost only use newTree
01:30:50FromDiscord<clyybber> Instead of the helpers
01:30:54FromDiscord<Rika> also still looking for a dynamic i18n pure nim library
01:31:01FromDiscord<clyybber> Check out PMunchs macroutils tho
01:31:02ryukopostingdumpAstGen is my best friend
01:31:03FromDiscord<clyybber> its a bliss
01:31:45FromDiscord<clyybber> https://github.com/PMunch/macroutils
01:31:49ryukopostingthe entire script: block gets compiled into a single proc definition
01:32:05FromGitter<awr1> macros are too verbose. i wish instead of `findChild`, is that child nil, etc. there was something like the `withValue`stuff you get from `tables`
01:32:19ryukopostingit turns the script into a gigantic case statement, and each line has a different integer
01:32:50ryukopostingmaking sequtils stuff work with macros would be a godsend
01:32:54FromDiscord<clyybber> awr1: pssst macroutils
01:36:22FromGitter<awr1> hm?
01:38:28ryukopostingI googled macroutils and a crates.io link showed up lol
01:38:46FromDiscord<clyybber> I posted a link 5 mins ago I think
01:38:55FromDiscord<clyybber> assuming the discord bridge hasn't bugged out
01:39:01FromDiscord<clyybber> https://github.com/PMunch/macroutils
01:39:04FromDiscord<clyybber> there it is again
01:39:18ryukopostingRust: the only language so bad that it's best feature is its package manager
01:39:57ryukopostingRust: C++ for masochists
01:40:01FromGitter<awr1> i'll take a look at it in a second
01:40:17FromDiscord<clyybber> ryukoposting: Rust isn't bad IMO
01:40:18FromGitter<awr1> in an ideal world this would be something like how i would write that marco
01:40:23FromGitter<awr1> *more ideal
01:40:23FromGitter<awr1> https://play.nim-lang.org/#ix=2gGT
01:40:32FromDiscord<clyybber> its just that it disallows some stuff that is valid code
01:40:37FromDiscord<clyybber> So its overly pessimistic
01:40:52ryukopostingI like the concept but it is profoundly annoying to use
01:40:57FromDiscord<clyybber> yeah
01:42:12FromDiscord<KingDarBoja> I am so noob at this thing, was trying to change the code to return the type instead of the string value, without success
01:42:19ryukopostingeverything about its compiler is lovely. its error messages are always easy to read, and super specific. It has probably the single best package manager of any language. It has an immensely expressive type system. It has wonderful metaprogramming tools.
01:42:33FromGitter<awr1> or even
01:43:06FromGitter<awr1> imagining that you could navigate down multiple nodes looking for a node, but even more concisely
01:43:08FromGitter<awr1> https://play.nim-lang.org/#ix=2gGU
01:44:03FromDiscord<KingDarBoja> As I really wanted to pass a list of types to some procedure to check if they are a child of another child
01:44:05ryukopostingeverything about Rust should make it the best language ever, yet it is burdened with a memory management system that sounds nice until you actually try to use it
01:44:07FromDiscord<KingDarBoja> Sounds crazy I know..
01:44:43FromGitter<awr1> allright now let me take a look at this macroutils
01:45:36FromDiscord<KingDarBoja> No language is the best as each one has its own use case and isn't always nice to use for everything
01:46:09FromDiscord<KingDarBoja> But have heard tons of compliments about Rust and GO since last year
01:46:14ryukopostingI find this one quite helpful https://play.nim-lang.org/#ix=2gGW
01:46:42*lritter quit (Ping timeout: 260 seconds)
01:47:01ryukopostingTurns a tree of statements like the one in the doc comment into something that can be processed with a bunch of procs
01:47:25*lritter joined #nim
01:47:43FromGitter<awr1> this `macroutils` module looks interesting
01:48:17FromGitter<awr1> although for me i would like to depend less on the magic number indexing
01:48:34ryukopostingthese two help a lot with making easy-to-read error messages https://play.nim-lang.org/#ix=2gGZ
01:49:18ryukopostingthe first makes a human-friendly description of a NimNode's contents, and the other gives a human-friendly description of a NimNodeKind
01:49:33ryukopostingthe former being a bit more verbose since it has more information to work with
01:51:27FromGitter<awr1> right now i've been working on a nim DSL that will translate to HLSL (and possibly MSL)
01:51:37ryukopostingthen those two come together in this glorious 3-liner: https://play.nim-lang.org/#ix=2gH1
01:52:05ryukopostinga lot of my error-checking in my macros is just `expect node, nnkStmtList` and stuff like that
01:55:12FromGitter<awr1> @ryukoposting IMO in a more ideal macro system that should be be conveyed in the type somehow
01:55:36ryukopostingdom96, any chance we can get a git tag for version 2.0.3 of the SDL2 package? I can throw the new procs into a module inside my engine for now, but having them in the actual SDL2 package feels better
01:55:54FromGitter<awr1> e.g. `proc (x :StmtList)` vs `proc (x :NimNode) = expect blah blah ...`
01:56:25FromDiscord<KingDarBoja> awr1: how do you return the type (not as string but as type) on the macro you made?
01:56:27ryukopostingyou can do stuff like `macro(foo: string)`
01:56:46FromGitter<awr1> i don't know *precisely* how that might be done, maybe through converters possibly, which would be the site of the type check
01:57:25ryukopostingif every node kind was a different subclass of some root class, it could be done
01:57:40FromGitter<awr1> @KingDarBoja you can get the type in the macro, but you can't really "return the type" as an expression
01:57:50FromDiscord<KingDarBoja> Ohhh
01:58:34ryukopostinghow's that fancy new gc coming along by the way
01:58:39FromGitter<awr1> nim is still statically typed: you can't have a sequence consisting of different types without taking some things into account
01:59:14ryukopostingyeah the tree would be NimNode, then you'd have type `StmtListNode = ref object of NimNode`
01:59:36ryukopostingall the nodes would have lists of children represented as seq[NimNode], a seq of the root class
01:59:55FromGitter<awr1> My opinion would be instead of getting the macro to try and return something, have the macro itself construct the type-specific code you want
02:00:24FromGitter<awr1> @KingDarBoja
02:00:42FromGitter<gogolxdong> How to turn an array into a string variable?
02:00:43FromDiscord<KingDarBoja> I see
02:02:10FromDiscord<KingDarBoja> You mean join all array values into a string?
02:02:19FromDiscord<KingDarBoja> Do you*
02:03:49FromGitter<gogolxdong> when put `var buf: array[16384, byte] ` into a string with `$` , it includes [] which causes some issue.
02:04:22FromGitter<gogolxdong> make a string without [] from array
02:07:54ryukopostinghttps://play.nim-lang.org/#ix=2gH4 gogolxdong
02:09:15ryukopostingor do you mean just without the [], but still the numerical values?
02:09:42FromGitter<gogolxdong> how about ``` ⏎ var x: array[3,char] = ['A','B','C'] ⏎ var y = castcstring (addr x[0]) ⏎ echo y ⏎ ... [https://gitter.im/nim-lang/Nim?at=5e893de6d021c45cc7c5937a]
02:11:35*z0 joined #nim
02:11:45ryukopostingwell, x isn't a cstring since it isn't null terminated, but if it was that'd be fine yeah
02:11:59*z0 is now known as Guest27114
02:13:43*endragor joined #nim
02:15:34*Pix_ quit (Ping timeout: 240 seconds)
02:20:31*lritter quit (Ping timeout: 250 seconds)
02:22:56FromGitter<awr1> you need some kind of dependent typing or contractual system for the strict StmtList thing
02:24:00ryukoposting(or inheritance)
02:24:53FromGitter<awr1> that too
02:25:17ryukopostingare you familiar with the new gc thing?
02:26:04FromGitter<awr1> did you watch araq's presentation on it
02:26:14ryukopostingthere's a presentation?
02:26:16FromGitter<awr1> https://www.youtube.com/watch?v=yA32Wxl59wo
02:26:21ryukopostingdope
02:27:17FromGitter<gogolxdong> there is a issue about this casting, if array is all 0, string length will be 0.
02:27:21ryukoposting"copying bad design is not good design" that is both amusing and extremely german
02:31:29FromDiscord<KingDarBoja> Just tried to use the `include` on the macro and the file being refered started to show errors lol
02:32:05FromDiscord<KingDarBoja> I mean, the macro is at one module, the file that calls the macro is in another and tries to load another different file
02:32:19ryukopostingquick side thought: opinions on being able to import modules within a proc, and having those imports only affect code inside the proc?
02:32:39leorizeterrible
02:33:21leorizemodules can have initialization code (any top-level statement)
02:33:39FromDiscord<Rika> yeah that
02:33:55ryukopostingan in-proc import would only import symbols, no top-level statements
02:33:58FromDiscord<Rika> im kinda missing namespaces tho
02:34:32leorizeryukoposting: how are you gonna deal with `var global = newSeq`?
02:35:07*endragor quit (Remote host closed the connection)
02:35:29*muffindrake quit (Ping timeout: 265 seconds)
02:35:30ryukopostingimport the symbol global, with type information, but don't produce initialization code
02:35:43leorizeas I said, how are you gonna deal with the above?
02:35:53ryukopostingAnd I told you exactly what I'd do
02:36:06leorizenow you can pass by without init a seq, but how about something with side-effects?
02:36:09leorizelike opening a db?
02:36:20leorizedo you not initialize them too?
02:36:25ryukopostingput the initialization wherever it would go if the import happened at the module level
02:37:17*muffindrake joined #nim
02:37:22ryukopostingpython does this and it works fine. assume that whatever nim would do is whatever python was doing
02:37:54leorizeI don't think copying python is considered good practice, but ok
02:38:30disruptekthis isn't possible and it would never be merged if it were impl.
02:38:43ryukopostingit was just a thought, not sure how I feel about either. there were a few places in my VN engine development where putting a module import in the output of a macro would have made it easy to clean up a lot of boilerplate crud
02:38:56disruptekyou can do that, sure.
02:39:13ryukopostingand having that import inside of a proc produced by the macro would allow the symbols to only be visible in places where they should be visible
02:39:26disrupteknow, that's not a thing and never will be.
02:39:49ryukopostingdoes it just come down to how the module import system works?
02:39:55FromGitter<gogolxdong> oh , doesn't need all set 0 , only one 0 hidden in the array will truncate the length.
02:40:05disruptekit comes down to how the backend works.
02:40:23leorizenot really a problem tbh
02:40:25leorizeit's doable
02:40:36leorizewhether we want it or not is something that's up to debate
02:40:44ryukopostingI found ways around that problem, they just aren't pretty lol
02:42:12disruptekwould i rewrite the backend if i could? yes.
02:42:20leorizepython is that language that can get away with "if you don't hit this branch, it doesn't matter if it's broken"
02:42:43disruptekwill it be easier with my ic stuff? yes.
02:42:49leorizeI don't know whether bringing in a concept like this from them is sound
02:42:49disruptekbut that doesn't mean it's a good idea.
02:42:50ryukopostingoh wow, sink is really cool. Stopped paying attention to nim's evolution when I discovered the glory of macros
02:43:11disruptekcyclic imports first, then it won't be an issue.
02:43:24ryukopostinggod yes PLEASE
02:43:38leorizeonce disruptek is done with ic, then you can have cyclic imports
02:43:52ryukopostinggive me cyclic imports and I will never update my compiler again
02:43:54ryukopostingno need
02:43:59ryukopostinglang's done
02:44:31disrupteki don't think they are very hard, but i do think i need to change my approach to compiler code.
02:45:36ryukopostingif the module system can't import symbols without importing the whole shebang, and assuming that's the reason in-proc imports wouldn't work, that could get kinda nasty
02:46:09leorizeit can, just whether if we want that is something else
02:46:39leorizeif you can write a good rfc describing the idea, then you'll get more feedback
02:46:50ryukopostingI'm not sure if I want it lol
02:46:55disruptekhonestly, i wouldn't bother.
02:47:38ryukopostingthe only non-abusive use case would be shoving imports inside of procs spat out by macros to confine special symbols to that part of the AST
02:48:49disruptekdo you have a demonstration of a problem?
02:49:33*redviking joined #nim
02:49:43disruptekweakening the spec in pursuit of problems that don't exist is a unlikely to garner many upvotes.
02:49:52ryukopostingyeah kinda figured
02:49:54disruptekwhat we need are fewer features, not more.
02:50:06*voltist joined #nim
02:50:18ryukopostingjust a hypothetical thing that kinda popped into my head while writing all these macros
02:50:33disruptekyeah, i missed that feature of python, so i get it.
02:50:55ryukopostingit seems stupid until you actually have a use for it
02:50:55disruptekbut i like that imports are more weighty in nim.
02:51:04ryukopostingfor sure
02:51:13disruptekinclude is a thing. i wish it wasn't, most of the time.
02:51:38ryukopostingwith some code shuffling and a couple of carefully placed `include`s, I got around the issue
02:51:46disruptekif it didn't exist, we'd already have seen more work on imports.
02:52:02shashlickI wish more features were focused on compile time macros rather than actual compiler code
02:52:28disruptekagree. i wish transform was easier to hook.
02:53:40ryukopostingon the bright side, there are ways around every problem in the module system
02:54:07ryukopostingif anything, the no-cyclic-imports rule forces you to think about how you organize your code
02:54:10disruptekyes, but it's not ergonomic.
02:54:39redvikingWhat digital signature libraries exist for Nim?
02:54:47ryukopostingnot enough
02:54:55leorizenone, we have wrappers though
02:55:10redvikingWhich would you recommend?
02:55:13disruptekwhat kind of signatures?
02:55:27disruptekstatus has like 8 different crypto libs.
02:55:38leorize!packages openssl
02:55:39disbothttps://github.com/cowboy-coders/nim-openssl-evp -- 9openssl_evp: 11Wrapper for OpenSSL's EVP interface
02:55:39disbothttps://github.com/genotrance/nimssl -- 9nimssl: 11OpenSSL wrapper for Nim
02:55:46leorize!packages gnutls
02:55:47disbothttps://github.com/FedericoCeratto/nim-gnutls -- 9gnutls: 11GnuTLS wrapper
02:55:54leorize!packages gpg
02:55:54disruptek!repos jwt
02:55:55disbotno packages match 😢
02:55:55disbothttps://github.com/ekarlso/nim-jwt -- 9nim-jwt: 11JWT implementation for nim-lang 15 11⭐ 11🍴
02:55:55disbothttps://github.com/h3rald/litestore -- 9litestore: 11A lightweight, self-contained, RESTful, searchable, multi-format NoSQL document store. 15 74⭐ 2🍴
02:56:03disruptek!repo sigv4
02:56:04disbothttps://github.com/disruptek/sigv4 -- 9sigv4: 11Amazon Web Services Signature Version 4 15 4⭐ 0🍴
02:56:14ryukopostingredviking, are you talking about stuff like Windows exe signing? That's something I really wish Nimble let you fiddle with
02:56:30ryukopostingthough I guess nimble really doesn't have full control of that
02:56:51*jegfish quit (Quit: Leaving)
02:56:56redvikingI'm interested in XML digital signatures (https://www.w3.org/TR/2008/REC-xmldsig-core-20080610/).
02:56:59FromGitter<gogolxdong> Is there any AEAD implementation?
02:57:48disruptek!repo sodium
02:57:49disbothttps://github.com/judofyr/sodium.nim -- 9sodium.nim: 11 15 6⭐ 0🍴
02:58:02leorize!repo libsodium
02:58:03disbothttps://github.com/FedericoCeratto/nim-libsodium -- 9nim-libsodium: 11Nim wrapper for the libsodium library 15 25⭐ 5🍴 7& 1 more...
02:58:08leorize^ that's more up-to-date
02:58:09disruptekyeah, that one.
02:59:35leorizeredviking: I don't think we have the kind of lib to deal with that
02:59:58ryukopostingis anyone here familiar with aporia? would it be a decent foundation for a little IDE for my VN engine?
03:00:11leorizeit'd be a terrible foundation, sadly
03:00:19ryukoposting:(
03:00:25ryukopostingdoes it work?
03:00:30leorizeit's written in gtk2, and unmaintained
03:00:30disruptek!repo feud
03:00:31disbothttps://github.com/genotrance/feud -- 9feud: 11Fed Ep with UDitors 15 25⭐ 1🍴
03:01:04ryukopostingmaintained or not, I'd be forking it and modifying it to fit a purpose where only very basic IDE functionality is needed
03:01:23disruptekfeud is what you want.
03:01:30disruptekyou can simply impl your needs as a plugin.
03:01:42leorizeyea if you're going that route, use that
03:02:07ryukopostingis this a terminal editor?
03:02:55ryukopostingit's hard to tell from the screenshot
03:03:17disruptekwhat?
03:03:25leorizeit's a gui editor
03:04:00ryukopostingnice, that's what I want. the target userbase is predominantly people who aren't software engineers by trade
03:04:38disruptekthe main thing is that you can get support for it.
03:05:42ryukopostingI will look into this, for sure. My current plan is to use Kate as my foundation, since I already use that editor and I know how to write syntax highlighting files for it
03:06:43ryukopostingall this thing really needs to do is decent syntax highlighting, and have 4 buttons: open project, save project, run game, create release package.
03:08:28disruptek!repo lua
03:08:29disbothttps://github.com/jangko/nimLUA -- 9nimLUA: 11glue code generator to bind Nim and Lua together using Nim's powerful macro 15 43⭐ 5🍴 7& 7 more...
03:08:30FromDiscord<KingDarBoja> Just noticed the macro doesn't work with ref objects, awr1
03:08:53FromDiscord<Rika> Is there a macro or library for simulating inheritance with composition
03:09:43leorizeinheritance with composition?
03:09:53leorizecan you elaborate a bit on this pattern?
03:10:24leorize@KingDarBoja: should be an easy fix?
03:10:26FromDiscord<Rika> uh, instead of using inheritance, i use composition
03:10:36disrupteki would look at nesm for inspiration.
03:10:40disruptek!repo nesm
03:10:41disbothttps://github.com/xomachine/NESM -- 9NESM: 11NESM stands for Nim's Easy Serialization Macro. The macro that allowing generation of serialization functions by one line of code! (It is a mirror of https://gitlab.com/xomachine/NESM) 15 40⭐ 1🍴
03:10:44FromDiscord<Rika> but i'll be able to "surface" the procs that are usable
03:10:52FromDiscord<Rika> on the composed object
03:10:55FromDiscord<KingDarBoja> Not sure, still a newbie with all that macro stuff
03:10:59FromDiscord<Rika> onto the new composed object
03:11:08FromDiscord<KingDarBoja> Reading the docs looking for answers
03:12:57leorizeRika: we don't have any macro like that
03:13:01ryukopostingjust got this really ugly error from nimble https://pastebin.com/AjF42He4
03:13:20FromDiscord<Rika> leorize, is it recommended to make a macro like that? is it even possible?
03:13:27leorizeit's possible
03:13:42leorizeI did it then I threw it away because I designed around it :P
03:13:52FromDiscord<Rika> what did you do?
03:14:07leorizeconverters
03:14:14leorizelot's of converters
03:14:23disruptekyuck.
03:14:25FromDiscord<Rika> sounds worse
03:14:38leorizethat's why I threw the macro away
03:14:52disrupteklook at nesm. i think it will help.
03:15:20ryukopostingnimterop 0.4.4 fails to build on 1.0.4, interesting
03:16:06disrupteki am beginning to think that i have a weird environment.
03:16:25ryukopostingnimterop 0.4.4 also fails to build on 1.0.6...
03:16:35disruptekit's the simplest explanation for why i have so much trouble with nimterop, nimble, etc.
03:16:58ryukopostinghow do I ask the compiler which C compiler it's using?
03:17:14disruptekuse `please`.
03:17:27ryukopostingI hope you get coronavirus
03:17:42disruptekme too. i hope it happens soon, though.
03:17:47ryukopostingor was that an actual answer and someone was being funny when they came up with the compiler commands
03:17:59shashlickdisruptek: once you give me something I can reproduce, I will fix it
03:18:17disrupteki know, buddy, i know.
03:18:32shashlickBut I know there's a real issue
03:18:40disrupteki know you realize there is a limit to patience, too.
03:18:41leorizeryukoposting: std/compilesettings
03:18:53leorizeor just when defined(gcc) <- using gcc
03:19:10disruptekthat's madness.
03:19:11leorizedefined(clang) and defined(msvc) is valid too
03:19:13shashlickYay compile settings - need to use that in nimterop
03:19:14ryukopostingwell that's the problem, I have 3 different gccs
03:19:21disruptek--listcmd
03:19:38shashlickI extracted the plugin system from feud
03:19:42leorizeryukoposting: it'll use whatever is in your PATH
03:20:12shashlickBut I'm yet to update feud to use it instead of the built in one
03:20:24shashlickAs part of making it separate, made several improvements
03:21:01shashlickdisruptek: one of these days, I'll get on mumble and we'll figure it out
03:21:19disrupteki know it's hard for you to do much from work.
03:21:42disruptekwhat are the improvements to the plugin system?
03:23:05shashlickHeh I need to go back and check
03:24:21disrupteksomehow i wasn't watching it.
03:24:48disruptekmaybe i can use this in my streaming app.
03:25:48*redviking left #nim (#nim)
03:26:10disruptekis lqdev using it?
03:26:53*endragor joined #nim
03:27:00shashlickI don't think so
03:27:01ryukopostinghuh, as soon as I switched from x86_64-pc-msys to x86_64-pc-mingw64 It worked fine
03:27:02shashlickhttps://github.com/genotrance/plugins
03:27:39shashlickbut i incorporated feedback from those who reviewed it
03:27:47ryukopostingwell, nimterop built but that git tag makes it angry
03:28:19disruptekRika: let us know what you come up with. i am in the market for a pattern with which to add object persistence and versioning and introspection. it will be similar.
03:29:27shashlickryukoposting: have some failing build logs?
03:29:32disruptekshashlick: it's a big api.
03:29:47ryukopostingokay how does feud build
03:29:54disruptekslowly.
03:30:11ryukopostingoh wait, this looks like a nimble thing
03:30:40*waleee-cl quit (Quit: Connection closed for inactivity)
03:30:53ryukopostingshashlick https://pastebin.com/FzuWHpAn
03:31:20ryukopostingthis isn't a nimterop thing but it's still me trying to make feud build
03:32:41ryukopostingeither that or I cloned the repo instead of downloading a tag
03:34:44disruptekyou're a madman.
03:35:01ryukopostinggod above what am I looking at
03:35:19ryukopostingthis looks like a very barebones editor which is exactly what I want
03:35:29disruptekindeed.
03:35:30ryukopostingdoes it do nim syntax highlighting
03:36:18disrupteki dunno, i was never able to get it to run.
03:36:44ryukopostingthe zip artifact with the latest tag works fine for me
03:37:23disruptekit's been 6 months since i last tried.
03:38:24FromGitter<awr1> lol
03:38:25FromGitter<awr1> https://play.nim-lang.org/#ix=2gHe
03:38:33FromGitter<awr1> this is profoundly janky but it "works"
03:38:57ryukopostingI have never seen someone to their types :LikeThis
03:39:09ryukopostingbut I kind of like it
03:39:20FromGitter<awr1> i do it a lot because it's easier to align my types
03:39:33*endragor quit (Remote host closed the connection)
03:39:43FromGitter<awr1> i know in some various typed lisps you have to do that
03:39:54ryukopostinghey, it does syntax highlighting! It isn't great syntax highlighting, but with some tweaks it'll do the job
03:41:10FromGitter<kayabaNerve> So ARC is the main feature of Nim 1.2. Does it finally work with async and is used by default, or is still 'almost ready'?
03:41:27disruptekno, no, and no.
03:42:13FromGitter<kayabaNerve> So it's not working with async, not used by default, and not almost ready, meaning it's far from ready?
03:42:31disruptek"public beta" is probably the right term.
03:43:23disrupteki believe it's closer to alpha, but the important thing is that people can test it with a tag that is pretty serviceable otherwise.
03:43:23FromGitter<awr1> but ya that check macro - it "works" - StmtList would fail for a empty node
03:43:32FromGitter<awr1> i would not use it in practice though
03:43:41FromGitter<awr1> in an ideal world, like i said, this would be solved with dependent types
03:44:07disruptek1.2 is a dev release, not a stable release.
03:44:12FromGitter<awr1> however the likelihood nim will ever get dependent types is low
03:47:22shashlickryukoposting: you got feud to build?
03:48:56shashlickyes syntax highlighting was one of the first things
03:53:20shashlickit shouldn't be trying to build tls.c
03:57:45ryukopostingshashlick: no but I downloaded a prebuilt version from a tag
03:57:56ryukopostingworks like a champ but how do I make/add a plugin?
03:58:19shashlickok i've not built it in a while and like I said, the plugin system is old and not replaced by the standalone version
03:59:07ryukopostinghmmmm
03:59:30shashlickfurther it is windows only cause that's all i had time to experiment with
03:59:56ryukopostingI'd be using it as part of a package that's windows-focused so that's perfect actually
04:00:00shashlickbut it is very good in practice - performant and very flexible
04:00:17ryukopostingI like the socket thing, remotely controlling the editor is pretty sweet
04:00:20shashlickcan code in real time and plugins reload
04:00:37ryukopostingthat's something you can do with Sam, the editor I use when not on windows
04:00:40shashlickya with nim a lot of cool stuff is possible very fast
04:01:20shashlicki stopped working on it cause i realized i don't have enough time to give it my 100% but I did extract the plugin system cause i know it will be useful for others too
04:01:28shashlickwhat's your goal for this?
04:01:50ryukopostingI want an extremely simple editing environment for people who want to make games with my engine
04:02:34shashlickok i think most of the functionality for that is in place - colors, highlighting and load/save/etc
04:02:47shashlickbut the main part of the experiment was to have no UI elements
04:02:54shashlickeverything is command driven
04:04:38ryukopostingnot the most approachable thing on earth, but any user could figure out how to ctrl-S
04:05:21ryukopostingand I could have a separate program that opens the project, and just gives them buttons saying "open script.nim" "open screens.nim" etc
04:05:59shashlicki think most of that should be possible with little change
04:06:02*supakeen quit (Quit: WeeChat 1.9.1)
04:06:04ryukopostingthe alternative is modifying Kate, which is a collossal rats nest of Qt
04:06:17shashlickbasically there's configurable hotkeys and aliases and a config system so you can build all that easily
04:06:27ryukopostingyeah that ini is sweet
04:06:40shashlicksee the test script as well
04:06:43*supakeen joined #nim
04:12:03*endragor joined #nim
04:13:14*endragor quit (Remote host closed the connection)
04:19:07*z0 joined #nim
04:19:31*z0 is now known as Guest40045
04:21:13FromGitter<kayabaNerve> I thought odd numbers were dev releases. 1.2.0 is even. 1.2.1 isn't.
04:21:37FromGitter<kayabaNerve> That's why we have 1.0.2 and 1.0.4.
04:22:17*Guest27114 quit (Ping timeout: 250 seconds)
04:22:48leorizeyes?
04:23:43FromGitter<kayabaNerve> > *<disruptek>* 1.2 is a dev release, not a stable release.
04:23:52FromGitter<kayabaNerve> just responding to disruptek.
04:24:02FromGitter<kayabaNerve> Unless he's referring to the inclusion of ARC in 1.2
04:25:00shashlicki guess he meant that about arc
04:28:22FromGitter<kayabaNerve> It wasn't clear, but that sounds right.
04:29:03*opal quit (Ping timeout: 240 seconds)
04:29:06ryukopostingfeud is pretty sweet, perfect for what I need really
04:29:20ryukopostingjust need a signed version of the binary so windows doesn't yell at you when it opens lol
04:30:38*opal joined #nim
04:30:52leorizeryukoposting: you can buy a license I guess :P
04:31:02leorizecertificate*
04:31:05FromGitter<kayabaNerve> Can you not sign for free? I thought you could.
04:31:21FromGitter<kayabaNerve> Either via a leaked cert or developer program.
04:31:56shashlickryukoposting - if you can figure out how to do that, will make life fantastic
04:32:01ryukopostingpretty sure you can
04:32:08shashlickIT is a nightmare
04:32:10FromGitter<kayabaNerve> Seems to be free https://docs.microsoft.com/en-us/windows/win32/appxpkg/how-to-create-a-package-signing-certificate
04:34:25shashlicki don't know if self-signed certs are good enough
04:35:40*dddddd quit (Ping timeout: 256 seconds)
04:42:23*opal quit (Ping timeout: 240 seconds)
05:12:15*Guest40045 quit (Quit: Lost terminal)
05:38:53FromDiscord<Rika> `method has lock level <unknown>, but another method has 0 [LockLevel]` what does this mean...
05:43:18axiono/
05:43:28FromDiscord<Rika> oh hello
05:43:34axionLooks like 1.2.0 doesn't break any of my code woohoo
05:43:52axionOh hey Rika. I haven't seen you on the mumble chat
05:43:59FromDiscord<Rika> yeah its uh
05:44:10FromDiscord<Rika> dunno really why i didnt join
05:44:17FromDiscord<Rika> was watching a livestream
05:44:33axionI've been mostly chatting there to varriount and krux for hte last week. so much so that i forget to say i'm alive and still using Nim in this channel :)
05:44:51FromDiscord<Rika> had no doubts that you were alive lol
05:45:48axionwell i'm almost always there, and i made some fixes to my stream so it shouldn't flicker for you any more!
05:46:36FromDiscord<Rika> wait wtf how did you discover the issue?
05:47:25axioni just noticed that my refresh rate was 30hz, probably after a driver update or something
05:47:29axionit's now 120
05:48:06FromDiscord<Rika> you on mumble right now? or are you about to sleep or something?
05:48:18axioni'll be there for a few more hours at least
06:05:00*solitudesf joined #nim
06:05:43*rockcavera quit (Remote host closed the connection)
06:08:40leorizeaxion: wait you stream?
06:09:38axionSorta
06:09:44axionI mostly just share my screen and ask dumb questions
06:09:47*ryukoposting quit (Ping timeout: 260 seconds)
06:11:15leorizewhen are you streaming? I'll try to tune in :)
06:11:47*NimBot joined #nim
06:11:51axionI'm on mumble now and sharing on Jitsi
06:15:03*sleepyqt joined #nim
06:16:13leorizeok, how can I tune in? :P I don't do either :P
06:17:45axiongotta install a mumble client and connect to uberalles.mumbl.io
06:18:00axiona few of us here use that. surprised you dont know about it :)
06:18:28leorizeI do, I just like chatting more :P
06:18:46leorize(mainly because my spoken english is terrible)
06:23:30*Pixeye joined #nim
06:46:28*Perkol joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:52*gmpreussner joined #nim
07:08:42*chemist69 quit (Ping timeout: 260 seconds)
07:09:42*chemist69 joined #nim
07:20:15*opal joined #nim
07:22:50Araqleorize, can you please fix https://github.com/nim-lang/Nim/issues/13870
07:22:52disbotGcc cross compiler doesn't know '-mno-ms-bitfields' ; snippet at 12https://play.nim-lang.org/#ix=2gHR
07:27:43leorize[m]Araq: I don't think there's anything to fix. They didn't specify the flags for the cross compiler, so the compiler ended up using the host flags
07:28:53leorize[m]also without details on how they did the compilation, I have doubt it's being done correctly
07:30:46livcdwho is "nugatty" here ? Oo
07:32:04*andinus joined #nim
07:37:56*andinus quit (Quit: ERC (IRC client for Emacs 26.3))
07:38:33*andinus joined #nim
07:52:03*opal quit (Ping timeout: 240 seconds)
08:06:10*kenran joined #nim
08:06:26*voltist quit (Quit: Leaving)
08:09:08*Perkol quit (Remote host closed the connection)
08:17:44*hax-scramper quit (Read error: Connection reset by peer)
08:18:03*hax-scramper joined #nim
08:18:13*opal joined #nim
08:22:12FromGitter<eliezedeck> Hello everyone, I seem to remember that in the old days, Nim would mangle symbol names in the final binary (or I might be wrong) ... How does one typically *obfuscate binaries* so that no names from the original symbols will be seen in the binary?
08:22:20*andinus quit (Quit: ERC (IRC client for Emacs 26.3))
08:22:55*andinus joined #nim
08:23:57supakeenYou could strip your binary, or do you want to specifically mangle them?
08:25:42FromGitter<eliezedeck> yes, completely mangle it
08:26:43supakeenI'm not too sure how to mangle but perhaps you can say what you want to achieve instead of the means to achieve it? :)
08:27:14*tane_ joined #nim
08:28:07FromGitter<eliezedeck> right, so: if I open the binary file in the editor, I'll be able to see a bunch of symbol names that would indicate features that I'm using in the binary ... I want to mangle these symbols so that it is not going to be obvious, what features or technology the app might be using
08:28:08*hax-scramper quit (Ping timeout: 265 seconds)
08:28:15*hax-scramper joined #nim
08:28:42*tane_ is now known as tane
08:28:53FromGitter<eliezedeck> I already found a way to obfuscate strings, symbols obfuscation is next step
08:29:37FromGitter<eliezedeck> I'm not looking for *fullproof* protection, just trying to make things not too obvious
08:30:34supakeenSure I understand, I thought stripping the binary would already resolve much of this but I might be wrong :)
08:31:29FromGitter<eliezedeck> I've already stripped the binary, but I'm still seeing stuffs, plenty of them
08:32:10FromGitter<eliezedeck> using existing C obfuscator tools might be a way, but if there is already this feature (which I remember Nim did), I prefer it to be at Nim level
08:32:52FromGitter<eliezedeck> this way also, I don't have to avoid mangling names that shouldn't be mangled
08:36:45*natrys joined #nim
08:51:28*kenran quit (Ping timeout: 256 seconds)
08:56:43*opal quit (Ping timeout: 240 seconds)
08:58:28*opal joined #nim
09:05:26*dwdv joined #nim
09:18:05FromDiscord<mratsim> use exportc
09:19:37FromDiscord<mratsim> @eliezedeck, example: https://github.com/numforge/laser/blob/master/laser/openmp.nim#L13-L25
09:19:37FromDiscord<mratsim> https://github.com/numforge/laser/blob/master/laser/openmp.nim#L207-L208
09:19:59FromDiscord<mratsim> and you can push/pop {.push exportc: myRandomName().} as well
09:20:15*Trustable joined #nim
09:20:43FromDiscord<mratsim> this way you can apply that to proc and temporary variables
09:29:32*endragor joined #nim
09:40:21*endragor quit (Remote host closed the connection)
10:05:38*silvernode joined #nim
10:15:43*opal is now known as ^^opal_
10:16:50*endragor joined #nim
10:18:06*silvernode quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
10:24:06*endragor quit (Remote host closed the connection)
10:24:46*silvernode joined #nim
10:25:18supakeenHola, I've been working on writing testcases for asynchttpserver and this is my current layout: https://bpaste.net/3I3Q I'm not entirely confident in my Nim yet, does anyone have any remarks to improve/make it more idiomatic? :)
10:25:46supakeenPerhaps a template or macro for the request/handler definitions inside the test procs?
10:25:47FromDiscord<Rika> you got pragmas wrong
10:26:01FromDiscord<Rika> {.async} should be {.async.}
10:26:10supakeenAh.
10:26:18FromDiscord<Rika> you dont need to append system. in system.void
10:27:03FromDiscord<Rika> aside from that i think its okay
10:27:20FromDiscord<Rika> also looks like youre using testament, interesting
10:27:48supakeenRika, I run it with './bin/testament --print r stdlib/tasynchttpserver.nim' so I can run only this testcase at a time.
10:28:11supakeenWhat is the importance of the postfix dot in the pragmas, is it part of the name or does it have more meaning?
10:28:23FromDiscord<Rika> its part of the pragman syntax
10:28:34FromDiscord<Rika> its required, otherwise its invalid syntax isnt it?
10:28:47supakeenI didn't get any compiler errors before that change :)
10:29:12supakeen(not that a lack of those proves correctness)
10:29:30FromDiscord<Rika> well it seems like it works
10:29:46FromDiscord<Rika> just know that ive never seen it ever in nim >= 0.20
10:32:15supakeenThings looking wrong are good remarks, looking at the other testcases they also use {.async.} so consistent++.
10:42:25*endragor joined #nim
10:42:59*Trustable quit (Remote host closed the connection)
10:48:26lqdev[m]@Rika the {.async} syntax is valid and supported, actually
10:49:21lqdev[m]but yeah {.async.} is generally preferred
10:50:54*dddddd joined #nim
10:53:36supakeenIs there a meaning to the postfix dot, I see some pragmas don't have one.
10:54:08*silvernode quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
10:54:12supakeenOr is that a mistake of the person who wrote those and should they tend to end in the dot :)
11:02:20*hax-scramper quit (Read error: Connection reset by peer)
11:02:37*hax-scramper joined #nim
11:03:21FromDiscord<exelotl> Never seen a pragma without the ending dot until today lol
11:03:54FromDiscord<exelotl> I don't think omitting it is recommended
11:03:57FromDiscord<Rika> i have, but on older code
11:03:58FromDiscord<Rika> its not
11:07:10*nsf joined #nim
11:07:26*Zectbumo quit (Remote host closed the connection)
11:08:11FromGitter<eliezedeck> @mratsim Thanks man! that's a pretty cool feature
11:13:59*Zectbumo joined #nim
11:16:00*hax-scramper quit (Read error: Connection reset by peer)
11:16:28*hax-scramper joined #nim
11:38:17FromGitter<eliezedeck> @mratsim hmm... I'm not getting the intended effect ... it seems that it doesn't have any effect at all; I have tried exportc and extern, they look just the same, and the original proc name is still visible in the binary
11:38:32FromGitter<eliezedeck> *desired effect
11:40:08*josch557 joined #nim
11:40:36FromDiscord<mratsim> that's strange, what if you add manually {.exportc: myRandomName().} to the proc instead fo via push/pop
11:42:06FromGitter<eliezedeck> ok, let me try ...
11:42:58FromGitter<eliezedeck> in fact, this is what I have already tried: {.async, extern: "aizaaryahooh".}
11:43:06FromGitter<eliezedeck> also {.async, exportc: "aizaaryahooh".}
11:43:37FromGitter<eliezedeck> didn't have any effect, the binary still had the original proc name, and I didn't find the "aizaaryahooh" string anywhere
11:44:06*liblq-dev joined #nim
11:45:26FromGitter<eliezedeck> without any extern/exportc, the binary contained 3 occurences of the original proc name, with either of extern/exportc: same thing
11:45:33FromGitter<eliezedeck> using 1.2.0
11:49:42FromDiscord<mratsim> can you try on a non-async proc
11:50:25*krux02 joined #nim
11:50:27FromDiscord<mratsim> the async pragma might be rewriting the proc and dropping additional pragmas in the process
11:50:28FromGitter<eliezedeck> I'm not sure what the section of the binary is, but redacting the visible name of the proc from the binary doesn't break the program ... which begs the question: why are then these symbols in the binary in the first place? (I've already stripped the binary, using default compiler/toolchain on macOS 10.15.4)
11:50:52FromGitter<eliezedeck> Ok, I'll try, but I've also tried on a type, and it didn't have any effect either
11:53:22FromGitter<eliezedeck> yep! that worked ...
11:55:18*Vladar joined #nim
12:06:01*supakeen quit (Quit: WeeChat 1.9.1)
12:06:45*supakeen joined #nim
12:06:55*PMunch joined #nim
12:12:41dom96Using channels on Android is like a minefield
12:12:56dom96Sending enums works, as soon as I try an object variant I get segfaults on memcpy
12:13:17*sleepyqt_ joined #nim
12:15:54FromGitter<eliezedeck> @dom96 that's scary ... I'm planning to run on Android too ... I'm interested in your quest since I might take the same road as you
12:16:55*sleepyqt quit (Ping timeout: 265 seconds)
12:18:27dom96#13880
12:18:29disbothttps://github.com/nim-lang/Nim/issues/13880 -- 3Channels segfault on Android ; snippet at 12https://play.nim-lang.org/#ix=2gJi
12:18:53FromGitter<eliezedeck> thanks
12:19:50dom96Android is quite painful, I don't know how easy it is when using Java/Kotlin but I've been feeling like I'm walking on egg shells for a while now
12:19:50*Guest44825 quit (Ping timeout: 256 seconds)
12:21:26*dadada joined #nim
12:21:49*dadada is now known as Guest19582
12:22:13FromGitter<eliezedeck> does this apply to 1.2.0 also?
12:22:39FromGitter<eliezedeck> I guess, a version change will probably not make a difference ... but still
12:22:49dom96It's even worse with 1.2.0 :)
12:23:06dom96Well, it may be better once the regressions are fixed
12:23:08FromGitter<eliezedeck> wow
12:23:29FromDiscord<mratsim> I thought they were slated for complete rewrite?
12:23:47FromDiscord<mratsim> like they are the one thing that prevents Araq from removing the typeinfo module
12:25:38FromDiscord<mratsim> My naive guess would be that there is a sizeof issuewith variants in the channel module
12:26:04FromDiscord<mratsim> or offsetof for padding
12:27:54dom96probably
12:30:42Araqdom96: compile with --gc:arc -d:useMalloc and run valgrind. if that works on Android at all...
12:31:58dom96I cannot, I'm stuck on 1.0.6
12:32:09dom96I can try that later if I can fix the problems introduced by 1.2.0
12:32:28*waleee-cl joined #nim
12:32:44dom96or if my current planned workaround doesn't work out
12:44:05FromDiscord<Rika> https://play.nim-lang.org/#ix=2gJv what are the advantages and disadvantages of either?
12:47:36FromDiscord<exelotl> I guess it mainly depends if you're planning on using `test` in this circumstance more than once?
12:47:56FromDiscord<Rika> i only have `test` for the `A` object
12:47:59FromDiscord<Rika> no other one should have it
12:49:53FromDiscord<exelotl> and does the loop only appear once too?
12:50:36FromDiscord<Rika> not relevant though, but no it doesnt
12:52:22FromDiscord<exelotl> hmm idk I guess I'd lean towards the first approach unless i was going to be adding more cases or duplicating the logic a lot.
12:54:37FromDiscord<exelotl> interesting to see you catch the ObjectConversionError like that though, I'd have done something like `if i of A`
12:55:58FromDiscord<Rika> ...
12:56:00FromDiscord<Rika> i forgot about that
12:56:04FromDiscord<Rika> me dumbo
12:56:15*owl_000 joined #nim
12:56:40FromDiscord<exelotl> it's nice in languages like Kotlin where you can do that and it's smart enough to know that `i` is an instance of `A` for the duration of that block. So you don't have to perform the type conversion manually
12:56:42FromDiscord<Rika> its 9 pm, im supposed to be sleeping, no thoughts head empty
12:57:45FromDiscord<Rika> thanks though
12:57:50FromDiscord<Rika> i shall now sleep
12:58:01FromDiscord<exelotl> night!
13:05:27*endragor quit (Remote host closed the connection)
13:05:53*Perkol joined #nim
13:06:05FromDiscord<Bulbasaur> :L pretty active.
13:09:00*Zectbumo quit (Remote host closed the connection)
13:10:19*owl_000 quit (Quit: Leaving)
13:15:43PerkolSo I try to download file using winim library, yet I get wrong file format https://bpaste.net/HCUQ
13:15:54PerkolFile bigger than it should be
13:16:03PerkolWhat may be wrong?
13:19:12livcdWhy would you do it that way?
13:19:52FromDiscord<Rika> Just use httpclient
13:21:10FromDiscord<exelotl> @Rika that's not sleeping 😠
13:21:28FromDiscord<Rika> Hey, I'm lying down on my bed
13:21:30FromDiscord<Bulbasaur> lol
13:21:36FromDiscord<Rika> It'll come sooner or later
13:22:20PerkolDon't want to have ssl deps
13:28:30dom96That's a good reason, sadly I cannot help (and I doubt there are many other here who have winim for this). Might want to create an issue in the winim repo, maybe the maintainer can help.
13:28:36dom96*others
13:28:54*lbart quit (Ping timeout: 256 seconds)
13:30:47*josch557 quit (Ping timeout: 260 seconds)
13:43:34*endragor joined #nim
13:43:45*endragor quit (Remote host closed the connection)
13:45:30FromDiscord<clyybber> Does nimpretty use compiler/renderer.nim?
13:46:28FromDiscord<clyybber> Doesn't look like it..
13:48:00*^^opal_ is now known as opal
13:53:48*lritter joined #nim
14:03:24*hax-scramper quit (Read error: Connection reset by peer)
14:03:39*hax-scramper joined #nim
14:24:51*endragor joined #nim
14:37:20*andinus quit (Quit: ERC (IRC client for Emacs 26.3))
14:39:09disruptek~stream
14:39:10disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
14:39:13disruptekfix this nimph bug.
14:41:00*gmpreussner quit (Quit: kthxbye)
14:41:16*gmpreussner joined #nim
14:48:05FromDiscord<clyybber> @eliezedeck FYI dom96's issue has been resolved. It was not a stdlib error
14:48:12FromDiscord<clyybber> But a user error
14:48:33FromDiscord<clyybber> #13880
14:48:34disbothttps://github.com/nim-lang/Nim/issues/13880 -- 5Channels segfault on Android ; snippet at 12https://play.nim-lang.org/#ix=2gJi
14:48:59dom96yeah, still not fun spending 3 hours chasing these kinds of bugs
14:49:05FromDiscord<clyybber> disruptek: Does #13876 help?
14:49:08disbothttps://github.com/nim-lang/Nim/pull/13876 -- 6add nimPath to nim dump ; snippet at 12https://play.nim-lang.org/#ix=2gK0
14:49:14FromDiscord<clyybber> dom96: Yeah
14:49:44disrupteknope.
14:50:44leorize@clyybber: nim dump already have prefixDir, so we don't need that anymore
14:50:55FromDiscord<clyybber> So revert it?
14:51:11FromDiscord<clyybber> Because it was created to help you with that issue afaik
14:51:15leorizenow just need someone to make it work without having to specify a path name
14:52:23leorizeclyybber: I'm pretty sure it wasn't
14:52:35FromDiscord<clyybber> disruptek: Not sure if you read it last night, but I asked why you can't just blacklist $nim from the path minifying thing
14:52:44leorizenot that its a bad feature
14:52:51disruptekbecause that's dumb.
14:52:58leorizehe wanted it to be portable
14:53:07FromDiscord<clyybber> leorize: https://github.com/disruptek/nimph/issues/127#issuecomment-609297698
14:53:10disbotPath error when using choosenim ; snippet at 12https://play.nim-lang.org/#ix=2gK1
14:53:27disruptekthis is just such a boring bug and everyone wants to talk about it.
14:53:30disruptekfind something else to work on.
14:53:34disruptekthis will be fixed in 10mins.
14:53:39FromDiscord<clyybber> Lol
14:53:45FromDiscord<clyybber> still, I wonna know 😄
14:53:52disruptekyou wonna know what?
14:54:02disruptekc'mon mumble so i can work while i explain it.
14:54:19FromDiscord<clyybber> does it choose the path substitutions so that the paths ascii representation is as short as possible?
14:54:40disruptekyes, and so you can export the cfg to other users.
14:54:44FromDiscord<clyybber> disruptek: am on a pc without a mic :/
14:54:53disrupteknot my problem.
14:55:24FromDiscord<clyybber> disruptek: but then the cfg depends on where my nim is installed right?
14:55:45*sagax quit (Read error: Connection reset by peer)
14:56:01disrupteki don't understand.
14:56:17FromDiscord<clyybber> $nim is the compilers location, is that right?
14:56:34dom96lol
14:56:40leorizeisn't that the point?
14:56:43dom96same questions I had
14:56:56disruptekjesus you guys are dense.
14:57:35FromDiscord<clyybber> leorize: But isn't that bad?
14:57:44FromDiscord<clyybber> Depending on the compilers location?
14:57:45leorizewhy?
14:58:03*andinus joined #nim
14:58:09leorizeno?
14:58:14FromDiscord<clyybber> Because its better to depend on the projects location, no? Or is there no way to do that?
14:58:20leorizeI don't think you understand the problem here...
14:58:31FromDiscord<clyybber> Yeah, I think so too
15:00:29FromDiscord<clyybber> leorize: AFAI understood it the problem is that $nim is not the compilers actual location with choosenim, since it uses symlinks and shims, right?
15:00:48leorizeyes, because of nimph faulty detection
15:00:52leorizethat'll be fixed now
15:00:58leorizeit has no impact on the actual compiler
15:01:00leorizejust nimph
15:01:12FromDiscord<clyybber> But isn't another "solution" to simply not depend on the compilers location at all?
15:01:16disruptekevery tool will have this problem.
15:01:29leorizeclyybber: you don't understand the problem :P
15:01:37FromDiscord<clyybber> I just don't see a scenario where it would be benefitable to depend on the compilers location
15:01:48FromDiscord<clyybber> leorize: probably
15:01:53disrupteki guess you don't write code that parses .cfg files.
15:01:56dom96What is the damn problem?
15:02:32disrupteki tire of explaining it.
15:02:33leorizenimph tries to minify the --path so that it starts at a common root, so it can be portable between system
15:02:41dom96yes, but whyyyyy
15:02:42leorizeiirc it uses $config for the project location
15:02:43FromDiscord<clyybber> I get that
15:02:52FromDiscord<clyybber> yeah, thats cool
15:03:00leorize$nim is just an artifact due to the faulty detection
15:03:06dom96why does it use $nim to shorten the path?
15:03:18leorizefaulty detection of $nim
15:05:39*ryukoposting joined #nim
15:07:32FromDiscord<clyybber> so it uses $nim to shorten the path because of faulty detection of $nim?
15:07:54FromDiscord<clyybber> leorize: Or was that an appendix to your last sentence?
15:08:00disrupteki'd hate to have to watch you guys debug anything.
15:08:14FromDiscord<clyybber> I hate to watch you debug anything 😛
15:09:06disrupteksuit yourself.
15:09:29FromDiscord<clyybber> hey, at least I'm not stupid alone oka
15:09:30FromDiscord<clyybber> y
15:10:13disruptekyeah, you're in great company.
15:10:16solitudesfwhat the FUCK is going on
15:10:22FromDiscord<clyybber> dunno
15:10:29FromDiscord<clyybber> I don't get the bug
15:10:35disruptekso what?
15:10:36disruptekmove on.
15:10:45disruptekit's a waste of time to talk about.
15:10:51disruptekalready fixed.
15:10:54FromDiscord<clyybber> nice
15:11:09FromDiscord<clyybber> is the fix online?
15:13:15disrupteksure.
15:15:04FromDiscord<clyybber> ok cool, so now you parse the compilers dump, and the bug is fixed. I get that
15:15:19FromDiscord<clyybber> I just don't get why you have a need for the compilers location at all?
15:15:42disrupteki'm okay with that.
15:16:59shashlickYou can import compiler as a package
15:17:09shashlickSo $nim is useful
15:17:34FromDiscord<clyybber> ah I see
15:17:57FromDiscord<clyybber> And when the path using $config happens to be shorter than using $nim it won't use it?
15:18:57shashlickAnd nimph generates nim.cfg files so that you don't need to use Nim's code that searches nimble dir itself to figure out where packages are
15:19:07shashlickYes it will
15:19:12FromDiscord<clyybber> but then its unreliable
15:19:29shashlickNo one will put nimble packages in the compiler directory
15:19:55shashlickconfig will be most likely for local deps
15:20:21FromDiscord<Lea-Kitty> Hi 🙂 ,
15:20:21FromDiscord<Lea-Kitty>
15:20:21FromDiscord<Lea-Kitty> I am interested in NIM (https://nim-lang.org/) and V (https://vlang.io/), I would like to know what is the main difference between them put a by the community ? 👀
15:20:52leorizeNim exists :)
15:20:54shashlickShort answer, Nim's been around for a decade+
15:20:54FromDiscord<clyybber> nim works
15:21:01FromDiscord<clyybber> and V is hot air
15:21:25leorizetechnically V does work now, with a lot of asterisks :p
15:21:47FromDiscord<Recruit_main707> "it works on my machine" lang
15:22:02FromDiscord<konsumlamm> also with a lot of memory leaks
15:22:06FromDiscord<konsumlamm> and a lot of WIPs
15:22:19leorizewhy does everyone keep writing Nim "NIM"?
15:22:35leorizeit's not an abbrevation or anything
15:23:05FromDiscord<exelotl> lol it's the Lua curse
15:23:21FromDiscord<konsumlamm> you mean LUA?
15:23:55IWSnimhey all, I'm attempting to figure out why 1) overloading isn't working as I'd expect and 2) why I'm hitting a type mismatch for mutability
15:24:00IWSnimI have a snippet here https://pastebin.com/TQccVrwk
15:24:20dom96shashlick, so it's just for the compiler?
15:24:27dom96you know, you can install `compiler` as a package
15:24:34FromDiscord<Lea-Kitty> You mean that Nim instead of NIM ^^ compared to V is more serious about development, that V is just a dying language ?
15:25:33FromDiscord<Lea-Kitty> @gitterirc Out of habit, as soon as I name a language, I put everything in bold. 😋
15:26:03FromGitter<zetashift> @Lea-Kitty something that never was alive can't die
15:26:19leorizedom96: `$nim` is the path to the compiler itself
15:26:25FromDiscord<konsumlamm> V is mostly empty promises as i see it
15:26:27leorizethe compiler package have nothing to do with this
15:26:47FromDiscord<clyybber> so
15:26:52dom96leorize: yes, I know. As far as I understand nimph is using it as a hack to get shorter paths
15:26:53FromDiscord<clyybber> why use $nim at all?
15:26:59dom96$nim/../pkgs/blah-1.0
15:27:04FromGitter<zetashift> there are a lot of differences between Nim and V, but the biggest one is Nim is production proven and V is still getting started, but I agree with konsumlamm, V is mostly empty promises at the moment
15:27:07dom96because Nim sometimes happens to be in ~/.nimble/bin
15:27:08leorizedom96: no, it's not doing that
15:27:20dom96then wtf is it for?
15:27:29disruptekjust to confuse simps.
15:27:58dom96haha, cool
15:28:06leorizeif you do `--path=/path/to/nim/lib/pure/ioselectors`, then it can be safely shortened into `--path=$nim/lib/pure/ioselectors`
15:28:13leorizecompletely portable between systems
15:28:19dom96why would you do that?
15:28:28dom96It's already added to the path by Nim
15:28:29leorize`$nim` is never used as a relative path in the `..` sense
15:28:41FromDiscord<clyybber> ah
15:29:02leorizedom96: no one does that, but it doesn't hurt to have the code
15:29:17dom96lol
15:29:25leorizehe has the code to convert it one way, doesn't hurt to do it the other way as well
15:29:27FromDiscord<clyybber> So why does it end up in kungtottes cfg?
15:29:28dom96if no one uses the code then yes it does hurt to have it
15:29:29leorizeesp since it saves parsing time
15:29:43dom96it's just untested code that will rot
15:29:58leorize@clyybber: the compiler path is detected as this: `~/.nimble`
15:30:07FromDiscord<clyybber> Ah
15:30:08leorizewas*
15:30:28FromDiscord<clyybber> gotcha
15:30:31*rockcavera joined #nim
15:31:00disruptekthat's just how the bug was /found/.
15:31:25disruptekthe real problem is that config parsing is broken unless you know the true path to the compiler, which is obscured by choosenim's hack.
15:31:36disruptek😜
15:31:47FromDiscord<clyybber> What will end up in kingtottes config now that its fixed?
15:32:15disruptekon 1.0.6? $home/.nimble/pkgs/...
15:32:23disruptekon 1.2? $nimbledir/...
15:32:27FromDiscord<clyybber> Ah cool
15:32:30FromDiscord<clyybber> Thanks I get it now
15:32:50FromDiscord<clyybber> sorry for being annoying bro
15:33:01disruptekbecause he doesn't use choosenim anymore. 🤣
15:33:19Zevvdisruptek: how do I unsubscribe a disbot channel?
15:33:37disrupteka what?
15:33:41Zevvradio thingy
15:33:48disrupteki think it's `detune`?
15:34:08disrupteknotune, untune, detune.
15:34:12Zevvokay!
15:34:22Zevvthanks for that
15:34:22disrupteklemme know if it works.
15:34:26Zevvokay!
15:34:28Zevvit says "okay!"
15:34:41disruptekyeah, i don't trust that mofo though.
15:35:01Zevvbetter safe then sorry, right
15:36:07*dddddd quit (Ping timeout: 250 seconds)
15:36:58dom96so you're not actually putting `$nim` into nim.cfg files, would have saved us a lot more trouble if you just made that clear ;)
15:37:13disruptekyeah, it's all my fault.
15:37:26disruptekwhenever you don't understand something, just blame someone else.
15:37:28shashlickOk so what next
15:37:57shashlickPeople asking questions to understand != blame
15:38:12shashlickThey actually care else they wouldn't ask
15:38:22disruptekit's just noise.
15:38:47shashlickIt got us a fix :p
15:39:01disrupteknow fix the rest of the tools.
15:41:48dom96This is what I was concerned about FWIW, maybe I misunderstood it completely but it sounded like shashlick was saying that nimph uses something like: --path:$nim/../pkgs/blah-1.0 because "It's shorter"
15:41:52dom96https://irclogs.nim-lang.org/04-04-2020.html#23:13:20
15:42:12dom96and disruptek wasn't disagreeing
15:42:18leorizethis is the loss of data in communications :p
15:43:03leorizethey were talking in the context of the bug
15:43:16leorizethe detailed explaination is there if you wanna read
15:44:00*josch557 joined #nim
15:50:06shashlickNimph is shortening yes but $nim wasn't right sure to choosenim symlinks - he has fixed this in nimph but the issue persists if anyone assumes that $nim can be found using findExe
15:50:13FromDiscord<clyybber> shashlick: I don't understand. It is fixed in nimph now, and its not using any workarounds. So theres nothing anymore to fix in choosenim right?
15:50:31shashlickMy last message
15:50:47leorizethis is a tooling problem
15:50:52FromDiscord<clyybber> Hmm, IMO thats no ones problem. findExe can't find $nim .
15:51:04FromDiscord<clyybber> not a problem really
15:51:21FromDiscord<clyybber> get $nim from nim dump
15:51:29*nsf quit (Quit: WeeChat 2.7)
15:51:49leorizewell how else are you supposed to find it when the compiler code does exactly that? :)
15:52:02disruptekhard to parse configs without this information.
15:52:19FromDiscord<clyybber> leorize: Were you replying to shashlick or me?
15:52:24leorizethe old detection code was based on how the compiler does it itself iirc
15:52:25leorizeyou
15:52:42FromDiscord<clyybber> the compiler does findExe?
15:52:53leorizegetAppFilename()
15:53:02leorizebecause it knows exactly where it is :P
15:53:13FromDiscord<clyybber> Yeah. So it doesn't do findExe
15:53:18FromDiscord<clyybber> So it doesn't have the shims problem
15:53:22FromDiscord<clyybber> Problem solved?
15:53:35disruptekit's never a problem for the compiler.
15:53:41FromDiscord<clyybber> Yeah
15:53:44disruptekit's a problem for any other tool that wants to parse a config.
15:53:49disruptekfor the 10th time...
15:53:53FromDiscord<clyybber> They should use nim dump
15:53:59FromDiscord<clyybber> for the 2nd time...
15:54:05disruptek"they" are. where "they" are nimph.
15:54:26leorizeclyybber: do you know that nim dump don't get you the path unless you pass in some undocumented flags? :)
15:54:38FromDiscord<clyybber> So document them :p
15:56:22liblq-devshashlick: does nimterop support ARC?
15:56:30FromDiscord<clyybber> choosenim doesn't really have an alternative afaict
15:56:43disruptekrename.
15:56:52dom96rename?
15:56:52shashlickNot yet - the last few times I tried, it r crashed
15:56:54dom96rename what?
15:57:37FromDiscord<clyybber> rename the binaries I guess
15:57:43disruptekor a directory.
15:57:54liblq-devshashlick: right. I just had a bug report on euwren from a user trying to compile it under --gc:arc, I'll let them know that nimterop doesn't support it yet
15:58:10dom96elaborate
15:58:14disrupteknope.
15:58:34leorizedom96: https://github.com/disruptek/nimph/issues/127#issuecomment-608991164
15:58:36disbotPath error when using choosenim ; snippet at 12https://play.nim-lang.org/#ix=2gK1
15:58:39leorizethough please don't argue there :P
15:59:23FromDiscord<clyybber> IMO findExe simply shouldn't be used for that purpose, until it gets an option to follow symlinks
16:00:10leorizeor you can use expandFilename(findExe)
16:00:15leorize:P
16:00:39FromDiscord<clyybber> AFAICT findExe even has an option to follow symlinks
16:00:54FromDiscord<clyybber> And its on by default
16:00:55disrupteki'm told it doesn't work on windows.
16:01:05FromDiscord<clyybber> Yeah, but kingtotte wasnt on windows
16:01:19leorizewell can we just rest the issue now?
16:01:21disrupteki'm not going to guess at what code works there.
16:01:29leorizeit's fixed.
16:01:35shashlickRenaming directories for choosenim is an option but then you need to add two directories to path
16:01:37FromDiscord<clyybber> leorize: Yeah, but it may have surfaced an issue with findExe
16:02:04dom96As far as I can tell Araq's suggestions doesn't work when you want to only add ~/.nimble/bin to the PATH
16:02:38dom96and then what, you want me to add a new PATH entry for each Nim version I install?
16:02:53leorize@clyybber: choosenim uses shim binaries everywhere fwiw
16:02:56dom96I can't see how else that can work
16:03:16shashlickNo add a second path and rename toolchains to that dir
16:03:21FromDiscord<clyybber> leorize: Oh, I was under the assumption that it used symlinks on posix
16:03:41*disbot left #nim (#nim)
16:03:46shashlickIt is symlinks on posix
16:03:55solitudesfno?
16:03:56dom96is it?
16:04:13FromDiscord<clyybber> shashlick said so :p
16:04:19dom96shashlick, hrm, that could work
16:04:47shashlickBut that's a second directory added to path
16:05:02shashlickWill be third if you consider gcc
16:05:18ryukopostingjust realized that building Kate would require me to install 40GB worth of Qt crap, a special version of cmake, and another build tool that sits on top of that, then string all of that stuff together perfectly so that it all works perfectly
16:05:40ryukopostingguess I'm using feud as the development environment for my engine
16:05:43shashlickBut everyone else using Nim without choosenim already add more dirs to path
16:05:47leorizeryukoposting: now you know why qt stays with C++ devs
16:05:57FromDiscord<exelotl> lol Qt is tragic
16:06:05dom96shashlick, yeah, not sure it's worth it
16:06:22dom96The way Nim handles paths is hacky already IMO
16:06:25ryukopostingI really like Kate, it gives a nice balance of np++'s simplicity and vscode
16:06:31ryukoposting's featureful-ness
16:06:39ryukopostingbut sweet jesus the code that makes it tick
16:06:43dom96findExe cannot always work because of how Unix package managers install it for example
16:06:46FromDiscord<clyybber> shashlick: So is it symlinks on shims on posix now?
16:06:51dom96so there are special cases for that
16:06:53FromDiscord<exelotl> the software made with Qt is so nice and lightweight... but I don't have that many gigabytes to spare on my hard drive
16:07:01FromDiscord<clyybber> dom96: WDYM?
16:07:12leorizeit's still more lightweight than electron, fwiw
16:07:26dom96clyybber: /usr/bin/nim and stdlib is /usr/lib/nim, so stdlib isn't in $nim/lib
16:07:28ryukopostingit's a good thing I'm doing this on windows, my windows drive has that space available but my linux disk? hell no
16:07:57FromDiscord<clyybber> dom96: Ah gotcha, I was thinking that you were talking about a problem with findExe
16:08:03dom96clyybber: unless something changed it should be shims on all platforms.
16:08:14FromGitter<deech> Does anyone here care about high level Nim binding to FLTK? I've done it for Haskell and found it quite nice.
16:08:33FromGitter<deech> I know it's not Qt.
16:09:04leorizeits never hurt to have more libraries :)
16:09:14FromDiscord<exelotl> yeah that would be neat @deech
16:09:33leorizeI kinda hope that we would have something that's as lightweight as LCL
16:09:50FromDiscord<clyybber> dom96: k, thx for clearing it up
16:10:13FromGitter<deech> FLTK is and LCL is hard to use on macos
16:10:47leorizeyea but LCL is native and I like that :P
16:11:28*josch557 quit (Remote host closed the connection)
16:11:44*josch557 joined #nim
16:11:46FromDiscord<exelotl> where can I find out about lcl?
16:11:46shashlickI think the current solution is good - don't assume where the compiler is
16:12:05shashlickWe can change choosenim if there's other real issues with shims and symlinks
16:12:14shashlickElse there are better things to do
16:12:38leorize@exelotl: https://wiki.freepascal.org/LCL
16:12:53FromDiscord<clyybber> shashlick: choosenim isn't using symlinks
16:13:47ryukopostingwhat do other tools use? e.g. multirust
16:13:49shashlickOk maybe, I thought it was symlinks there
16:14:29ryukopostingif there's no good solution, copying someone else's bad solution at least gives you a scapegoat
16:14:53shashlick@ryukoposting: looks like feud it is - I can commit to work on porting it to use the plugin system package and help getting it to compile on windows
16:15:06FromDiscord<clyybber> ryukopositng: I think they do the rename approach
16:15:14ryukopostingshashlick, how were you compiling it before?
16:15:19dom96IIRC they use shims
16:15:21leorizeshims are used by chocolatey since forever :P
16:15:38dom96well, rustup does
16:15:44shashlickThere's a nimble task
16:15:44dom96not sure about multirust
16:16:03ryukopostingwell I have multirust so I guess I can find out real quick
16:16:05shashlickI think nng might have changed causing that failure
16:16:16FromDiscord<clyybber> multirust is deprecated btw
16:16:30ryukopostingo
16:16:32shashlick@liblq-dev: I don't think that issue is a nimterop issue with arc
16:16:37ryukopostingshows how long it's been since I used rust
16:16:40shashlickNeed to try and check
16:16:53leorize@clyybber: how's your ryu port?
16:16:58leorizehave you managed to clean it up?
16:17:18dom96https://github.com/rust-lang/rustup#how-rustup-works
16:17:28Zevvdisruptek: well,there you have it. it says "okay!" but didnt do it
16:17:37dom96yep, I copied rustup :)
16:17:44ryukopostingsounds good shashlick. Is feud dependent on a particular toolchain? I plan to use mingw64
16:17:44leorizeshashlick: I'm kinda out of ideas now. nim.cfg in the project dir can't be honored by my way of doing nimble -> nims
16:17:46FromDiscord<clyybber> leorize: Cleaned it up, but didn't change semantics
16:17:49disruptekZevv: i knew it.
16:18:20shashlick@ryukoposting ya I was using mingw too
16:18:25ryukopostingsweet
16:18:54shashlick@leorize I'm secretly considering adding the compiler back into nimble ever since I discovered $nim
16:19:09FromDiscord<clyybber> don't
16:19:15leorizedon't
16:19:29shashlickUsing compiler as a nimble package didn't work since you could have different versions
16:19:37dom96yeah, don't
16:19:43shashlickBut $nim fixes that
16:19:47shashlickThere will only be one
16:20:01ryukopostingbtw where did "Fed Ep with UDitors" come from?
16:20:08leorizeI consider the compiler unstable for any inclusion into any program
16:20:22disruptekZevv: it looks like it worked.
16:20:36shashlickI was fed up with going back and forth looking for a good programming env
16:21:01shashlickVscode is too fat, but I've compromised with it since I mostly use remote ssh now which works well
16:21:02dom96shashlick, how does it?
16:21:09ryukopostingfor the record, I like the idea of having a $NIMPATH environment variable or similar, that just points to a particular nim/bin. Nimble knows to call the compiler from that, and you leave it up to the user to configure their $PATH as they please
16:21:56shashlickWhen you add --path:"$nim", then import compiler/options will import the active compiler's instance of the file
16:22:13leorizeryukoposting: how are you gonna call nim without nimble?
16:22:34ryukopostingthe user is instructed to put it in their PATH if they want it
16:22:43leorizeshashlick: that's quite a hack tbh
16:23:00shashlickSo there's no scenario where you have a new options.nim being built by an old compiler.exr
16:23:02dom96shashlick, what does that solve? You'll get whatever Nim the user has, which may be 1.0.6 or it may be 0.8.0
16:23:04leorizeryukoposting: or you could just put it in their PATH for them :P
16:23:28shashlickYa and nimble will be built with that
16:23:38FromDiscord<clyybber> Why?
16:23:44shashlickWhat's the harm - it's not like nimble lives outside the nim directory
16:23:46ryukopostingyes but then they might fiddle with their path so there's multiple nim.exe's in it. now what does choosenim do when they ask it to switch versions?
16:23:51FromDiscord<clyybber> Why not use the abstraction "executables" given to us by the os
16:23:59shashlickWhen you change your compiler version, you use a new nimble with it
16:24:00leorizeryukoposting: it just swap out the shims?
16:24:04leorizeit knows where they are
16:24:15FromDiscord<clyybber> shashlick: Maybe we don't want that?
16:24:16*solitudesf quit (Quit: Leaving)
16:24:20ryukopostingwhat I was proposing gets rid of shims entirely
16:24:23dom96shashlick, what does it actually solve?
16:24:28shashlickThat's how it works today too
16:24:32dom96from my perspective it is just like we had it before
16:24:39shashlickYou can nimble install nimble no doubt but almost no one does that
16:24:44dom96and even worse since the compiler source code isn't pinned
16:25:09shashlickThe issue in the past was that there was the nim compiler and a compiler package in nimble pkgs which conflicted
16:25:16ryukopostingnor would a "use-a-separate-env-variable" solution require symlinks. It'd be elegant, if not the most tightly integrated thing on earth
16:25:20leorizeryukoposting: oh, the proposal was much simpler: have a ~/.choosenim/nim-current directory, which will be in PATH, then rename ~/.choosenim/nim-<version> into that directory everytime a version switch is requested
16:25:49ryukopostingI'd prefer shims over that
16:25:55FromDiscord<clyybber> what?
16:26:00dom96shashlick, the issue was that Nimble was compiled against a Nim version that mismatched the one that was installed
16:26:11leorizeI'd prefer shims over the environment variable mess too :P
16:26:21FromDiscord<clyybber> I'd prefer renaming
16:26:22ryukopostingok so we're back to chims
16:26:30FromDiscord<clyybber> No, why not rename?
16:26:36FromDiscord<clyybber> Theres no reason against it so far
16:26:49leorizeto be fair, the current solution works :P
16:26:58dom96yeah, the current solution is there already
16:27:07FromDiscord<clyybber> Yeah, but it could be cleaner
16:27:08dom96there isn't really a good reason to change
16:27:15FromDiscord<clyybber> True
16:27:59shashlickI'll fine with leaving it as is
16:28:02ryukopostingquestion: what happens on unix vs. windows when a process starts with some path /x/y/z in its $PATH, then /x/y/z get renamed to something else and some new directory gets named /x/y/z
16:28:15ryukopostingthat would decide whether renaming makes sense
16:28:19shashlickThe issue was with compile failures though
16:28:38shashlickCause you could have an old compilers package sitting in pkgs
16:28:58dom96ryukoposting, that's a good point. Windows will screw you up: if a .exe is running you cannot move it IIRC so this may prevent renames
16:29:32leorizeunless the exe was opened with FILE_SHARE_DELETE, which 100% of windows programs don't do
16:29:35ryukopostingif it just tells you "no" that's fine, then just tell the user "no, wait until this other thing is done"
16:30:08FromDiscord<clyybber> is someone on windows here?
16:30:13dom96so there is your reason for not doing renames
16:30:15ryukopostingcurrently yes
16:30:17FromDiscord<clyybber> I wonder if it applies to renaming the parent folder
16:30:31FromDiscord<clyybber> or if it only applies to renaming the exe itself
16:30:32ryukopostingmy main toolchain is x86_64-pc-msys
16:30:50FromDiscord<clyybber> ryukoposting: Can you check?
16:30:56ryukopostingaight let's find out
16:30:59ryukopostingone sec
16:33:01FromGitter<deech> leorize, if you like native doesn't WxWidgets already get you there?
16:33:23dom96Even if it works, this isn't enough to convince me to switch to this mechanism. The current way works pretty well.
16:33:54leorize@deech: it's heavyweight, and the Nim API for it is ugly
16:34:04*hax-scramper quit (Ping timeout: 265 seconds)
16:34:18leorizethough PMunch's genui pretty much solved that
16:34:29*hax-scramper joined #nim
16:34:36ryukopostingno, windows will not let you do that
16:35:02FromDiscord<clyybber> thanks for testing
16:35:08FromDiscord<clyybber> heh, someone tell Araq
16:35:34leorizeI'm thinking of making a genui-like thing for karax actually
16:36:17leorizeso I can build the dom and get whatever `Node` that I want
16:36:20dom96hah. Already posted on that thread
16:36:34leorizecomplete control over the state :P
16:36:51FromDiscord<Recruit_main707> btw what happened with the online talks?
16:37:20FromGitter<deech> leorize, seems there's some initial work on genui+karax? https://github.com/PMunch/genui/tree/master/genui/platforms/karax
16:37:58dom96So I now have the prospect of linking openssl on android. This does not sound like fun.
16:38:09leorizedeech: that's for generating the vdom
16:38:32FromGitter<deech> leorize, ah, got it.
16:38:41leorizeAraq said that my best bet of actually having Components is to use a Node
16:38:56leorizebecause the dom have a state and you gotta accept that fact :P
16:39:35FromGitter<deech> This is part of the Svelte approach I think.
16:39:40ryukopostingleorize if you want macros that turn ui-definition language into stuff that you can make a proc for, I've spent 3 months doing that for Chroma
16:40:00leorizeah, mine is gonna be simpler
16:40:10leorizejust the karax ast, but output a Node
16:40:23FromDiscord<clyybber> I should be able to rely on fspSet/Cur/End being the same SEEK_SET/CUR/END right?
16:40:34FromGitter<deech> I think Nim can do Svelte better than Svelte. :)
16:40:49ryukopostingman, I didn't even think to look at karax first lol
16:40:50leorizethen I can have the same syntax as genui: `variable % tdiv` and I'll have the Node for tdiv in my variable
16:41:21leorizethis allows for easier tinkering :)
16:42:05leorize@deech: Araq actually tried, he gave up in the end though, because you gotta wrap every type in React[T] wrappers
16:42:31ryukopostingit actually looks very similar to an earlier iteration of Chroma's ui language. I moved away from command-style syntax like that the karax sample uses, and went to assignments
16:42:51leorizedeech: https://github.com/pragmagic/karax/blob/master/karax/reactive.nim
16:42:59ryukopostingso instead of button: text "hello", it's button: text = "hello"
16:43:39ryukopostingI'm not enough of a web guy to know what any of this stuff is lol
16:44:02ryukopostingmy entire website is hand-written HTML and CSS without a single line of JS
16:44:08leorizeryukoposting: you should still study them
16:44:19leorizethey open a pretty interesting path for native ui
16:44:44ryukopostingI've used JS plenty, granteds
16:44:47ryukopostinggranted*
16:45:32ryukopostingmy current job (which I'm leaving soon! oh boy) uses it to make our android apps scriptable, so I maintain this entire JS interpreter tangle that's mashed together with an android app
16:45:46leorizelol
16:45:53ryukopostingthis was not my idea
16:46:17ryukopostinghad I been around, I would have made it clear how stupid of an idea that is
16:47:27ryukopostingI wonder if my ladder logic nimble package will ever be used
16:48:24ryukopostingI made that so I could prove to my employer that Nim could work as a replacement for IEC 61131-3
16:48:39leorizewas he convinced?
16:49:03ryukopostingthe ones who understood what a Nim macro is, and what the compiler does to make them work, were seriously impressed
16:49:59leorizehow about the people that actually makes decisions? :P
16:50:07ryukopostingnah they didn't care
16:50:25leorizelol
16:50:39ryukopostingI still used nim to made a makefile generator that we use for at least one codebase
16:50:49ryukopostingdid that under their noses
16:51:11leorizeonce you left they will pluck that out for cmake, guaranteed
16:51:15ryukopostingI don't have my hopes up for getting nim into my new workplace though. Defense contractor, and a big one at that
16:51:30ryukopostingnah they'll never use cmake
16:52:22ryukopostingwe have one software engineer who pretty much runs the show, dude's a soviet union expat who lived in isreal for a while as a kid, then in canada, then came to the US
16:52:54ryukopostinghe wrote the kernel we use on nearly all of our products, and his name is on the patent for said kernel. management knows he knows more than they do, and they know he's worth millions to the company
16:53:28leorizedamnnnnnnn
16:53:42ryukopostingand he HATES cmake
16:53:57ryukopostinghe sees it as a non-solution to a non-issue
16:54:16leorizeyes, but is he gonna write his kernel in nim?
16:55:05leorizedid you manage to impress him enough? :P
16:55:06ryukopostingI showed it to him. His earliest professional work was with Borland so the Pascal influences helped
16:55:13*thomasross_ joined #nim
16:55:13*thomasross is now known as Guest36986
16:55:13*Guest36986 quit (Killed (barjavel.freenode.net (Nickname regained by services)))
16:55:13*thomasross_ is now known as thomasross
16:55:32*josch557 quit (Ping timeout: 260 seconds)
16:55:35ryukopostingor, sorry, not borland, delphi
16:55:55ryukopostinghe's been a DOS guy since the very beginning
16:56:30disruptekleorize: are you alive?
16:56:35disruptekcan you come on the stream?
16:56:44*josch557 joined #nim
16:57:18ryukopostingme and this guy are good friends now, couldn't have found myself a better mentor in the beginnings of my career.
16:57:52leorizedisruptek: I'm on the stream
16:57:58leorizewhat's up?
17:09:00FromGitter<awr1> @exelotl @supakeen i think the pragma ending dot omission is unlikely to be removed at this point
17:09:34leorizeit's not a bug, it's an actual feature
17:09:45leorizebut tbh, `{. .}` looks better :P
17:09:45supakeenawr1: Sure, but for now I'll use the ending dot like the rest of us :)
17:09:54FromGitter<awr1> i remember there was an issue about a while ago and i think dom or araq said that it wasn't going to be removed
17:10:09leorizeyea, it's a part of the actual grammar
17:10:13FromGitter<awr1> yes
17:13:34FromDiscord<exelotl> what if we got rid of the leading dot too? 🤔
17:14:05FromDiscord<exelotl> then I guess it conflicts with the Set syntax
17:14:10leorize`{ }` is the set/array construction syntax
17:14:12*hax-scramper quit (Read error: Connection reset by peer)
17:14:26*hax-scramper joined #nim
17:14:26FromGitter<awr1> there have been people before that have argued for the pragma syntax to be changed
17:14:55FromGitter<awr1> but idk
17:15:27FromGitter<awr1> pragma syntax is fine
17:15:54FromDiscord<exelotl> yeah it's fine how it is
17:20:20supakeenInteresting.
17:21:00supakeenWonder if this is intended, setting a custom Content-Length on a response makes httpclient's body that length even if there was more data :)
17:21:07supakeenI can understand why, but a thought.
17:23:22leorizethe less you send, the faster it becomes
17:24:02supakeenhttps://github.com/supakeen/Nim/blob/add-asynchttpserver-tests/tests/stdlib/tasynchttpserver.nim
17:24:10supakeenI really need to get rid of the repetition :(
17:26:38leorizesupakeen: write a template :)
17:28:59*Perkol quit (Remote host closed the connection)
17:29:15supakeenYea, next step!
17:29:53*hax-scramper quit (Ping timeout: 258 seconds)
17:31:15*hax-scramper joined #nim
17:37:21FromDiscord<exelotl> doing some very evil things lol
17:37:21FromDiscord<exelotl> https://cdn.discordapp.com/attachments/371759389889003532/696413181941252216/unknown.png
17:38:52FromDiscord<exelotl> result is that I can group together related definitions like so:
17:38:52FromDiscord<exelotl> https://cdn.discordapp.com/attachments/371759389889003532/696413560623988827/unknown.png
17:39:27FromDiscord<clyybber> Ha nice
17:39:45FromDiscord<clyybber> Thats actually very neat IMO
17:39:52FromDiscord<exelotl> yeah would be nice if there was a real feature like this x)
17:40:21FromDiscord<exelotl> was planning to make a feature request for it
17:40:32FromDiscord<clyybber> Make a PR ?
17:40:41FromDiscord<clyybber> Seems like you managed to do it
17:41:42FromDiscord<clyybber> I actually prefer it like this
17:41:48FromDiscord<clyybber> seperation of concerns and so on
17:42:21FromDiscord<clyybber> Maybe we could add it, and document it
17:42:23supakeenHow do I tell my template to accept 'await' in it, I'm using it an an {.async.} pragmaed proc but it seems template's themselves don't take those pragma's.
17:42:44leorizesupakeen: that's a well known bug
17:42:59supakeenIs there a well known workaround?
17:43:19FromDiscord<exelotl> this solution is pretty hacky, it just *undoes* the spacing. Would be nice to add a directive that tells the compiler not to create the spacing element in the first place.
17:43:46leorize#12743
17:43:48FromDiscord<exelotl> and also it could play nicely with Nimsuggest and stuff
17:44:03leorizedisbot?
17:44:06leorizewait it died?
17:44:14FromDiscord<clyybber> lol
17:44:24FromDiscord<clyybber> zevv accidently turned disbot off
17:44:28leorizehttps://github.com/nim-lang/Nim/issues/12743
17:44:29FromDiscord<clyybber> in his quest to unsubscribe
17:45:57supakeenleorize: yield is indeed a bit tricky because I actually need the result :)
17:47:00supakeenBut it seems I can use waitFor(..) instead in my specific case (was said in an issue linked-to from that one). Thanks!
17:47:43leorizenote: don't use waitFor() in an async proc
17:48:09leorizesupakeen: just yield it, then check if it's finished, then get the value from the future
17:49:19supakeenIn my specific case I can use the waitFor even though it won't work in general (I only start two futures at a time, the second one ends the first one).
17:49:43*Trustable joined #nim
17:53:41FromDiscord<kaderallam> Hello everyone, I have a question which will certainly sound stupid to you but let's say i have var a:string = "test" and i want a reference to the same object, liek var b: ref string , how do i assign a reference to the object ?
17:54:14leorizeyou can't
17:54:27leorizeit has to be a reference from the start
17:54:40leorizeit'd be helpful if you can give us an example use case
17:55:31FromDiscord<kaderallam> interesting
18:01:27*holikon1 joined #nim
18:02:26FromDiscord<KingDarBoja> How to specify a proc parameter of type `proc`? like this maybe ?-> proc myCustom(a: proc) = ... ?
18:02:58shashlickPut the full proc signature including return value ND pragmas if any
18:03:49supakeenFor example: proc test(handler: proc (request: Request): Future[void] {.gcsafe.})
18:04:28FromDiscord<KingDarBoja> Ok
18:04:59FromDiscord<KingDarBoja> Hummm if the passed procedure is a generic?
18:05:32*josch557 quit (Ping timeout: 260 seconds)
18:09:22*endragor quit (Remote host closed the connection)
18:09:36*holikon1 quit (Ping timeout: 240 seconds)
18:10:05*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
18:11:30*pbb joined #nim
18:15:16FromGitter<eliezedeck> https://play.nim-lang.org/#ix=2gL4 ⏎ I feel it is a bug because not all async procs are aware that the future has been resolved; but I tried older versions down to v0.17.0, and it behaves the same ... why is it *only one await aware of the resolved future*?
18:15:50FromGitter<eliezedeck> in the example, I was expecting "Foo and Bar to be saved"
18:15:57FromGitter<eliezedeck> no just one of them
18:15:59FromDiscord<Varriount> axios: When disruptek said that he muted you, he was talking about a local mute (local to disruptek's computer).
18:18:55*andinus left #nim ("ERC (IRC client for Emacs 26.3)")
18:20:40FromGitter<eliezedeck> @Araq @dom96 @mratsim guys, this really doesn't seem right, what am I missing? https://play.nim-lang.org/#ix=2gL4 ... normally, instinct and experience from Javascript and probably other languages with promise/future/... would say that both "Foo and Bar will be saved", but no, only one await will be awakened; that's really not right
18:21:08FromGitter<eliezedeck> I hope I'm wrong
18:22:37leorizehttps://play.nim-lang.org/#ix=2gL8
18:25:24leorizewell to be fair I'm not sure what's wrong :P
18:25:35leorize@Varriount: he is axion
18:26:26FromGitter<eliezedeck> yes, it's not clear why asyncCheck works ... but then, what if I want the value sent from the savior proc? https://play.nim-lang.org/#ix=2gL9
18:27:09FromDiscord<kaderallam> guys i am confused with seq it is said to be a ref in the doc but when i assign the value to another var it is copied. And when i tried to do something simple like this, it doesnt work:
18:27:09FromDiscord<kaderallam> var d:ref seq[int] = new seq[int]
18:27:09FromDiscord<kaderallam> d.add[int](1)
18:28:35leorizekaderallam: you gotta dereference the `ref`: https://play.nim-lang.org/#ix=2gLb
18:29:36FromDiscord<kaderallam> thx
18:34:04*FromDiscord <KingDarBoja> Axion has joined the battle
18:34:18axionwut
18:34:37FromDiscord<KingDarBoja> I just noticed I was trying to do some dumb check and remembered what Rika said about Nim being compile check lol
18:34:59FromDiscord<KingDarBoja> For real, I must stop thinking like it is python
18:35:08FromDiscord<KingDarBoja> Welcome axion!
18:38:43FromDiscord<kaderallam> > <leorize> kaderallam: you gotta dereference the `ref`: https://play.nim-lang.org/#ix=2gLb
18:38:43FromDiscord<kaderallam> @gitterirc is it possible to dereference a string ?
18:39:31*sagax joined #nim
18:39:59leorizeno
18:40:07leorizestring and seq are value types in nim
18:40:42*kenran joined #nim
18:40:49FromDiscord<kaderallam> is there a way to create a ref string or req seq from an existing string or seq
18:41:15leorizeno
18:41:25FromDiscord<kaderallam> thanks
18:41:28leorizewell yes, but it won't have the effect that you expect
18:42:02FromDiscord<kaderallam> actually i dont want a ref on the actual string or seq, i just want a copy of it but as a ref
18:42:27leorizeah, then just make a ref, then `ref[] = what you wanna copy`
18:57:36*josch557 joined #nim
19:00:45*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
19:04:16YardanicoI forgot, is it possible to split Jester routes between multiple files?
19:05:37leorizeyes, though it's painful
19:05:56leorizeuse the `router` template
19:06:20leorizebut beware, everything you put in there must be accessible by the module that routes into it
19:06:28leorizesince the AST inside will be copied verbatim
19:06:44ryukopostinghow easy is it to build a nim compiler that can be embedded inside another software package?
19:06:48*kenran quit (Ping timeout: 265 seconds)
19:07:08leorizeryukoposting: wdym by can be embedded?
19:07:38ryukopostinglet me simplify the question: how easy is it to compile the compiler
19:08:17FromDiscord<Recruit_main707> this remembers me to silentrinity
19:08:21FromDiscord<Recruit_main707> reminds*
19:08:44Zevvryukoposting: the compiler is available as a nimble lib IIRC
19:08:49Zevvnever tried it though
19:09:04Zevv`nimble install compiler`
19:09:08ryukopostinghmmmmm that's got me thinking
19:09:34ryukopostingmaybe my SDK's installer could basically just install Nimble, then just tell nimble what packages to install
19:21:52*Vladar quit (Quit: Leaving)
19:22:23*opal quit (Ping timeout: 240 seconds)
19:27:42jkenI have a question about nim wrappers for c, looking at https://github.com/barcharcraz/nim-assimp its missing a function I want (pMaterial->GetTextureCount). it's defined in the C header here: https://github.com/assimp/assimp/blob/5a674bb464f7cba4b4c14356b04779bab656ccb9/include/assimp/material.h#L749
19:28:41jkenI was thinking that getting access to it woul be as simple as copying and modifying the getTexture proc in nim-assimps' assimp.nim, but GetTextureCount belongs to their material class
19:28:46jkens/c/cpp/
19:29:02jkenIs there an easy way to get access to the function from nim?
19:29:39FromGitter<eliezedeck> @jken c2nim?
19:30:16FromGitter<eliezedeck> AFAIK, I suppose it also works with C++
19:32:58ryukopostingremind me, can nimble be passed a git repo url to install from?
19:36:28Yardanicoyes
19:38:09ryukopostingperfect, my installer will just download and install nimble, then give it git tags to install components from
19:52:09supakeenIs it possible to fetch the compilers Nim version at runtime?
19:53:21supakeenFound it, I should search before I ask.
19:55:22dom96eliezedeck: interesting, possibly a bug. I think this happens because when you await the `promise` the `await` **sets** a callback, so the second time it is awaited the previous callback gets overwritten.
19:55:53dom96I could be wrong, but if not then we should change it to add a callback (i.e. `addCallback` vs. `callback=`)
19:58:35*moerm joined #nim
19:58:38moermo everyone
19:58:46moerm+hell
19:58:49supakeenHello.
19:59:54yumaikasheyo
20:01:10Yardanicois there any difference between using $ for cstring, or setLen(mystrvar, 0); add(mystrvar, mycstringvar)
20:01:14Yardanico?
20:01:18*opal joined #nim
20:02:00YardanicoI just needed to reimplement PHP's mysqli_fetch_assoc in Nim (it's actually just a few lines of code added to db_mysql, but I won't modify the original module ofc so I copied stuff I need from it)
20:02:51*Vladar joined #nim
20:11:39shashlick@ryukoposting what are you trying to do with compiler
20:12:04shashlickI'd recommend not using the compiler as a package, use $nim instead
20:13:00shashlickBut will help to understand what you want to do
20:14:52ryukopostingwhat do you mean by $nim
20:15:15ryukopostingI need to make an installer for all the tools needed to make games with my engine, it's nearing that point
20:16:09shashlickOk then why not just download the latest stable zip that has everything in it
20:16:39ryukopostingfair, just trying to find ways to make that whole thing easier to make
20:17:18shashlickI have some ideas around it
20:17:29shashlickDo you need the entire Nim or just a subset
20:17:39shashlickDo you care about install size
20:18:09ryukopostingcompared to competitors, this install should be very small
20:19:27ryukopostingusers will have to switch windows into developer mode, then the installer will install mingw64-gcc, nim, the SDL2 DLLs, libz DLLs, and nimble. then nimble will be responsible for installing the libz and sdl2 packages at a minimum
20:20:59shashlickNim already installs mingw if you want to leverage that
20:21:03FromDiscord<kaderallam> > <leorize> ah, then just make a ref, then `ref[] = what you wanna copy`
20:21:03FromDiscord<kaderallam> @gitterirc Thanks
20:21:33shashlickOf course I'm assuming that you've not already done all that
20:21:57*josch557 quit (Remote host closed the connection)
20:22:22*josch557 joined #nim
20:22:59moermMaybe a stupid question: Why not simply use lua? FreeBSD for example uses it too instead of the shell
20:32:45ryukopostingshashlick, does choosenim do that if you use it to do your first installation?
20:38:27*sentreen_ quit (Ping timeout: 265 seconds)
20:38:59moermHAHAHA I just discovered "VerifPal" a kind of crypto analyzer. The idio^H^H^H^H "professor" wrote it in *Go*! Hahaha
20:41:30supakeenmoerm: FreeBSD uses Lua instead of the shell? What do you mean.
20:42:22*pbb joined #nim
20:42:29ryukoposting I have a rant on my blog where I kind of tear into Go but it's really not that bad
20:44:33moermryukoposting I don't say that Go is bad. I say that re. security it is ridiculous(ly bad).
20:44:41ryukopostingis it?
20:44:52moermYes, definitely
20:45:18ryukopostinghuh, never heard anything about it. why's that?
20:45:22*tane quit (Read error: Connection reset by peer)
20:45:58PMunch@deech, yeah that link is for my planned library (currently confusingly also named genui). The idea was to have the user declare what they wanted to show/have the user be able to edit, and the UI should build itself based on that. So instead of saying things like I want an input box here with a callback that sets a variable on update, blah blah blah, you just go: hi I want to let the user edit this string variable and the library figures it out on
20:45:58PMunchits own.
20:46:14moermIn two words: Rob Pike (plus its weak typing and other factors)
20:46:18PMunchSo that file is not really meant to be used like the other genui macros
20:46:35*tane joined #nim
20:46:43ryukopostinga type system doesn't make a language have poor security
20:46:52ryukopostinga good type system can make a language have good security, sure
20:47:49moermSorry, I've had that discussion often enough and won't have it again. If you trust Go by all means use it for sensitive projects
20:48:32*PMunch quit (Quit: leaving)
20:49:04ryukopostingwell most of my professional work is C and ARM assembly so I guess I see security as being something that's not really the fault of the language, especially if that language is meant for a purpose where an overly sophisticated type system becomes a hindrance
20:49:27krux02what is the meaning of benign?
20:49:28ryukopostingI suppose you're right though, Go can't really use the C excuse.
20:50:04ryukopostingbenign? it means "not aggressive" or "gentle"
20:50:07moermHint: There are a few good static analyzers for C. For GO? Good luck ...
20:50:59yumaikasSo, does 1.2.0 not support certain versions of gcc?
20:51:00ryukopostingThose static analyzers are great until you try to use them on an embedded codebase and the freak out every time they see a write to a SFR
20:51:46moermkrux benign ~ no bad intentions, not negative. Ex: a benign tumor is supposed to not spread wildly and to not kill
20:51:56ryukopostingcause in code, every single one of those looks like you're dereferencing an integer value. Which is exactly what you're doing, but that's a valid behavior on a device with no MMU
20:52:58moermryukoposting Maybe you are talking about better linters?
20:54:06moermyumaikas ??
20:54:51yumaikasWell, I'm running on an older ubuntu, and when I try to build from source, it complains about missing a set of fuctions
20:55:11yumaikasI don't have a ton of into just yet
20:56:09moermyumaikas Hmm, interesting. Maybe Nim somehow really depends on min. C versions (possibly (almost) full C99)
20:57:19yumaikasPerhaps. 1.2.0 is not working, but 1.0.0 was working
20:58:58yumaikasI get a lot of errors to the effect of "undefined reference to `__builtin_ssubll_overflow"
20:59:58yumaikasThat happens when I use choosenim, or when I build 1.2.0 by hand
21:02:39FromDiscord<kaderallam> what is the best way to conver a uint32 for instance into a binary string / big endian
21:07:18shashlick@ryukoposting yes choosenim also does that
21:08:05moermyumaikas that sound really like too old a compiler version (more precisely too old a lib version and runtime)
21:08:34yumaikasmoerm: Hrm... I suppose. Nim 1.0.0 works fine, but 1.2.0 doesn't seem to
21:10:34dom96yumaikas, if it works on 1.0.0 and not on 1.2.0 then that's a regression, report it
21:11:36moermAh, dom96 is here (hello) - that's good, listen to him yumaikas. He is quite close to Nim devel.
21:12:08yumaikasdom96: Will do
21:12:35moermdom96 In case the Nim team gave up compatibility with GCC 4.x that would be understandable and reasonable to me
21:13:08FromGitter<timotheecour> @ yumaikas a quick code search woul’dve revealed the fix: -d:nimEmulateOverflowChecks
21:13:38dom96moerm, sure, it would also be great if the Nim team made that clear in the release notes :)
21:14:31moermdom96 If in doubt you are right and I'm wrong, no questions. But hey, the Nim teams is human and humans can forget something ...
21:14:46dom96heh, looks like it is mentioned in the release notes
21:14:53dom96search for __builtin_saddll_overflow in https://nim-lang.org/blog/2020/04/03/version-120-released.html
21:15:06dom96well done Nim team :)
21:15:53moerm*g
21:15:57yumaikastimotheecour: I suppose I could have done more looking into that, but it'd be nice if the compiler could detect some of that
21:16:24yumaikasAnd/or how to I feed that flag to choosenim?
21:17:40yumaikas(Since that's part of how nim is compiled)
21:17:47yumaikasOr, it is on my system
21:18:03FromGitter<timotheecour> can u try `nim c -d:nimEmulateOverflowChecks main` (ie, unrelated to choosenim)
21:18:19dom96If choosenim needs to compile Nim for you then you cannot pass that flag to it
21:18:48yumaikasdom96: It seems to need to?
21:19:16dom96Afraid it's not supported
21:19:40dom96if you try `choosenim devel` you might be able to get a nightly build
21:19:57dom96strange that we don't have this for stable releases...
21:20:00yumaikasOr, when I use "choosenim 1.2.0", it doesn't, but it seemed to when I used `choosenim stable`?
21:20:14moermyumaikas What's the newest clang/llvm version available on your old Ubuntu?
21:20:58moermyumaikas Plus: I'd bet that there is somewhere a repo providing more current GCC versions to old Ubuntu versions
21:21:21yumaikasmoerm: Not sure, I'm on 14.04 atm, I'm kinda overdue to rebuild my server
21:22:10moermyumaikas well, in the worst of cases you build (almost?) any GCC version by hand
21:22:20yumaikasYeah, fair enough
21:22:48dom96or just use nim 1.0.6, it's good enough
21:22:52moermBtw: Maybe you have the resources to simply create & use a VM with a newer Ubuntu version?
21:22:55yumaikasI have a build 1.2.0 from choosenim working now, so the -d:emulateOverflows should work.
21:23:24*Pixeye quit (Ping timeout: 265 seconds)
21:23:38yumaikasdom96: I'm needing some improvements to the to(JSONNode, type) function that seem to be in 1.2.0
21:24:25*tane quit (Quit: Leaving)
21:25:50moerm- afk -
21:26:08*NimBot joined #nim
21:28:01yumaikasmoerm: Yeah, in a little bit, I'll be building a new server with the newest Ubuntu LTS.
21:28:41FromGitter<timotheecour> @dom96 if choosenim can build, then choosenim should be able to take cmdline otions
21:29:02FromGitter<timotheecour> that would forward to nim as is
21:29:59*sirikon joined #nim
21:35:07FromGitter<timotheecour> => https://github.com/dom96/choosenim/issues/190
21:35:21*Vladar quit (Quit: Leaving)
21:35:46yumaikasI do have a question, tho: I've seen config files that set certain things? Is there a config I can use to always emulate overflow checks?
21:36:48FromGitter<timotheecour> same thing, add `-d:nimEmulateOverflowChecks` to your nims/cfg (see example of nims files for how to pass flags)
21:37:06dom96yeah, actually you may be able to do that without involving choosenim at all
21:37:15dom96AFAIK there is a global cfg file that Nim will read
21:37:42dom96that said, when compiling Nim you usually build C sources... which won't have the code that the -d flag enables
21:37:49dom96so you're screwed either way
21:38:03dom96Even choosenim passing flags cannot help you
21:38:04yumaikasdom96: Well, I have a working 1.2.0 binary atm
21:38:33yumaikasI'm just trying to figure out how to tell _it_ to use that flag all the time
21:44:02*disbot joined #nim
21:48:09disruptekZevv: you really cannot detune the radio? 'cause i don't see you in the tuner.
21:50:33*zyklon joined #nim
21:52:49*uvegbot quit (Ping timeout: 252 seconds)
21:52:57*sleepyqt_ quit (Read error: Connection reset by peer)
21:59:39*dddddd joined #nim
22:00:32*Zectbumo joined #nim
22:00:50moerm- back - and Hello disruptek
22:01:52yumaikaseyo
22:02:17yumaikasmoerm: I seem to have things working now, using the emulated overflow checks
22:04:00*liblq-dev quit (Quit: WeeChat 2.7.1)
22:06:09FromDiscord<KingDarBoja> Ufff almost finishing some translation from Python to nim, reaching 1000 lines x.x
22:06:42*natrys quit (Quit: natrys)
22:09:49moermyumaikas Nice. If I could be of help I'm glad ;)
22:10:23ryukopostingshashlick nice, that makes my life a lot easier
22:12:33shashlickYep
22:12:55shashlickAlternatively you can download the windows binary zip and run finish
22:13:07shashlickIt will setup mingw as well
22:13:26shashlickMight be simpler unless you want to support multiple Nim versions
22:15:23ryukopostingwill collect work with iterators?
22:24:49moerm-afk -
22:33:53*Trustable quit (Remote host closed the connection)
22:43:09FromDiscord<Varriount> timotheecour: What's the difference between emulated overflow checks and non-emulated overflow checks?
22:44:13FromGitter<timotheecour> perf
22:44:35FromDiscord<Varriount> Yeah, but what about from an implementation standpoint? What's the difference?
22:45:02FromGitter<timotheecour> emulated use FP mult for int ops, as done in python, which is 5X slower as i explained here https://github.com/nim-lang/RFCs/issues/199
22:45:04disbot2X-5X faster integer multiplication ; snippet at 12https://play.nim-lang.org/#ix=2gME
22:45:30FromGitter<timotheecour> also you can browse the code to discover this, nothing is hidden :)
22:52:56*josch557 quit (Quit: ERC (IRC client for Emacs 26.3))
23:07:23moermbye. have a good time everyone
23:07:28*moerm quit (Quit: Leaving)
23:09:57ryukopostingdom96, I realize there may be a mistake in my sample code I added to the SDL2 module
23:10:48ryukopostingI'll have to double check but I might have used normal alloc() to make a buffer that gets passed into the audio thread
23:11:50leorizewe should update our openssl requirement to 1.1 like everyone else then deprecate older protocols: https://github.com/nim-lang/Nim/issues/13884
23:11:51disbotSslProtVersion only supports TLS 1.0 and older. Add TLS 1.2 & TLS 1.3 since TLS 1.1 and older are deprecated.
23:12:05ryukopostingyes, it appears I did do that. not sure if queueAudio copies its buffer into the other thread safely. Probably better safe than sorry.
23:12:09leorizethis would break code, for good reason I guess :P or we can keep older enums and raise errors
23:17:52*lritter quit (Quit: Leaving)
23:28:49ryukopostingis it safe to assume that if I GC_ref a ref object, everything it references is implicitly GC_ref'd?
23:29:43leorizewdym?
23:29:45disrupteknope.
23:31:38ryukopostingwelp, the audio thread just crashed my demo game so it seems "no" is the answer
23:32:07leorizeuse arc :P
23:32:45ryukopostingit wouldn't help, unless arc somehow knows how to track references through a cast to pointer, and a run through SDL2 and back up into a function called by it
23:34:16FromDiscord<kaderallam> Guys simple question, how can i add an array[0..3, char] to a string or convert it to a string ?
23:35:10ryukopostingarr.mapIt(char it).join
23:35:28ryukopostingimport sequtils and strutils
23:35:47FromDiscord<kaderallam> thanks
23:35:48FromGitter<timotheecour> thats inefficient
23:35:55FromDiscord<kaderallam> seems heavy
23:36:02ryukopostingOH GOD OH NO 4 BYTES
23:36:13FromGitter<timotheecour> 3 could be N
23:36:28ryukopostingthat's not what he asked for, is it
23:36:42Yardanicovar mystr = newSeq(myarr.len); for i, x in myarr: mystr[i] = x
23:36:44Yardanicovery efficient :P
23:36:56Yardanicoor maybe you can just play with pointers to get even more efficient
23:37:05Yardanicoah sorry not newSeq but newString
23:38:14IWSnimwhile we're golfing, is there a more elegant way to construct a uint16 from two uint8s than this?
23:38:17IWSnim var word: uint16
23:38:18IWSnim?
23:38:21IWSnim word = cpu.mem.gameboy.readByte(address + 1)
23:38:23IWSnim word = word shl 8
23:38:26IWSnim word = bitor(word, cpu.mem.gameboy.readByte(address))
23:38:37IWSnimit works... but there's gotta be a better way?
23:38:55Yardanicoread two bytes instead?
23:39:03ryukopostingword = (b0 shl 8) or b1?
23:39:09Yardanicoword = cpu.mem.gameboy.readTwoBytes() :P
23:39:14IWSnim:P
23:39:32IWSnimit'd be the same inside that proc as well
23:39:33IWSnimunfortunately
23:39:50Yardanicowell but how can you make it the other way? you'll still have to call readByte twice anyway
23:40:10IWSnimJust wondering if there was a way around thie shift / or. Not a huge deal :)
23:40:16IWSnimjust making sure I din't miss some obvious builtin for it
23:40:24FromDiscord<Rika> i dont see any other way
23:40:33IWSnimThanks :)
23:41:27FromDiscord<kaderallam> anyway I did this, var tst = ""
23:41:27FromDiscord<kaderallam> var val:array[0..3, char] = extract_32(2001)
23:41:27FromDiscord<kaderallam> for c in val:
23:41:27FromDiscord<kaderallam> tst.add c
23:41:27FromDiscord<kaderallam> but find it inefficient, there must be a better way
23:41:50wgetchwhats a good way to convert an array of bytes (in utf8 encoding) to a string?
23:41:52leorizeit's as efficient as it could be tbh
23:42:01Yardanicowgetch: nim string is just an array of bytes basically
23:42:11Yardanicoso you don't have to do any conversion at all
23:42:17leorizewe can go the nice way or the not nice way :P
23:42:18Yardanicoand nim strings are utf8-encoded
23:42:21ryukopostingI think this is the 5th time someone has asked that in under 24 hours
23:42:21FromDiscord<kaderallam> to a binary string not utf8 i am building a protocol encoder
23:42:33Yardanicoit'll work the same won't it?
23:42:44ryukopostingwgetch, how obtuse of an answer do you want
23:42:56wgetchlol
23:43:03Yardaniconim strings are just bytes, they don't HAVE to be utf8-correct
23:43:05wgetchwell give me a second, need to parse the situation
23:43:08leorize@kaderallam: I'd recommend working with seq[byte] or openArray[byte] for working with binary protocols
23:43:15ryukopostingwe're golfing our way from pretty one liners all the way to the nastiest super-optimized stuff you'll ever see
23:43:23wgetchI'm using binaryparse.nim, but the strings are not NUL terminated
23:43:33wgetchso I can't use the parser's string type
23:43:37FromDiscord<kaderallam> thanks @leorize will look into it
23:43:42wgetchinstead, I just ask for an array of u8's
23:43:50ryukopostingclever
23:44:06*krux02_ joined #nim
23:44:26wgetchbut now I am not sure how to convert to string. looked at unicode module but nothing is standing out
23:44:41leorizeyou got a seq[uint8]?
23:44:46wgetchyep!
23:44:54ryukoposting(testing whether my GC_refs are keeping the audio engine from exploding is awful. I'm sitting here listening to the same 2:30 WAV on repeat)
23:45:03leorizewgetch: are you new to Nim?
23:45:12wgetchvery new!
23:45:50ryukopostingwgetch: yourseq.mapIt(char it).join is the way I like to do it if lightning-fast performance isn't a concern
23:46:29ryukopostingit's slow, but easy to read
23:46:47*krux02 quit (Ping timeout: 260 seconds)
23:46:50leorizewgetch: https://play.nim-lang.org/#ix=2gMV
23:46:58ryukoposting(update: the wav is on its 4th loop. I am slowly losing my mind but I think I finally put GC_refs in all the right spots)
23:47:11leorizeyou can also turn this into a nice proc for usage :)
23:47:22Yardanicoyeah, and that's already efficient :)
23:47:37wgetchlegit, thank you!
23:48:11*cjb joined #nim
23:48:14leorizethis is the kind of operations that we might want in the stdlib :P
23:48:44ryukopostingthose who play video games: how much RAM is an acceptable amount of RAM for a game to use
23:50:03leorizeif AAA, I'd expect 8gb
23:50:11ryukopostingthis is a visual novel
23:50:13FromDiscord<Rika> as much ram as i have free 😛
23:50:13leorizeif not, 500meg is my limit :P
23:50:29wgetchso far I am liking how nim handles unicode strings. kinda surprised that mapIt(char it) works so well :P
23:50:29ryukopostingwell, it's idling at 800 right now
23:50:49FromDiscord<Rika> 800 sounds pretty chonky for a vn
23:50:53ryukopostinggranted, that's with asinine caching systems that I was going to replace later anyway
23:51:28ryukopostingIt loads every image it can ASAP then keeps them there forever lmao
23:51:53leorizewgetch: our strings don't care about encoding
23:51:57leorizewe aren't python :P
23:52:04FromDiscord<Rika> nor rust
23:52:15FromDiscord<Rika> afaik rust requires valid utf8 too 😛
23:52:41ryukopostingthis week on "encoding-agnostic strings: convenient or harmful?"
23:53:01FromDiscord<Rika> convenient, dont see how its harmful
23:53:07leorizeadd "by default" into the thing
23:53:13leorizethen you'll get a proper answer :P
23:53:41ryukopostingI refuse to acknowledge the existence of UTF-16
23:53:55FromDiscord<Rika> well, thats fine
23:54:10FromDiscord<Rika> you must acknowledge shiftjis though : ) ) ) ) )
23:54:17wgetchits all fun and games until your database has screwed up by 8 different encodings used at one time or another
23:54:18FromDiscord<Rika> *sobs*
23:54:30ryukoposting: ) ) ) ) ) is what UTF-16 nerds' smiley faces look like
23:54:35FromDiscord<Rika> hey if you do that then thats your fault lmao
23:54:40ryukopostingthey think they're :)))), they're wrong
23:55:23ryukopostingIt's all fun and games until powershell's print-to-file directive "helps" by converting everything passing through it to UTF-16
23:55:35FromDiscord<clyybber> hahaha
23:55:47*Jesin quit (Quit: Leaving)
23:56:11wgetchor its the fault of the developer who thought "I really need emojis, lets just change this column to SQL_ASCII"
23:56:12ryukopostingthat actually happened, wasted so many hours trying to figure out why stuff I was sending to a mac using a ps script was getting corrupted
23:56:43wgetchand also yeah, can confirm about powershell
23:57:12wgetchlike if you do that uh, -encodedCommand thing
23:57:20wgetchit expects base64 encoded UTF16 iirc
23:58:46wgetchwith powershell, encoding is kinda like USB. doesnt fit one way, you turn it upside down, still doesnt fit.
23:58:57leorize[m]is there anything on windows that is not expecting utf-16? :p
23:59:50ryukopostingUTF-16 is microsoft's "standard"