<< 08-03-2020 >>

00:00:01*junland quit (Quit: %ZNC Disconnected%)
00:00:05shashlickNote that wrappers are cached so you need to run with -f to regenerate
00:00:40FromDiscord<mfiano> Does Nim have a function to get the sign of a number? Other languages I've used usually call this `sign` or `signum` and return -1, 0, or 1 depending on the sign
00:00:47*junland joined #nim
00:01:14leorizemfiano: but why would you need that? :P
00:01:31leorizejust compare with 0 should work, no?
00:01:34FromDiscord<mfiano> It's useful for mathematical calculations, which is why it is present in a lot of languages :p
00:01:47leorizeuse `cmp` with 0
00:01:53leorizeit will give you the exact thing :P
00:02:23leorizehttps://nim-lang.github.io/Nim/system#cmp%2CT%2CT
00:04:44lqdev[m]shashlick: yes, but `nim check` does not
00:04:52lqdev[m]and that's probably the source of the problem
00:07:21shashlickOk I'll try with cDebug to verify
00:07:31shashlickWhat version of Nim
00:08:00lqdev[m]1.0.6
00:08:44clyybberOr anyone for that matter: Do you want to see `Hint: [Link]` by default?
00:09:05clyybberlqdev[m], leorize, shashlick ^
00:10:01lqdev[m]I don't mind it, I think it's useful to tell when linking actually starts
00:10:42lqdev[m]because when using `-d:release --passC:-flto` linking can take a while and being able to tell when it starts gives you a more granular overview of the compilation progress
00:10:59clyybberSame here
00:11:54clyybberlqdev[m]: So you think there is a place for showing `Hint: [Link]` without showing the actual linking command?
00:12:14lqdev[m]yeah
00:12:19clyybberOk
00:12:21clyybberThanks
00:12:50lqdev[m]any sort of progress reporting is useful, no matter how shitty or good
00:15:49lqdev[m]what's the difference between `stdout.writeLine` and `echo`?
00:17:02lqdev[m]for some reason output from `echo` shows up fine on my polybar while output from `stdout.writeLine` does not.
00:20:10leorizelqdev[m]: echo flushes stdout after writing
00:23:00*nsf quit (Quit: WeeChat 2.7)
00:23:04lqdev[m]but sending a newline should flush too, no?
00:23:32krux02no
00:27:26krux02lqdev: a stream does only flush for certain, if you call `flush` explicitly on it. But a stream may flush at any time.
00:30:18lqdev[m]right
00:36:23*jholland__ quit (Quit: Connection closed for inactivity)
00:48:23*abm quit (Read error: Connection reset by peer)
00:50:59*watzon joined #nim
00:51:41watzonHelloooo
00:51:47FromDiscord<Elegant Beef> No you
00:51:56watzonBeen a while since I've irc'd
00:54:10FromDiscord<Elegant Beef> same, like my entire life
00:55:46*federico3 quit (Remote host closed the connection)
00:56:55*federico3 joined #nim
00:59:36shashlickWelcome
01:01:14*watzon quit (Ping timeout: 240 seconds)
01:02:50*watzon joined #nim
01:06:58shashlicklqdev: I tried again with device and it still worked for me
01:07:02shashlicknto sure what's going on
01:07:07*zama quit (Ping timeout: 240 seconds)
01:08:14*zama joined #nim
01:14:46*watzon quit (Quit: leaving)
01:16:12*watzon joined #nim
01:24:34*clyybber quit (Quit: WeeChat 2.7.1)
01:45:10FromDiscord<Rika> is there a counterpart to `isprint` in the stdlib
01:45:22*dwdv quit (Ping timeout: 265 seconds)
01:55:55*dev0urer joined #nim
02:15:25*Hideki_ joined #nim
02:16:01leorize@Rika: not isprint()? :P
02:16:37FromDiscord<The Nerd> Hiiiii everyone! I was wanting to ask can nim be used to make file unpacking programs?
02:17:01FromDiscord<Elegant Beef> Yes
02:17:12FromDiscord<The Nerd> Yay thank you
02:17:54FromDiscord<The Nerd> I am trying to learn a language to make programs to unpack files from game files to make mods and nim was something i saw that was general purpose.
02:18:57*krux02 quit (Remote host closed the connection)
02:19:16FromDiscord<Elegant Beef> I mean you're going to have to manually do it all but it *can*
02:20:15FromDiscord<The Nerd> I thought so. I don't mind doing it manually i just needed to know if nim on it's own without other languages can do it >.<
02:20:28FromDiscord<Elegant Beef> Hell python can do it
02:20:49FromDiscord<Elegant Beef> It's just byte/bit level logic
02:21:26FromDiscord<The Nerd> I bet python can haha i just want to learn languages that are different than what most people use
02:22:28FromDiscord<Elegant Beef> I mean nim can easily rely on C/C++ libs so it's quite nice
02:23:43*dev0urer quit (Quit: ZNC 1.6.5+deb1+deb9u2 - http://znc.in)
02:23:55*dev0urer joined #nim
02:30:26FromDiscord<Rika> leorize: i'm trying not to use c imported functions on nim
02:30:38FromDiscord<Rika> just for the sake of it really, no actual reason
02:47:10FromDiscord<exelotl> About unpacking game assets, I did much of the tooling for a fan translation of a DS game in Nim
02:50:59FromDiscord<The Nerd> Woah really?!
02:51:08FromDiscord<The Nerd> That is so cool 😍
02:54:11*chemist69 quit (Ping timeout: 272 seconds)
02:55:19disruptekclyybber: seems like you guys worked it out.
02:55:44disruptekleorize: what part of the radio doesn't work? i'm about to look at it.
02:56:03*chemist69 joined #nim
02:57:26*Hotbees quit (Ping timeout: 240 seconds)
02:58:57FromDiscord<Rika> is taint mode slated for removal? i havent been following news about it
02:59:08*Hotbees joined #nim
02:59:09FromDiscord<exelotl> the actual unpacking/repacking of the ROM filesystem was done with an existing tool, but all the code to convert between raw image/palette data and PNG was done in Nim
02:59:27FromDiscord<exelotl> I'm working on publishing some of that code as a library now, but documentation is a lot of work. xD
03:01:01FromDiscord<The Nerd> Can nim do it without a existing tool though?
03:01:06disruptekof course.
03:01:49FromDiscord<The Nerd> I see then the existing tool was just to speed up the process?
03:02:41leorizewell yea
03:02:47leorizewhy rewrite something when it already works
03:03:07FromDiscord<The Nerd> That is true
03:03:34FromDiscord<The Nerd> For me i like making my own stuff
03:04:10FromDiscord<exelotl> yeah, it was written years ago and I didn't know the filesystem format myself, and it was usable as a command line utility, so I could just invoke it from nim by calling `execCmd`
03:04:24disruptek~stream
03:04:25disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
03:05:50FromDiscord<Rika> i kinda want to stream too
03:05:57disruptekyou should.
03:05:58FromDiscord<Rika> but i dont know what setup is ok
03:06:06disruptekdoesn't matter.
03:06:10FromDiscord<Rika> and what songs i can play w/o getting banned on twitch
03:06:13disruptekwe can test it and help you tweak it.
03:07:06disrupteki do spend a fair amount of time on it.
03:07:09disruptekbut, it's paying off.
03:07:33FromDiscord<Rika> holy wow obs does not like linux
03:07:40disruptekwhat's broken in the radio, leorize?
03:08:19FromDiscord<clyybber> damnit why is it 4 pm here
03:08:23leorizelast time I tried to !tune it doesn't do anything?
03:08:27FromDiscord<clyybber> gn8 peeps
03:08:37disruptekcya clyybber
03:08:40FromDiscord<clyybber> *4am
03:08:52disruptekdoesn't do anything?
03:09:05leorizeit said okay!
03:09:08disruptekokay...
03:09:09leorizebut then I don't see any changes :P
03:09:19disruptekwhat changes did you expect to see?
03:09:19leorizenor I know what it actually do
03:09:34disruptekwhat do you want it to do?
03:12:40*muffindrake quit (Ping timeout: 256 seconds)
03:14:56*muffindrake joined #nim
03:15:30disruptekdo we have any pango translations in nim?
03:15:37disrupteklike simple markup shit?
03:19:19*Hideki_ quit (Ping timeout: 255 seconds)
03:23:04*dev0urer quit (Quit: ZNC 1.6.5+deb1+deb9u2 - http://znc.in)
03:23:18*dev0urer joined #nim
03:23:40*Guest60452 quit (Ping timeout: 256 seconds)
03:25:21*dadada joined #nim
03:25:44*dadada is now known as Guest53420
03:34:34*aeverr quit (Quit: Konversation terminated!)
03:44:14*dev0urer quit (Quit: ZNC 1.6.5+deb1+deb9u2 - http://znc.in)
03:48:12*dev0urer joined #nim
03:48:25*dev0urer quit (Client Quit)
03:53:52*dev0urer joined #nim
03:57:40*dev0urer quit (Client Quit)
03:57:56*dev0urer joined #nim
04:04:19FromDiscord<Rika> disruptek, did your stream die or did you stop it?
04:04:32disruptekfalling asleep here.
04:04:44*dev0urer quit (Quit: ZNC 1.6.5+deb1+deb9u2 - http://znc.in)
04:05:08disruptekyou gotta speak up if you're watching. just tumbleweeds rollin' through the chat.
04:05:25FromDiscord<Rika> aint signed in on my browser
04:06:04disruptekah, i keep forgetting that that's a thing.
04:06:29disrupteki need a better way to see if there are viewers, i guess.
04:08:21*dev0urer joined #nim
04:09:12*dev0urer quit (Client Quit)
04:09:25*dev0urer joined #nim
04:12:47*dev0urer quit (Client Quit)
04:13:44FromDiscord<Rika> i'll try streaming some time, maybe even today
04:13:56FromDiscord<mfiano> Is there a function to get the fractional part of a float, or should i use `x - floor(x)`?
04:14:24FromDiscord<Rika> dont think there is
04:14:59disruptekrika: what time is it?
04:15:17FromDiscord<Rika> for me? quarter past twelve
04:15:24FromDiscord<Rika> noon
04:15:33disruptekwhere are you?
04:16:01FromDiscord<Rika> uh asia
04:16:06FromDiscord<Rika> southeast asia
04:16:08disruptekbig place.
04:16:45FromDiscord<Rika> need it more specific? philippines
04:16:58disruptekah, neat.
04:19:15*dev0urer joined #nim
04:20:09disrupteki think streaming is good advertising, but it's much harder than i anticipated.
04:20:17disruptekstill, it's totally worth doing.
04:20:18*dev0urer quit (Client Quit)
04:20:46*dev0urer joined #nim
04:22:02*dev0urer quit (Client Quit)
04:22:13*dev0urer joined #nim
04:23:08FromDiscord<Elegant Beef> @mfiano well it's slightly weird but
04:23:08FromDiscord<Elegant Beef> https://nim-lang.org/docs/math.html#splitDecimal%2CT
04:23:49FromDiscord<Elegant Beef> seems `modf(1)` might work too
04:27:22FromDiscord<exelotl> Wow it makes me really happy that Nim defines tau
04:27:31FromDiscord<Elegant Beef> best language alive
04:27:34FromDiscord<Elegant Beef> tau > pi
04:27:36FromDiscord<Elegant Beef> dont at me
04:27:45FromDiscord<Elegant Beef> Both mathematically and actually
04:28:27FromDiscord<exelotl> "tau is better than pi because it's bigger"
04:28:34FromDiscord<exelotl> galaxy brain take
04:29:05FromDiscord<Elegant Beef> Well not tau is better than pi cause when talking radians the fraction of tau represents the fractional part of a circle not a half circle
04:29:12FromDiscord<Elegant Beef> no tau*
04:29:48FromDiscord<Elegant Beef> 45 degrees is pi/4 which is tau/8 and 360/8
04:30:13FromDiscord<Elegant Beef> Actually better 😄
04:30:21FromDiscord<exelotl> Yeah but my argument is funnier :P
04:31:03FromDiscord<Elegant Beef> True
04:38:41*enthus1ast quit (Ping timeout: 272 seconds)
04:42:24disruptekrika: if you start streaming, i can move viewers to your channel when i sign off.
04:43:07FromDiscord<Rika> https://www.youtube.com/channel/UCnayKtaS2iWkRIyZBZzb4Kw/videos
04:43:07FromDiscord<Rika>
04:43:07FromDiscord<Rika> EXCEPT I'M ON YOUTUBE
04:43:20FromDiscord<Rika> well
04:43:33FromDiscord<Rika> maybe ill just use the twitch, but the name on my twitch is leetified
04:44:02FromDiscord<Rika> ill just use twitch
04:44:07disruptekyeah, we're all on twitch.
04:44:11*dev0urer quit (Quit: ZNC 1.6.5+deb1+deb9u2 - http://znc.in)
04:47:16FromDiscord<Rika> ok ill try today
04:52:17*enthus1ast joined #nim
04:52:55FromDiscord<The Nerd> anybody had the issue of visual studio code not assigning the new files as nim when doing a new file? i have it set to do it but i keep having to manually switch to nim at the bottom
04:52:56*dev0urer joined #nim
04:55:08FromDiscord<Rika> is it saved as .nim
04:55:16FromDiscord<Rika> entering filename will not add .nim afaik
04:56:13FromDiscord<The Nerd> dang okay well the only other issue i am having is even with nim in my variables i still cant auto open nim files
04:56:24FromDiscord<The Nerd> have to right click them
04:57:39FromDiscord<mfiano> Is there a way to define a bunch of named parameters and default values that have the same type, without duplicating the type?
04:58:26FromDiscord<Rika> idts w/ default values
04:58:31FromDiscord<Rika> all parameters are "nameable"
04:58:38FromDiscord<mfiano> idts?
04:58:41FromDiscord<Rika> i dont think so
05:00:54FromDiscord<mfiano> I mean I could do `(min, max: float32)`, but I can't do `(min = 0.0, max = 1.0: float32)`, but instead `(min: float32 = 0.0, max: float32: 1.0)` unfortunately. Was just trying to be concise.
05:01:15FromDiscord<Rika> yeah
05:01:41FromDiscord<Rika> i mean you can min = 0.0f32
05:01:50FromDiscord<mfiano> A lot of areas sacrifice concision where I'm used to it, but still liking this language so far
05:02:57FromDiscord<Rika> https://www.twitch.tv/d30d3x
05:03:00FromDiscord<Rika> trying it out now
05:06:50*dev0urer quit (Quit: ZNC 1.6.5+deb1+deb9u2 - http://znc.in)
05:06:59*dev0urer joined #nim
05:06:59*dev0urer quit (Client Quit)
05:07:29*dev0urer joined #nim
05:10:07*dev0urer quit (Client Quit)
05:10:34*dev0urer joined #nim
05:10:51FromDiscord<mfiano> What's the way to get the least negative or most positive float for one of the float types?
05:11:06FromDiscord<mfiano> I want to use them as a default for a named parameter
05:11:13leorizeNegInf, Inf :P
05:11:17*dev0urer quit (Client Quit)
05:11:28leorizeyou can just use NaN
05:11:38*dev0urer joined #nim
05:11:41FromDiscord<mfiano> Well, negative infinity and positive infinity are distinct values different than the minimum or maximum as defined by IEEE 754
05:12:38FromDiscord<Rika> you didnt specify that you wanted values from the IEEE754
05:15:17*watzon quit (Quit: WeeChat 2.7.1)
05:17:10FromDiscord<mfiano> True, though infinity is inherently boundless and doesn't fit the criteria of "least" or "most".
05:17:11*watzon joined #nim
05:21:16*dev0urer quit (Quit: ZNC 1.6.5+deb1+deb9u2 - http://znc.in)
05:22:19FromDiscord<The Nerd> hmmm is there a command that keeps the cmd that pops up from a exe open until it closes in nim? i created a exe for the hello world but opening it just flashes then closes within seconds
05:22:39FromDiscord<The Nerd> hmmm is there a command that keeps the cmd that pops up from a exe open until you close it? i created a exe for the hello world but opening it just flashes then closes within seconds
05:24:08*enthus1ast quit (Ping timeout: 256 seconds)
05:25:48yumaikasAre you on windows?
05:26:17yumaikasIf so, reading a line from stdin _should_ hold open the window
05:26:24shashlickRun it on the command line
05:26:40shashlickAlso check cmd /k
05:28:02FromDiscord<The Nerd> i am on windows
05:29:46FromDiscord<The Nerd> i can run it in cmd and it wont close but like clicking the exe of my new hello world causes that problem. so far my code is just echo "hello world"
05:29:59FromDiscord<The Nerd> i am probably missing more stuff to it
05:30:38yumaikasTry adding stdin.readline()
05:32:14FromDiscord<mfiano> Well I got half of the answer. `minimumPositiveValue`/`maximumPositiveValue` in fenv. Too bad there isn't symmetrical negative variants.
05:32:28FromDiscord<The Nerd> hmm
05:32:28FromDiscord<The Nerd> https://cdn.discordapp.com/attachments/371759389889003532/686083895522885684/rgsg.PNG
05:33:14FromDiscord<Rika> use `discard stdin.readline()`
05:33:43FromDiscord<Rika> in nim, when something returns a value and you dont use it, add a `discard` before it
05:35:15FromDiscord<The Nerd> ah that makes a lot more sense
05:35:46FromDiscord<The Nerd> in c sharp they had a command you added i think it was io(read) or something so it felt weird that the exe didnt stay open
05:36:05yumaikasConsole.ReadLine(), iirc
05:36:13FromDiscord<The Nerd> my bad
05:36:16yumaikasAt least in C#
05:36:33yumaikasNo worries, I've been writing C# for almost a decade
05:36:37FromDiscord<The Nerd> yeah that looks like it. my memory is off
05:36:42FromDiscord<The Nerd> a decade ?
05:36:59yumaikasNot quite, but since 2011 or so
05:37:10*avsej quit (Ping timeout: 256 seconds)
05:37:13FromDiscord<The Nerd> geez i want that kind of experience. thank you everyone for the help
05:37:21yumaikasIt was the first language I did professionally
05:37:43FromDiscord<The Nerd> now i know how to build a exe using git bash
05:38:00FromDiscord<The Nerd> can cmd do the same or do i really need git bash?
05:38:10FromDiscord<Rika> uh
05:38:17FromDiscord<Rika> git bash isnt the same thing as WSL
05:38:41FromDiscord<Rika> you can compile exes in cmd
05:38:47yumaikasThe Nerd: If you're actively learning and diving deeper into things, and build a portfolio, you can get a _lot_ under your belt in a couple years
05:39:05FromDiscord<The Nerd> true and what was wsl again?
05:39:13*enthus1ast joined #nim
05:39:19FromDiscord<The Nerd> the tutorial i am following uses git bash oddly
05:39:22FromDiscord<Rika> windows subsystem for linux
05:39:24FromDiscord<Rika> huh
05:39:28FromDiscord<Rika> cmd is just fine
05:39:40yumaikasAnything Nim specific that works in git bash should work in cms
05:39:46yumaikas*cmd
05:40:04yumaikasI've certainly used cmd and/or PowerShell for building Nim
05:40:16FromDiscord<The Nerd> hmm let me try
05:40:26yumaikas(Nim is my tool of choice for making cmd less of a pain atm)
05:40:32FromDiscord<The Nerd> ahh okay yeah i feel dumb
05:40:43FromDiscord<Rika> you have nim already installed?
05:41:36FromDiscord<The Nerd> i do
05:41:54FromDiscord<The Nerd> problem is getting the nim files to open automatically
05:42:06yumaikasHow do you mean?
05:42:22yumaikasEditing Nim files, or executables built by Nim?
05:43:09FromDiscord<The Nerd> editing nim files. like double clicking a nim file won't open it
05:43:20FromDiscord<The Nerd> it just brings up a menu of what to open it with
05:43:37FromDiscord<Rika> set a program as default for opening .nim files
05:43:50yumaikasThen use that menu to pick your editor of choice, and tick the "set as default" box
05:44:41FromDiscord<The Nerd> oh for some reason i thought it was suppose to auto open without me setting it
05:44:54FromDiscord<Rika> if you dont see a checkbox do this:
05:45:03FromDiscord<The Nerd> i like visual studio code but i hear atom is good
05:45:14FromDiscord<Rika> right click the file, press "Open with...", then click the bottom most entry in the menu
05:45:28FromDiscord<Rika> vscode imo is the best for nim
05:45:36FromDiscord<Rika> best supported at least
05:45:44yumaikasVS Code is really good for Nim on Windows, IME. I haven't tried atom
05:45:59FromDiscord<The Nerd> i will stick with vs code then
05:46:19FromDiscord<Rika> in my epenien?
05:46:53FromDiscord<Rika> dont forget to install the nim extension, if you haven't @The Nerd
05:46:59FromDiscord<The Nerd> i have
05:47:13FromDiscord<The Nerd> interesting, i can make nim files with notepad++
05:47:25FromDiscord<Rika> you can make nim files with notepad.
05:48:48FromDiscord<The Nerd> i feel like a kid walking into a new toy store. so much stuff to see and learn
05:49:12FromDiscord<Rika> thats good, i think
05:50:01FromDiscord<The Nerd> that was my attempt to make yall laugh xd i am basically saying i have a lot to learn
05:52:11FromDiscord<The Nerd> how long has everyone been programming with nim?
05:53:08yumaikasSince about a week after it went 1.0
05:53:37FromDiscord<Rika> since 0.20, but i discovered it when it was still at 0.18
05:54:31yumaikasI found it like... 4 years ago? But didn't jump on it then, because I was in a Golang phase
05:54:32FromDiscord<Rika> does os.setFilePermissions obey umask?
06:01:13*silvernode joined #nim
06:01:35*Zectbumo joined #nim
06:05:13FromDiscord<The Nerd> hmm cmd definitely lacks some commands git bash does
06:06:09yumaikasThat it does
06:06:14FromDiscord<Rika> it definitely does
06:06:20yumaikasOn the plus side, it's a lot less laggy
06:06:21FromDiscord<Rika> btw, ls -> dir
06:06:41FromDiscord<Rika> i use powershell as it has aliases for unix-style commands
06:06:56yumaikasIf you can patch in your favorite missing bits (I have a repo called dirx that is a halfway decent drop-in for a basic ls)
06:07:13yumaikashttps://github.com/yumaikas/dirx
06:07:33FromDiscord<Rika> ohhh idea
06:07:38FromDiscord<mfiano> What would be a way to define an infix operator that takes an additional argument? I'd like to define a `~` operator that compares if 2 objects are approximately equal given some tolerance.
06:07:38FromDiscord<Rika> lftp clone for windows
06:07:47FromDiscord<Rika> god that will take at least a few months
06:07:54FromDiscord<Rika> i have a feeling that lftp is massive
06:08:06FromDiscord<Rika> @mfiano with a default
06:08:22yumaikasLftp?
06:08:24FromDiscord<Rika> i made an `~=` operator if you wanna see how it looks like
06:08:35FromDiscord<Rika> yumaikas the ftp cli program i use
06:08:46FromDiscord<mfiano> @Rika Sure. I'm just trying to picture how the callsite would even look if I want to override the default.
06:09:08FromDiscord<Rika> ah
06:09:34FromDiscord<Rika> that's gonna look like \`~`(operand1, operand2, newDefaultValueForEpsilon)
06:09:40FromDiscord<Rika> yeah it's a pain
06:09:54FromDiscord<mfiano> I see. Can I see your impl?
06:10:24yumaikasFtp anything seems like it'd take a while to get done..... I mean, the fundamentals are there, you have sockets available, and ftp and sftp should be well documented
06:13:42FromDiscord<Rika> https://play.nim-lang.org/#ix=2dIs
06:13:46FromDiscord<Rika> @mfiano ^
06:17:09FromDiscord<mfiano> Interesting. I'm gonna have to read that reference. In some other codes of mine I'm porting, it is essentially `abs(x - y) < tolerance`
06:18:47FromDiscord<Rika> the reference says why not to use absolute difference
06:19:01FromDiscord<Rika> i already converted the source code on the reference so yeah
06:19:24FromDiscord<Rika> hmm i think its still kinda wrong
06:19:27FromDiscord<Rika> one moment
06:20:56FromDiscord<Rika> nvm i'm mistaken it's correct
06:24:17*hax-scramper quit (Read error: Connection reset by peer)
06:24:33*hax-scramper joined #nim
06:24:59FromDiscord<mfiano> Great, thanks
06:25:25*silvernode quit (Ping timeout: 258 seconds)
06:30:26*chemist69 quit (Ping timeout: 256 seconds)
06:31:34*chemist69 joined #nim
06:32:42*silvernode joined #nim
06:33:16*hax-scramper quit (Ping timeout: 255 seconds)
06:33:56*hax-scramper joined #nim
06:39:17*silvernode quit (Read error: Connection reset by peer)
06:43:06FromDiscord<Rika> lmao tested my linenoise port and it broke down literally immediately
06:47:53*silvernode joined #nim
06:53:01*silvernode quit (Ping timeout: 258 seconds)
06:55:22*watzon0 joined #nim
06:55:22*watzon0 quit (Read error: Connection reset by peer)
06:55:23*watzon quit (Quit: WeeChat 2.7.1)
06:56:20*solitudesf joined #nim
06:57:54*rmt joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:01:26rmtGood morning. I'm trying to copy the first N bytes of an UncheckedArray[uint8] to a sequence (or anything else that is a safe copy, as the UncheckedArray is a C buffer). What's the proper way to go about this?
07:01:58*watzon joined #nim
07:04:23rmtI can do for loop and assign byte for byte...
07:04:33*gmpreussner joined #nim
07:16:02*watzon quit (Quit: The Lounge - https://thelounge.chat)
07:16:12*watzon joined #nim
07:16:20*Hideki_ joined #nim
07:21:00*Hideki_ quit (Ping timeout: 258 seconds)
07:21:34*watzon quit (Quit: The Lounge - https://thelounge.chat)
07:24:29leorizermt: there's also copyMem
07:25:09leorizethough the safest way would be to loop
07:26:11leorizehttps://play.nim-lang.org/#ix=2dIx
07:26:15leorize^ that's the copymem way
07:29:34*watzon joined #nim
07:38:03rmtOk. Then I could probably use copyMem and avoid casting to UncheckedArray, if I don't need to peek first.
07:38:11rmtThanks
08:10:44*NimBot joined #nim
08:24:21*letto joined #nim
08:25:05*letto_ quit (Ping timeout: 265 seconds)
08:28:33*nsf joined #nim
08:29:19*circ-user-AGfif joined #nim
08:33:01FromDiscord<Recruit_main70007> does nim have `asm()`?
08:35:15watzonDoes indeed, I've been using it a lot
08:35:40FromDiscord<Recruit_main70007> cool
08:36:18watzonhttp://nim-lang.github.io/Nim/manual.html#statements-and-expressions-assembler-statement
08:48:36*narimiran joined #nim
09:02:09*jwm224 quit (Ping timeout: 272 seconds)
09:18:36*letto quit (Quit: Konversation terminated!)
09:19:39*solitudesf quit (Ping timeout: 240 seconds)
09:25:41*letto joined #nim
09:53:32*rmt quit (Ping timeout: 265 seconds)
09:55:31*rmt joined #nim
10:05:07*rmt quit (Ping timeout: 260 seconds)
10:11:14*dwdv joined #nim
10:37:25*lritter joined #nim
10:45:17*krux02 joined #nim
10:47:46krux02Araq: where does iterator inlining take place?
10:47:53krux02in the compiler source code?
10:56:10*Zectbumo quit (Remote host closed the connection)
10:57:21FromDiscord<mfiano> How do I tell `nim c` or `nimble build`/`nimble run` to place compiled code in a dedicated directory rather than next to the source files?
10:59:20*azed joined #nim
11:00:48krux02mfiano with -o outputfile
11:01:42*mfiano left #nim ("WeeChat 2.6")
11:02:11FromDiscord<mfiano> What about package wide?
11:05:13lqdev[m]what do you mean?
11:06:05FromDiscord<mfiano> I have a binary for every source file next to it after i compile a project
11:06:06FromDiscord<Rika> do it for the whole package? define a nims file
11:06:11FromGitter<mratsim> there is a new option --outdir as well
11:06:24FromGitter<mratsim> for package wide use nim.cfg
11:06:29FromDiscord<mfiano> I tried ``--outdir`. must not be doing something right
11:06:36FromGitter<mratsim> or use a nimble task
11:06:58FromGitter<mratsim> --outdir:build works for me
11:07:11FromGitter<mratsim> are you usijg 1.0.x or devel?
11:07:36FromDiscord<mfiano> 1.0.6
11:23:39*circ-user-AGfif quit (Ping timeout: 240 seconds)
11:38:01*circ-user-AGfif joined #nim
12:05:32*sekao joined #nim
12:06:16*theelous3 joined #nim
12:06:50*Hideki_ joined #nim
12:23:37*sekao quit (Remote host closed the connection)
12:30:45FromGitter<sheerluck> Yardanico: https://github.com/Yardanico/nim-emojify/pull/1/files
12:30:46disbot🤔
12:32:03FromDiscord<Rika> ._.
12:43:23*circ-user-AGfif quit (Ping timeout: 258 seconds)
12:44:20*circ-user-AGfif joined #nim
13:02:48*circ-user-AGfif quit (Ping timeout: 256 seconds)
13:06:07*xet7 quit (Quit: Leaving)
13:10:20*xet7 joined #nim
13:18:37*Hideki_ quit (Remote host closed the connection)
13:19:13*xet7 quit (Remote host closed the connection)
13:22:36*Hideki_ joined #nim
13:24:01*circ-user-AGfif joined #nim
13:24:33*Kaivo joined #nim
13:28:59*jwm224 joined #nim
13:44:05*azed quit (Quit: WeeChat 2.7.1)
13:44:46*Hideki_ quit (Remote host closed the connection)
13:45:34*Hideki_ joined #nim
13:49:39*Hideki_ quit (Ping timeout: 240 seconds)
13:50:59*circ-user-AGfif quit (Ping timeout: 260 seconds)
14:04:50*circ-user-AGfif joined #nim
14:11:41*krux02 quit (Remote host closed the connection)
14:16:10Yardanico@sheerluck it will only use first 10 emojis anyway
14:16:31Yardanicoand mostly emojis with index 0-5
14:17:40*Hideki_ joined #nim
14:30:29*Hideki_ quit (Ping timeout: 265 seconds)
14:47:12*circ-user-AGfif quit (Ping timeout: 258 seconds)
14:47:50*rmt joined #nim
14:56:23*dddddd joined #nim
15:01:36*solitudesf joined #nim
15:03:11*MarderIII joined #nim
15:12:51*Hideki_ joined #nim
15:17:29*Hideki_ quit (Ping timeout: 258 seconds)
15:19:35*Hideki_ joined #nim
15:29:25*Hideki_ quit (Remote host closed the connection)
15:30:15*Hideki_ joined #nim
15:34:46*Hideki_ quit (Ping timeout: 265 seconds)
15:38:32disruptekzzzz
15:39:15disruptek~stream
15:39:16disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
15:46:12*nsf quit (Quit: WeeChat 2.7)
15:59:20*tane joined #nim
16:07:08*filcuc joined #nim
16:17:25Guest53420disruptek: no sound on your stream!
16:17:32*Guest53420 is now known as dadada
16:17:40disrupteki don't believe it.
16:18:02zedeusclick the volume icon? it's muted by default
16:19:47disruptekleorize: !tune Araq ormin
16:20:50leorizeI just did :P
16:20:54leorizeso what does that do?
16:21:13dadadazedeus, bug in pulseaudio/my-system I guess, now it's working
16:21:13leorizedoes it stream me the latest commits whenever it happens via private message?
16:21:30disrupteki think it's just issues right now, though.
16:21:36disrupteki forget what i implemented.
16:22:19*circ-user-jDhQ6 joined #nim
16:22:48disruptekyes, but as i said...
16:22:50disruptek~features
16:22:51disbotfeatures: 11begin in the unfortunate state of /unimplemented/ -- disruptek
16:23:05disruptekbut that's the idea.
16:29:01*Hideki_ joined #nim
16:32:49*filcuc quit (Remote host closed the connection)
16:33:29*filcuc joined #nim
16:36:01dom96More and more I wonder whether I wouldn't be done already if I just wrote my silly game in Unity
16:37:48watzonMost likely, but would it have been as fun/endlessly frustrating?
16:39:57FromDiscord<exelotl> dom96: what game are you making?
16:44:07dom96an agar.io-like game called Stardust
16:48:20*Hideki_ quit (Ping timeout: 256 seconds)
16:48:58shashlickI cannot find a single reputed and reliable source for bzip2 - will have to vendor it
16:51:37shashlickdom96: part of the problem with submodules is that when you nimble install and then do builds, you end up with build artifacts after which nimble does not uninstall since there are untracked files that get left behind
16:53:14leorizeshashlick: you can get it from the homepage? https://sourceware.org/bzip2/
16:54:58shashlickIt is unreliable
16:55:02shashlickHttp is down
16:55:09disruptekwhat about the ftp link?
16:57:02shashlickThat is flaky
16:57:09shashlickFails on some CI jobs
16:58:23leorizevendor it as a git submodule i guess
16:58:31leorizeyou should be able to specify the exact tag
17:04:36*nsf joined #nim
17:14:01shashlickDoubt the upstream git repo is even reliable, same host
17:14:53dom96mirror it on github then
17:19:35shashlickdom96: what's your solution for the nimble issue I mentioned
17:22:05dom96submodules get initialised before nimble installs the package so I don't understand how that's a problem
17:22:22shashlickThat's not the problem
17:22:34shashlickThe source needs to be compiled into a library
17:22:45shashlickThat only happens at compile time, not at install time
17:23:13shashlickWhich results in extra files
17:23:29dom96what extra files?
17:23:59shashlickBuilding at install time doesn't work either since before install is too late
17:24:40shashlick.o, .dll, .a and .so files
17:24:48shashlickAnd other build artifacts
17:25:56dom96why are those ending up in with the package source code?
17:34:11*rmt quit (Ping timeout: 268 seconds)
17:39:42*circ-user-jDhQ6 quit (Ping timeout: 258 seconds)
17:42:51*Trustable joined #nim
17:44:42shashlickWhere else does make build stuff
17:44:42shashlickAnd configure scripts
17:44:47*narimiran quit (Ping timeout: 265 seconds)
17:47:16*filcuc quit (Remote host closed the connection)
17:48:10*filcuc joined #nim
17:49:15watzonI'm using make for my OS project
17:49:19watzonNo configure though
17:50:46dom96shashlick, this is what happens when you're running a non-nimble build system
17:51:01dom96nim(ble) won't put build files in those directories
17:51:22dom96IMO it's up to you to make sure these are built somewhere else
17:52:55*circ-user-jDhQ6 joined #nim
17:54:26*filcuc quit (Remote host closed the connection)
17:54:32*letto quit (Ping timeout: 268 seconds)
17:55:17*melMass quit ()
17:55:29*filcuc joined #nim
17:56:21*silvernode joined #nim
18:02:48*filcuc quit (Remote host closed the connection)
18:03:46*filcuc joined #nim
18:04:56*letto joined #nim
18:11:09dadadadisruptek: your stream is on the left, I do stuff on the right, I can't really follow all you're doing, cause of other stuff, but you keep me motivated to learn more about nim (and I do), also I strongly want incremental compilation to work, so I really dig what you're doing!
18:13:02shashlickExactly which is why submodules doesn't work and nimterop does what it does where it does
18:13:29dadadadisruptek: heh, yeah, two screens, I used to have three, but that wasn't good for my attention deficit disorder :D
18:16:32Zevvdude leave the music on!
18:17:04dadadayeah, I want disruptek 24/7
18:17:41*filcuc quit (Remote host closed the connection)
18:18:38*filcuc joined #nim
18:23:40*filcuc quit (Remote host closed the connection)
18:24:26*filcuc joined #nim
18:32:39*MarderIII quit (Quit: Leaving)
18:45:42*Hideki_ joined #nim
18:50:02*Hideki_ quit (Ping timeout: 240 seconds)
18:52:27*filcuc quit (Ping timeout: 240 seconds)
18:53:20*rmt joined #nim
19:11:39*jjido joined #nim
19:12:22FromGitter<wrq_gitlab> is there something simple to shove a seq into an array?
19:14:22leorizewdym
19:14:27*clyybber joined #nim
19:14:29leorizeseq[T] -> array[T]?
19:14:38FromGitter<wrq_gitlab> yeah
19:14:52leorizefor loop
19:14:58leorizethat's the safest
19:15:19FromGitter<wrq_gitlab> ok, yeah thats easy enough, I guess I'll write like a little template or something
19:15:24FromGitter<wrq_gitlab> thanks!
19:15:58leorize`for idx, val in array: array[idx] = seq[idx]`
19:16:06leorizeliterrally one line :P
19:29:29*krux02 joined #nim
19:31:24disruptekomg you guys snipped that rant about comments.
19:32:07disruptek~stream
19:32:08disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
19:32:21disrupteki think we are about to really get stuck-in.
19:38:17*leorize quit (Quit: WeeChat 2.7.1)
19:44:31*Ven`` joined #nim
19:45:39*ptdel joined #nim
19:52:29dadadaso I just read the discussion on keeping style insensitivity or not, and as someone just recently learning Nim, for me this feature is a big sell, because you could add nim code to any existing codebase (Python, Java, C/C++, whatever) and adapt to the style of the bigger codebase
19:52:58disruptekmore commonly, it's the opposite.
19:56:09dadadaespecially in commercial development developers often get strict style guides, now if Nim code can follow any of those styles, it becomes an option, otherwise they might dismiss it simply because they would've to add a second style guide (and it wouldn't fit in) ... when developing private stuff I think many devs have their own taste for style and Nim allows them to express it ... so I think this feature
19:56:15dadadashould be kept, at least it doesn't get in my way (but others may think differently)
19:57:23disruptekthere are no plans to remove this feature.
19:59:03dadadaanother great thing about it: you could write nimpretty like tools that enforce a user defined style, making it easier for developers to be in line with whatever style guide there may be
20:14:06*ptdel quit (Ping timeout: 240 seconds)
20:19:01*Jesin quit (Quit: Leaving)
20:19:41dadadadisruptek: I care about the stream, but I'm also working on something here, so my attention is divided
20:20:04disruptekit's confusing that people watch outside of chat.
20:22:41dadadawell, I don't want to register with twitch now, neither do I have or want a facebook account
20:23:14disruptekyou people...
20:23:42*nsf quit (Quit: WeeChat 2.7)
20:25:51dadadadisruptek: is there any caching for the expansion/generation of macros to their final nim code? I mean are they reprocessed each time, even with no changes?
20:29:03*rmt quit (Ping timeout: 260 seconds)
20:29:47*ptdel joined #nim
20:33:45*marmotini_ joined #nim
20:39:01*narimiran joined #nim
20:45:28*marmotini_ quit (Remote host closed the connection)
20:46:02*marmotini_ joined #nim
20:46:48*Jesin joined #nim
20:50:27*marmotini_ quit (Ping timeout: 240 seconds)
20:55:10Yardanico!repo halonium
20:55:11disbothttps://github.com/halonium/halonium -- 9halonium: 11A browser automation engine written in Nim 15 1⭐ 0🍴
20:55:11Yardanicointeresting project
20:56:47clyybberdadada: Nope, they are cached too afaik
20:57:20*marmotini_ joined #nim
20:58:16disruptekclyybber come on the stream and help me figure out sighashes for pnode.
21:00:06clyybbermy sister just came home from england this very moment
21:00:16disruptekbring her on.
21:00:21clyybberI'll join you later :)
21:00:24clyybberdisruptek: lol
21:01:06clyybberlike 15 minutes or so
21:01:10disruptekkk
21:03:20*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
21:05:10*Lord_Nightmare joined #nim
21:19:21silvernodedisruptek: there's a stream?
21:19:25Yardanico~stream
21:19:26disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat)
21:19:44silvernodeThanks
21:21:55*zahary joined #nim
21:22:11silvernodeAdium still exists?
21:22:19Yardanico?
21:22:35silvernodeOh nothing, just reading verbose messages in IRC
21:25:23disruptek~araq
21:25:24disbotaraq: 11👑 the powers that He 👑 -- disruptek
21:26:27dadadawhen was the crown selected as logo for Nim?
21:26:28silvernodeSo Araq is the founder! What a guy!
21:27:00*narimiran quit (Quit: leaving)
21:29:17krux02yea, he is also very active here on IRC and on the github issues.
21:29:57Yardanicodadada: I guess you'd have to ask Ar*q or other people who know nim (nimrod) for a long time, I think the crown was there even in 2014
21:31:24krux02I don't know about the crown, for me it was always there. But nimrod was a King from the beginning.
21:32:11krux02but I think in an american slang nimrod was/is an insult, therefore the name change from Nimrod to just Nim.
21:40:59*zahary quit (Quit: Leaving.)
21:41:01dadadadisruptek: the other guy talking on your stream (is it silvernode?) should turn his volume down just a little bit
21:41:08*solitudesf quit (Ping timeout: 265 seconds)
21:41:34dadadaI mean when his voice appears it's relatively loud
21:41:51silvernodesilvernode is not talking
21:42:13silvernodeMike's audio is perfect balance on my end
21:43:49*Zectbumo joined #nim
21:49:15*circ-user-jDhQ6 quit (Ping timeout: 258 seconds)
21:51:53*tane quit (Quit: Leaving)
21:53:09dadadait should be pretty simple to write a wrapper around nim that converts regular C style bracket code into python/nim style whitespaced code... I mean, I don't want it, I don't need it or like it, but for those who want it... I think it'd be pretty easy to get done...
21:56:00krux02dadada, actually in the past there was a mode in Nim to do exactly that.
21:56:43FromDiscord<Recruit_main70007> was?
21:56:53FromDiscord<Recruit_main70007> Why would it be taken away?
21:57:19dadadaRecruit_main70007: I assume things get taken away because it's easier to maintain less features
21:57:44krux02because every feauter has permanent support costs. Nobody payed for it and it was not necessary for anything.
21:58:00krux02dadada: yes
21:58:08FromDiscord<Elegant Beef> I mean this exists
21:58:08FromDiscord<Elegant Beef> https://github.com/nim-lang/c2nim
21:58:15krux02There are still to many features in Nim that should be removed.
21:58:22FromDiscord<Elegant Beef> Unless im missing something
21:58:35krux02Mostly because they are broken and nobody fixes their bugs and overall they don't really solve any problem.
21:58:50disruptekclyybber: it's mfiano
21:59:40krux02Elegant Beef: I wasn't about that, it was about at {} oriented nim style that isn't based on semantic whitespace.
22:01:11dadadakrux02: what features?
22:01:17FromDiscord<Elegant Beef> Ah
22:01:39dadadas/what/which
22:02:21*zahary joined #nim
22:05:16krux02dadada: This is my personal opinion, but the features that I think should be removed and reintroduced with fresh ideas are: concepts, varargs, typedesc
22:05:35krux02well typedesc doesn't need to be removed, but 90% of it's functionality should be removed.
22:06:37dadadawell, that's not very reassuring to someone who now wants to learn all of that... haven't used concepts or typedesc yet, though I have learned to use varargs and so far like it
22:08:50krux02well, that is the reason why I want to remove concepts, so that people stop learning them and then after hours of practice realize that they are a broken design.
22:09:34krux02don't get me wrong. The idea of concepts it great, varargs are also very important.
22:09:48clyybberdadada: I mean, you could pipe every file through a shell script beforehand to accomplish the brace thing
22:09:54krux02But the current implementation is just in a dead end that can't be fixed without breaking something else.
22:09:57dadadawhy do you want to remove varargs when you admit they are important?
22:10:17*marmotini_ quit (Remote host closed the connection)
22:11:02krux02dadada: have you ever tried bringin in a new couche into a living room before moving the old one out?
22:11:07krux02it is a similar problem.
22:12:54dadadakrux02: no I didn't try that :-) heh ... but this is a very abstract description of a problem, I probably don't have a vote in this, but I'd keep varargs, they make sense to me, unless you can offer something that's better
22:13:20krux02dadada: I can give you `varargs`.
22:13:47krux02but before I can give you varargs, I have to take varargs away from you otherwise there is no space in the language to add varargs.
22:14:00krux02But yes I have something that is technically better than varargs.
22:14:05krux02It is called openArray.
22:14:25krux02`openArray` works, it has no technical problems.
22:14:39krux02varargs has technical problems
22:16:33dadadakrux02: you're too abstract, what technical problem is that?
22:17:25krux02on one hand it is performance problems for varargs[string, `$`] because of all the allocations, but other than that, it is also deeper in overload resolution. A heavy bug that you will probably not encounter unless you really do a lot of varargs, but if you encounter it, it will be very bad.
22:17:46clyybberThe performance problem isn't a symptom of varargs
22:17:51clyybbervarargs has no performance problem
22:17:58clyybberits just a convinence feature
22:18:16clyybberkrux02: And bugs can be fixed
22:18:54clyybberripping out a feature and adding it back again isn't any better than doing a big possibly breaking refactoring/bug fixing
22:19:45krux02https://github.com/nim-lang/Nim/issues/10975
22:19:47disbotSelf Conflicting Logic in varargs Parameter Passing ; snippet at 12https://play.nim-lang.org/#ix=2510
22:20:37krux02clyybber: read that bug understand it and then comment on it.
22:21:10krux02it doesn't fit in an IRC message, and it is not a bug that can be fixed.
22:21:33krux02It is about two requirements that were met that can't coexist at the same time.
22:21:49clyybbersure it can be fixed
22:21:52clyybberchange the spec
22:22:02krux02the only way to fix one of the requirements it to break the other.
22:22:55krux02This bug in combination with the performance problem is the reason why I don't recommend to use varargs to anybody.
22:23:20krux02maybe some day I will fix varargs, but its hard.
22:23:37krux02constantly people are adding new feauters into Nim
22:23:45clyybbernot really
22:23:58krux02well I am a bit frustrated.
22:24:01clyybberI know
22:24:15krux02sorry if I am a bit too negative.
22:24:33dadadaclyybber: yeah, that's like I view it, as a convenience feature that should stay ... bugs should be fixed... but I can understand krux02, I know what frustration feels like
22:24:35silvernodekrux02: Glass half enpty?
22:24:41silvernodeempty*
22:24:44*Zectbumo quit (Remote host closed the connection)
22:25:04krux02no its not that.
22:25:09clyybberkrux02: You are not too negative, your view is just a bit too narrow
22:25:14clyybbergreat things are coming :D
22:25:36krux02well what do you think will come?
22:25:42clyybberarc
22:25:55krux02I am sceptical about arc.
22:26:01clyybberwell
22:26:08krux02Not that the concept is bad. No I think it is a great concept.
22:26:39krux02But the implementation has bugs. And it will have bugs in the future as well. Simply because everything in Nim has bugs.
22:26:42clyybberyou don't see the use of refs
22:26:50clyybberso I guess you are not really the target audience
22:26:52krux02The only day that I don't encounter a new bug in Nim is the day I don't program in Nim.
22:27:01krux02And that is what is frustrating me about it.
22:27:05clyybberkrux02: fix em
22:27:07clyybberfix em
22:27:09clyybberfix em
22:27:12clyybberits hard
22:27:15clyybberbut its needed
22:27:22clyybberand theres no way around it
22:27:22krux02And fixing the bugs is also not possible, because fixing the bugs requires to break other features.
22:27:33FromDiscord<Elegant Beef> Clyybber do you load images in your engine yet, and if so what do you use?
22:27:36clyybbernow you are switching topics
22:27:51clyybberElegant Beef: I'm using stb_image
22:27:54krux02or fixing the bugs is just too complicated and tiring because the compiler became too complex over the years.
22:28:11clyybberkrux02: Yeah, afaik araq will do refactorings next year
22:28:13FromDiscord<Elegant Beef> ah damn, im also using it and with ogl it's not playing nice
22:28:16FromDiscord<Elegant Beef> So i guess gg i lose
22:28:18clyybberand I want to do some too
22:28:29krux02Elegant Beef: SDL_image also works nice for image loading.
22:28:35clyybberElegant Beef: Its just a seq of pixels in the end
22:28:40krux02or better said SDL2_image
22:28:40clyybberso whats the problem?
22:28:53FromDiscord<Elegant Beef> Yea i know im getting nil when using glTexImage2D
22:28:56clyybberkrux02: Look at injectdestructors.nim
22:29:04FromDiscord<Elegant Beef> but there is only one variable that's not a constant
22:29:06clyybberits not bad
22:29:17clyybber(disclaimer: I'm biased)
22:29:22FromDiscord<Elegant Beef> and that variable isnt emptied
22:29:30clyybberbecause I rewrote a good part of it
22:29:31krux02I don't need an example in Nim that is nicely written.
22:29:47krux02I can give you an example as well (the code that I contributed :P)
22:29:57clyybberwell, simple code is less likely to contain bugs
22:30:00krux02well not all I contributed is nice
22:30:16clyybberkrux02: Same, I made an ugly contribution yesterday
22:30:22krux02and?
22:30:24krux02was it rejected?
22:30:30clyybbernope, I merged it :p
22:30:34clyybberits not that bad tho
22:30:37krux02yea exactly.
22:30:49krux02but things that improve code quality don't get merged.
22:30:52clyybberAnd I'm making a PR cleaning it up
22:31:16clyybberkrux02: https://github.com/nim-lang/Nim/commit/eae31a7f8d5f26bbfc27c3f0746a583154d451c9
22:31:32clyybberIt fixes the wall of text that is a link command
22:31:55clyybberso its better than before. Its just a bit of a violation of seperation of concerns to put the check into execWithEcho
22:32:04clyybberbut its minor really
22:32:07clyybberI guess
22:32:46clyybberand the check has been there before
22:32:50clyybberin another place
22:33:22clyybberwhere it was removed by timothee which caused the link hint to always display the link command
22:33:29clyybberwhich was annoying
22:35:13krux02clyybber: my personal advice just ignore all PR and comments from timothee
22:35:36clyybberwell, I saw you like some of them recently, soo :p
22:35:55krux02his contributions have the lovest code quality from all contributors. But he has the most open issues and PR from all, generally reducing the average code quality by a lot.
22:36:02FromDiscord<Recruit_main70007> @timotheecour they re talking shit about your code bro ^
22:36:06*Trustable quit (Remote host closed the connection)
22:37:08krux02well he knows what I think about him.
22:37:19krux02but he is very good at ignoring it.
22:38:30krux02btw here are some of my PRs that I think are great but that aren't merged because of whatever:
22:38:37krux02https://github.com/nim-lang/Nim/pull/13274
22:38:37disbotimplementation for newLit on distinct types (fixes #13266)
22:38:43krux02https://github.com/nim-lang/Nim/pull/12778
22:38:44disbotadd expectIdent to macros
22:38:52krux02https://github.com/nim-lang/Nim/pull/13398
22:38:53disbotSmall refactor on generic dollar for object
22:38:59krux02https://github.com/nim-lang/Nim/pull/13536
22:39:00disbotfix operators containing percent for VM usage
22:39:05krux02https://github.com/nim-lang/Nim/pull/12430
22:39:07disbotforward type alignments to allocators
22:39:28silvernodeOh lordy!
22:39:34clyybberlol
22:39:55clyybberkrux02: Look at his merged PRs
22:40:08clyybberthose who are really bad usually don't get merged :)
22:41:26krux02clyybber: usually when I get annoyed by timothee I read the sourcecode of the compiler, then I stumble upon some shitty code and I think "WTF, why? Who the fuck did this?" and then git blame tells me. It is always timothee.
22:41:27FromDiscord<Elegant Beef> 10 exposure bucks for anyone that can point where the nil is here
22:41:27FromDiscord<Elegant Beef> https://hastebin.com/otanuxuvaf.css
22:42:42FromDiscord<Elegant Beef> `dataptr[].pixels != nil`
22:42:54clyybberkrux02: Hate on his contributions all you like, but please don't hate on him
22:43:02clyybberI know we all get angry sometimes
22:43:17clyybberbut think about what you would do in real life
22:43:22FromDiscord<Elegant Beef> Something tells me my issue isnt actual a nil but i dont see the issue
22:43:30clyybberyou would correct him and be done with it
22:44:10krux02clyybber: that is what I did in the past as well.
22:44:18clyybberi KNOW
22:44:24clyybbersorry fo the caps
22:44:40clyybberkrux02: im not blaming you that you are getting tired of doing that
22:45:01krux02Elegant Beef: I use glTextureImage2D it is a but easier to use.
22:45:45dadadakrux02: does he merge his own pull requests? If not, then you can't really put all the blame on him. Hating accomplishes nothing, I read some of his pull requests on github, and liked some of them (didn't usually at the code though) bases on their ideas. The merits of pull requests should be evaluated on an individual basis, not on who makes them.
22:46:06clyybberexactly
22:46:19dadada... I seriously dislike when projects get distracted by interpersonal matters, I usually leave such projects, so please stop
22:46:34krux02Well, but I know by the style and quality of the PR if it is a timothee PR or not.
22:46:48*inv2004 joined #nim
22:46:53FromDiscord<Elegant Beef> Yall are shit, and write despiciablly bad code
22:46:55*marmotini_ joined #nim
22:46:57FromDiscord<Elegant Beef> All your code is bad
22:46:58krux02his style is very distinct. And very far away from what I think is acceptable.
22:47:00FromDiscord<Elegant Beef> Accept it
22:47:37*Hideki_ joined #nim
22:47:38inv2004Hello, just switched from win to lin (it is not interesting), which nim-editor should I try now? vs-code or nvim is ok now ?
22:47:48clyybberdadada: I agree
22:47:58*zahary quit (Ping timeout: 255 seconds)
22:48:28silvernodeinv2004: What functionaility are you after?
22:48:31dadadainv2004: vs-code is probably easier for a beginner, I like it a lot and use it currently. nvim is also great, of course. vs-code also has a good vim emulation extension
22:48:51krux02inv2004: emacs vs-code and emacs are the common editors then it is about year preference. I stick to emacs without nimsuggest.
22:48:53clyybberBut also, everyone here is a human and can have their voice
22:49:08FromDiscord<Elegant Beef> Also what do you mean krux, the method you mentioned doesnt exist in the bindings i have
22:49:10silvernodeinv2004: Try them all, winner takes all.
22:49:14krux02yea, I am a human as well. A grumpy programmer human.
22:49:23FromDiscord<Elegant Beef> Also it's not a problem with me
22:49:26clyybberBut its usually easier to quickly disperse conflicts by voice or real life
22:49:34FromDiscord<Elegant Beef> All the values are not nil
22:49:34krux02Elegant Beef: what is not a problem with you?
22:49:43inv2004@dadada, I do not think that Im beginner, I spent ~15years on linux (before windows), and used to vim, but last years I found that it is about impossible to live without normal IDE, but I did not try nvim
22:49:45clyybberso we need to get krux02 and timothee together on mumble :p
22:50:11krux02no thanks.
22:50:14*zahary joined #nim
22:50:36clyybberkrux02: But you really are grumpy sometimes :p
22:50:58clyybberbut its fine :)
22:51:36dadadainv2004: simply put, there's no wrong choice, vs-code on linux is surprisingly good, and vim/nvim obviously, too
22:51:49krux02yea I know, sometimes I just want to get my frustration out and then feel better.
22:51:56clyybberkrux02: Fair enough
22:52:01*Hideki_ quit (Ping timeout: 255 seconds)
22:52:28*Ven`` quit (Ping timeout: 255 seconds)
22:53:20inv2004I did not have any problems to dev on win, but several weeks ago I found that compile time on linux is ~2x times faster, and ~ the same for nim, thats why decided to switch.
22:54:01krux02iteresting
22:54:16krux02generally do I think that developing software on Linux is a better experience.
22:54:43FromDiscord<mfiano> @Rika Might want to put the zero check first in your `~=` proc so you're not computing needless computations.
22:55:03FromDiscord<mfiano> err I mean the `==` check
22:56:17dadadakrux02: the problem here is, you repeat multiple times how bad someone and his code supposedly are, what do you think this accomplishes? Nothing! Nothing at all. You simply vent. You're putting toxic energy into this project, probably making that someone feel worse, but I'm also getting uncomfortable by this talk and I'm not even him. Will I be treated the same why when I make my first attempts at fixing bugs
22:56:23dadadaor adding something to Nim? Now, if instead, you had focused purely on the technical opinion on invidual lines of code or pull requests or ideas, this would have been completely understood/accepted by me, and I probably would've learned something from you and be thankful. But now my impression of you is way worse than of timothee. :-) Although I'm sure you're a great programmer guy.
22:56:49dadadas/why/way
22:57:06FromDiscord<mfiano> This is quite disturbing indeed.
22:57:15*alexander92 quit (Ping timeout: 240 seconds)
23:00:39krux02dadada: Well thanks for your thoughs.
23:01:12krux02I really do welcome first time contributors.
23:01:26*inv2004 quit (Quit: Leaving)
23:03:35krux02maybe I should stop ranting.
23:04:13*arecaceae quit (Read error: Connection reset by peer)
23:04:37*arecaceae joined #nim
23:09:42*lritter quit (Ping timeout: 256 seconds)
23:09:45dadadakrux02: maybe you can collect examples of bad code and put them into the wiki with an explanation as to why the code is bad and what should be done instead? turn this into something positive... I'd be thankful for a resource where I can learn what not to do
23:11:08krux02dadada: well the space of possibilities that you should not do is just too big to list it all.
23:11:14krux02it is literally infinite.
23:11:23krux02The list of things that you should do is much shorter.
23:11:48krux02but if you care for examples.
23:11:58krux02try to avoid code branches.
23:12:22krux02if you can express things without `if` or `when` it is clean code.
23:12:46krux02if you have code that is an `if` every two or three lines, then you are clearly doing something wrong.
23:12:48clyybbercode that doesn't do anything is cleaner than code that does :p
23:13:19krux02well no, code that doesn't do anything is bad.
23:13:24krux02No code is better than code.
23:13:36krux02Not doing something is generally the best.
23:14:10krux02strip your code, reduce lines. And preserve a flow for the reader. Don't just too much around.
23:14:47krux02With that I mean, don't but logic behind a function, if you don't plan to reuse it.
23:14:54krux02sorry
23:14:55clyybberdefer defer defer defer defer defer defer defer
23:14:59clyybber:p
23:15:44krux02what I mean it, don put logic behind a function, if you don't reuse it.
23:15:57krux02in other words
23:16:07krux02a function that has only a signle usage should be inlined.
23:16:31clyybberexcept for when you know you are gonna use it somewhere else later
23:16:33krux02Be sparse with abstractions.
23:16:33clyybberbut I agree
23:16:52dadadakrux02: how do you know something only has a single usage, and will not be needed again at some later time?
23:17:01krux02yea but you have to know it. And often you are wrong with knowing.
23:17:20krux02So generally I wait until I really want to reuse that part of the code before I put in in a function.
23:17:39clyybberthose discussions don't make sense so generally
23:17:53*hax-scramper quit (Read error: Connection reset by peer)
23:18:09*hax-scramper joined #nim
23:18:09clyybberwhen you are providing an API the situation is different
23:18:14krux02dadada: you don't know. Therefore you just write it inline.
23:18:42clyybberdadada: When you want to contribute, just do it. We will tell you if theres something that can be improved :)
23:21:41dadadakrux02: put your rules for good code vs bad code on a wiki page / or blog ... while what you're saying is interesting here, the target audience should be everyone who might contribute to Nim in the future (or simply write Nim code generally), and I don't buy that you couldn't highlight some examples because there're thousands of things that can go wrong, since there are classes of problems, you don't need to
23:21:47dadadadiscuss each possible case
23:22:31krux02dadada: you asked for examples of bad code
23:22:38krux02I just have a very fresh examples
23:22:45clyybberno no no
23:22:51dadadakrux02: please don't do what I suspect!
23:22:54clyybberlets simply not do this
23:23:00krux02don't worry it has nothing to do with timothee
23:23:16krux02here look at this bug: https://github.com/nim-lang/Nim/issues/13417
23:23:21krux02I just posted a workaround
23:24:19krux02this is the difference:
23:24:40dadadakrux02: you still don't get it, I didn't ask for examples for me personally right now, I hinted at the value of having a learning resource for all people currently or in the future working with Nim, instead of repeating your valuable lessons each time someone here asks you, it'd be much more efficient to point them to an URL where they can learn
23:24:42krux02for x in ip1(p1()): ---> for x in ip1((discard;p1())):
23:24:42*silvernode quit (Ping timeout: 258 seconds)
23:25:10*silvernode joined #nim
23:25:31krux02yea that is true, and to be honest it is the exact same advice that I gave to Araq when I came here online for the first time.
23:25:51dadadaand when was that :-)
23:26:05krux02at least two years ago
23:26:16krux02I think even more
23:26:23krux02maybe three
23:27:38krux02I think the tutorials and the examples could have some work. But I do use this channel as a reference point. Think that get asked often I try to fix in the manual, because usually they come here after reading the manual
23:27:54krux02if the manual is too big, they would come here before reading it :P
23:28:31krux02anyway, what I want to explain I really want to get out right now.
23:28:44krux02It is a nice example of bad style in the compiler.
23:28:47krux02I can't fix it
23:34:23dadadakrux02: yeah, that issue is concerning, it looks like something really basic that people would not accept in a language that is more than 10 years old
23:34:27*hax-scramper quit (Ping timeout: 240 seconds)
23:35:02*hax-scramper joined #nim
23:37:11*Zectbumo joined #nim
23:37:50*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:39:21dadadakrux02: I think I know why it happens
23:40:56*zahary quit (Quit: Leaving.)
23:43:12shashlickhere's the fact, programmers are very opinionated and you have to be just as accepting of krux02 as you ask him to be of timothee
23:43:39dadadashashlick: definitely!
23:44:01shashlicki don't like working on some nim projects since the owners are so nitpicky about style and structure and ask for hundreds of changes before anything goes in
23:44:20shashlickmeanwhile, i'm also picky when people submit PRs into my projects so it's a wash
23:44:38shashlickfact is that when i work on my own stuff, my velocity is 1000x when compared to PRs
23:44:47dadadayeah, I think there's more than one valid style of coding
23:45:03shashlickand if a project has to grow, you need to learn to let go and trust
23:45:32shashlickbut there is a limit to everything and everyone has their own line in the sand
23:45:40dadadamakes sense
23:47:59shashlickstandard middle path ambiguous stuff 🙂
23:50:46*hax-scramper quit (Ping timeout: 258 seconds)
23:51:41*hax-scramper joined #nim
23:55:13reversem3I’m looking for advice how to get started creating SOLID apps using nim, right now I can only find react or angular examples. https://codesandbox.io/embed/github/Vinnl/notepod/tree/5-writing-data/?module=%2Fsrc%2FApp.tsx&codemirror=1
23:55:54reversem3* I’m looking for advice how to get started creating SOLID apps using nim, right now I can only find react or angular examples.
23:55:55reversem3Here is some code
23:55:55reversem3https://codesandbox.io/embed/github/Vinnl/notepod/tree/5-writing-data/?module=%2Fsrc%2FApp.tsx&codemirror=1
23:56:10shashlickalso worth mention that there's people from around the globe here and different cultures have different communication styles
23:58:14dadadakrux02: so, it looks to me like openArray envelopes the whole proc call somehow, each time you call len() or the items() operator on the openArray, the p1() call is first executed