<< 10-02-2020 >>

00:00:08*Ckat quit (Read error: Connection reset by peer)
00:00:24*sagax quit (Remote host closed the connection)
00:00:24*Ckatt is now known as Ckat
00:00:24*tribly quit (Ping timeout: 265 seconds)
00:00:24*Hideki joined #nim
00:00:48*Hideki is now known as Guest82720
00:00:57*dadada_ quit (Ping timeout: 272 seconds)
00:02:08*dadada_ joined #nim
00:02:26*kungtotte quit (Ping timeout: 240 seconds)
00:03:23*u0_a121 quit (Read error: Connection reset by peer)
00:14:33*kungtotte joined #nim
00:15:51*dadada_ quit (Ping timeout: 260 seconds)
00:16:58*dadada_ joined #nim
00:21:04*Guest82720 quit (Remote host closed the connection)
00:22:51FromDiscord<X.A.N.O.Z.O.I.D.> hello! 👋
00:25:36FromDiscord<Recruit_main_70007> Hi
00:26:12*tribly joined #nim
00:29:17*u0_a121 joined #nim
00:29:41*kungtotte quit (Ping timeout: 268 seconds)
00:30:38*dadada_ quit (Ping timeout: 265 seconds)
00:32:08*dadada joined #nim
00:32:31*dadada is now known as Guest21970
00:46:24*kungtotte joined #nim
00:46:35*Guest21970 quit (Ping timeout: 265 seconds)
00:47:00*dadada_ joined #nim
00:47:56*Pqzcih5 quit (Remote host closed the connection)
00:49:05nullwarpis there a nim library for resizing images?
00:57:02*Hideki_ joined #nim
00:58:52Tangernullwarp, https://github.com/SolitudeSF/imageman has basic rezizing procs
00:59:56Tangerhttps://nimble.directory/search?query=image > Some other options in here, not sure which ones are maintained
01:01:07*dadada_ quit (Ping timeout: 272 seconds)
01:02:00*dadada_ joined #nim
01:04:03*opal quit (Ping timeout: 240 seconds)
01:04:40*opal joined #nim
01:07:39*u0_a121 quit (Read error: Connection reset by peer)
01:13:12*u0_a121 joined #nim
01:15:56*dadada_ quit (Ping timeout: 268 seconds)
01:17:00*dadada_ joined #nim
01:30:53*dadada_ quit (Ping timeout: 272 seconds)
01:31:57*dadada joined #nim
01:32:20*dadada is now known as Guest91703
01:35:38*theelous3 quit (Ping timeout: 256 seconds)
01:37:17*ng0 joined #nim
01:37:17*ng0 quit (Changing host)
01:37:17*ng0 joined #nim
01:39:21leorizedisruptek: it shouldn't move your cursor :/
01:39:28leorizecan you record it?
01:39:43disrupteki just did.
01:40:15leorizenice :) can I see?
01:40:36*ng0_ quit (Ping timeout: 268 seconds)
01:41:06disrupteksure, i'll hold my keyboard up to the monitor. make a sound like a goat when you're done looking.
01:42:04*theelous3 joined #nim
01:45:06disruptekwhat do you think?
01:45:14*Guest91703 quit (Ping timeout: 240 seconds)
01:46:47disruptekit's bad, right?
01:47:07*dadada_ joined #nim
01:49:26disrupteki'm sure this narimiran's fault.
01:51:59*u0_a121 quit (Read error: Connection reset by peer)
01:53:14*EvergreenTree quit (Ping timeout: 240 seconds)
01:54:00FromDiscord<treeform> @nullwrap I made flippy image library, it can resize images, i am here if you run into issues. Are the images you are resizing contain alpha?
01:54:53FromDiscord<treeform> https://github.com/treeform/flippy
01:56:39leorizedisruptek: I'm having a hard time figuring out what you're trying to tell me :P
01:57:14*EvergreenTree joined #nim
01:58:35disrupteki think it's a binding issue but i dunno what's wrong with `nmap K :NimTypeOf<CR>` except that miran suggested it. and i don't trust that guy.
02:00:26*dadada_ quit (Ping timeout: 240 seconds)
02:01:18FromGitter<zetashift> Storm reaching germany too?
02:02:03*dadada_ joined #nim
02:02:39*Tanger quit (Remote host closed the connection)
02:03:14*Hideki_ quit (Ping timeout: 240 seconds)
02:03:33*Tanger joined #nim
02:04:27FromGitter<zetashift> Status.im is hiring by the way krux02, I wanted to apply for the Junior Remote position but I don't know that much C/C++ and I don't know much about the semantic pass in a compiler so hopefully I'll get better soon ;p
02:15:47*dadada_ quit (Ping timeout: 260 seconds)
02:16:48*dadada_ joined #nim
02:23:27*chemist69 quit (Ping timeout: 240 seconds)
02:25:37*chemist69 joined #nim
02:36:55*arecaceae quit (Remote host closed the connection)
02:37:50*arecaceae joined #nim
02:42:48FromGitter<deech> Are there any packages that use the compiler as a library to do static analysis of types in Nim code? I see a couple of linters that fix naming and the like but none that invoke a typechecking pass.
02:45:05disrupteki don't know of anything like that. what are you trying to do?
02:48:23FromGitter<Varriount> Generally I just run `nim check`
02:50:58FromGitter<deech> As one small example I want a check that ensures that every generic function in a library is instantiated concretely at least once.
02:54:33leorizedisruptek: I can't seem to reproduce the issue
02:54:50disruptekit's okay; thanks for looking.
02:55:34nullwarp@treeform thank you i'll check it out
02:55:38*dddddd quit (Ping timeout: 265 seconds)
03:07:16*dadada_ is now known as dadada
03:11:45*ng0_ joined #nim
03:11:51*ng0_ quit (Changing host)
03:11:51*ng0_ joined #nim
03:12:16*endragor joined #nim
03:14:26*ng0 quit (Ping timeout: 240 seconds)
03:24:49*u0_a121 joined #nim
03:29:27*muffindrake quit (Ping timeout: 240 seconds)
03:31:54*muffindrake joined #nim
03:36:43disruptekryu doesn't work yet because it's full of (1 << n) - 1 bullshit that i now get to track down and fix.
03:42:07*theelous3 quit (Ping timeout: 260 seconds)
03:45:10*u0_a121 quit (Ping timeout: 268 seconds)
03:45:21*theelous3 joined #nim
03:47:40FromDiscord<Elegant Beef> ctrl + shift + h
03:47:40FromDiscord<Elegant Beef> `replace <<`
03:47:41FromDiscord<Elegant Beef> `with shl`
03:47:41FromDiscord<Elegant Beef> 😄
03:48:32disruptekit's just rollover and stuff that offends me.
03:57:23FromDiscord<demotomohiro> I think `nimKeywordsLow` in compiler/wordrecg.nim sould be ord(wAddr) not ord(wAsm) because `addr`, `and`, and `as` are Nim keywords.
03:59:25*ng0 joined #nim
04:00:24leorizeasm is a keyword
04:02:26*ng0_ quit (Ping timeout: 240 seconds)
04:03:59FromDiscord<demotomohiro> In `TSpecialWord` in compiler/wordrecg.nim, `wAsm` is defined after `wAs`.
04:08:16leorizeto be fair, I'm not sure if nimKeywordsLow is even used
04:08:42leorizea quick referencing check with nimsuggest shows that nothing is using the constant
04:10:14leorizeit might just be an artifact of the past when the compiler was written in pascal
04:13:18leorizeah, it's was a part of the detecting "shared keyword between Nim and C"
04:13:33leorizewhich is why it started from wAsm
04:16:57FromDiscord<Elegant Beef> Has anyone used the interfaced package?
04:17:10FromDiscord<Elegant Beef> I dont think i understand it well enough
04:17:21leorizethose packages are not really popular among the community
04:17:21FromDiscord<Elegant Beef> Or it's borked, since it hasnt been changed for 2 years
04:17:50FromDiscord<Elegant Beef> Interesting
04:17:59leorizeprotocoled is much newer and it's author can be found on the forums
04:18:20FromDiscord<Elegant Beef> protocoled looks like it only supports 1 interface per object though
04:18:31FromDiscord<Elegant Beef> Atleast from my looking at it
04:18:52FromDiscord<Elegant Beef> Which clearly defeats the purpose of interfaces
04:23:13leorizemultiple inheritance is not a thing in Nim, so that kind of interface can't be expressed with how the protocoled macro works
04:24:46leorizethe interfaced macro might be the only way
04:25:12leorizebut it's old and no one actually use it, so you gotta fix it up if you wanted to use it for your projects
04:25:46FromDiscord<Elegant Beef> Yea i guess i will have to
04:31:34FromDiscord<demotomohiro> @leorize, I'm trying to get a list of Nim keywords from a compiler module and using `nimKeywordsLow` and `nimKeywordsHigh` seems not a good idea.
04:31:53leorizelow(TSpecialWords) + 1
04:33:01leorizeor you can just hardcode wAddr
04:33:15FromDiscord<demotomohiro> yeah, using it instead of nimKeywordsLow work
04:33:17leorizethat list can't change since it's used throughout the compiler
04:33:30leorizeso just hardcode whatever you want :)
04:34:08*lritter quit (Ping timeout: 246 seconds)
04:35:00*lritter joined #nim
04:35:28FromDiscord<demotomohiro> I think adding new Nim keyword would be breaking change. so that list will not change.
04:36:32leorizeyou will know it for sure if it ever changes :p
04:42:06*ng0_ joined #nim
04:42:41*nsf joined #nim
04:45:35*hax-scramper joined #nim
04:45:36*ng0 quit (Ping timeout: 268 seconds)
04:49:33leorizeshashlick: possible flaw that you need to fix in your script: https://travis-ci.org/nim-lang/nimble/jobs/647156666#L208
05:13:02*eremitah joined #nim
05:15:03*ltriant quit (Quit: leaving)
05:22:59*narimiran joined #nim
05:37:57*ng0 joined #nim
05:39:24*rockcavera quit (Remote host closed the connection)
05:41:07*ng0_ quit (Ping timeout: 260 seconds)
05:42:26*lritter quit (Ping timeout: 240 seconds)
05:45:44*marmotini_ joined #nim
05:47:07*lritter joined #nim
05:49:02*marmotini_ quit (Remote host closed the connection)
05:49:52*marmotini_ joined #nim
05:53:21*eremitah left #nim ("part")
06:00:38*Hideki_ joined #nim
06:02:25leorizeAraq: is there any plans in the future to actually split system into smaller modules that have to be imported manually?
06:02:57leorizeI could write a new io.nim, but since it's a part of system, I can't reuse the bits from the likes of posix.nim and winlean.nim
06:05:23*Hideki_ quit (Ping timeout: 260 seconds)
06:07:17*marmotini_ quit (Remote host closed the connection)
06:24:54*marmotini_ joined #nim
06:29:41*ng0_ joined #nim
06:32:54*ng0 quit (Ping timeout: 268 seconds)
06:33:31*theelous3 quit (Ping timeout: 268 seconds)
06:41:44*marmotini_ quit (Remote host closed the connection)
06:45:00*marmotin_ joined #nim
06:45:51*marmotin_ quit (Remote host closed the connection)
06:48:18leorizeAraq: can you take a look at #13201? I've added -d:nimInheritHandles, a change log that'll need proofreading, and plugged one extra leak.
06:48:19disbothttps://github.com/nim-lang/Nim/pull/13201 -- 3Make file descriptors from stdlib non-inheritable by default
07:01:13*ng0 joined #nim
07:04:11*ng0_ quit (Ping timeout: 260 seconds)
07:04:36Araqtests seem to be red?
07:06:32*marmotini_ joined #nim
07:11:37*marmotini_ quit (Ping timeout: 272 seconds)
07:18:18FromDiscord<Elegant Beef> Is there a way to see what's going on inside macros?
07:18:32Yardanicoyou mean show the resulting code of a macro?
07:18:44FromDiscord<Elegant Beef> I guess
07:18:48FromDiscord<Elegant Beef> Debug it somehow
07:18:54Yardanicowell, there are different ways
07:19:07YardanicotreeRepr/lispRepr/astGenRepr
07:19:17Yardanicoor just repr if you want to see resulting nim code
07:20:28*sagax joined #nim
07:22:47FromDiscord<Elegant Beef> Thanks
07:23:20FromDiscord<Elegant Beef> guess my issue is this `gensym393126:`
07:23:40Yardanicocan you share your macro ? and pls don't paste the code directly in discord, use a paste service :P
07:23:57FromDiscord<Elegant Beef> Well im looking at the interfaced repo
07:24:02FromDiscord<Elegant Beef> trying to get it to work properly
07:24:12FromDiscord<Elegant Beef> the toInterface method it generates doesnt work
07:24:51leorizeAraq: just fixed that
07:25:35leorize@Elegant Beef: the --expandMacro switch is also useful while developing macros
07:25:46leorizebasically --expandMacro:macroName
07:28:04FromDiscord<Elegant Beef> `proc toCmd(this : ref)`
07:28:04FromDiscord<Elegant Beef> is basically the macro input
07:28:14FromDiscord<Elegant Beef> does the gensym make sense?
07:30:02FromDiscord<Elegant Beef> I say that but the error is `template/generic instantiation of toCmd from here`
07:30:42FromDiscord<Elegant Beef> *atleast i imagine that's the start of it*
07:30:50FromDiscord<Elegant Beef> Idk im a numpty
07:31:10*solitudesf joined #nim
07:34:00FromDiscord<Elegant Beef> Probably makes more sense for me to rewrite this just so i get a better grasp, probably dumb, but the way i see it go through all types check if they have the same proc signatures and if so create a toInterface method to said interface
07:34:17FromDiscord<Elegant Beef> Instead of relying on references
07:34:42FromDiscord<Elegant Beef> Instead of relying on generic conversion or from a ref or w/e
07:35:21*ftsf joined #nim
07:35:27Yardanicowell, using generics or refs seems better than using methods :)
07:35:51FromDiscord<Elegant Beef> i mean toInterface proc
07:36:03FromDiscord<Elegant Beef> *C# use of the word method*
07:37:13FromDiscord<Elegant Beef> well i mean this adds a toInterface proc that casts the generic
07:37:37FromDiscord<Elegant Beef> And for some reason it doesnt have any of the properties it had
07:37:38FromDiscord<Elegant Beef> so idk
07:37:55FromDiscord<Elegant Beef> When i manually cast that is
07:38:39leorizehttps://forum.nim-lang.org/t/4571#28623
07:38:47leorize@Elegant Beef ^ you might wanna see that
07:40:10FromDiscord<Elegant Beef> Thanks
07:43:50*chemist69 quit (Ping timeout: 246 seconds)
07:44:15*chemist69 joined #nim
07:48:06FromDiscord<Elegant Beef> So that worked perfectly
07:48:31*u0_a121 joined #nim
07:48:33FromDiscord<Elegant Beef> I didnt try it with nimble but annoyingly the repo lacks a .nimble
07:51:26*u0_a121 quit (Read error: Connection reset by peer)
07:51:40AraqI think this package needs to be updated for v1.0
07:54:27*muffindrake quit (Ping timeout: 240 seconds)
07:57:48*muffindrake joined #nim
08:00:00*gmpreussner quit (Quit: kthxbye)
08:02:47*def- quit (Remote host closed the connection)
08:04:29*ng0 quit (Ping timeout: 265 seconds)
08:04:53*gmpreussner joined #nim
08:05:20*ng0 joined #nim
08:06:04*def- joined #nim
08:08:43*saby9996 joined #nim
08:08:45*filcuc joined #nim
08:10:10*filcuc quit (Client Quit)
08:10:27*filcuc joined #nim
08:10:31*saby9996 quit (Remote host closed the connection)
08:15:12ftsfhttps://play.nim-lang.org/#ix=2bhz hmm interesting bug I think? why does proc typeSizeFromID(id) raise an IndexError when it accesses the same const seq as the parent code which accesses it via the const directly works?
08:17:16Araqcontrary to what most people think, accessing a .compileTime var at runtime makes more sense than your 'const' workaround
08:17:26Araqthe const introduces a phase-ordering problem
08:17:52AraqI think both approaches are currently broken though
08:18:20ftsfmmm i'd prefer to access the compileTime variable, but it seems broken so i'm trying to work around it via the const method
08:18:30*dadada quit (Ping timeout: 265 seconds)
08:19:31ftsfahh making typeSizeFromID a template works
08:19:54*dadada joined #nim
08:19:59Araqah, possible yeah
08:20:17ftsfi'm not sure why the proc doesn't work though, but this should do me for now =)
08:20:19*dadada is now known as Guest83377
08:20:34FromDiscord<Elegant Beef> now to bother you nice people more, how do you pass a table to a proc?
08:21:05ftsfproc foo(t: Table[X,Y]) = foo(myTable)
08:21:47FromDiscord<Elegant Beef> VScode autocomplete needs work
08:22:05FromDiscord<Elegant Beef> I tried T and table there was no table, only tables 😄
08:22:13FromDiscord<Elegant Beef> I tried T and t there was no table, only tables 😄
08:23:47ftsfElegant Beef: https://play.nim-lang.org/#ix=2bhA
08:24:03FromDiscord<Elegant Beef> Yea i already got it
08:30:10FromDiscord<Elegant Beef> Well here is the super overkill thing i had running much more simplistically
08:30:10FromDiscord<Elegant Beef> https://hastebin.com/igafadojib.cs
08:30:35FromDiscord<Elegant Beef> But now i can easily add new commands so ya totally worth it i likd
08:30:39FromDiscord<Elegant Beef> But now i can easily add new commands so ya totally worth it i lied
08:30:45FromDiscord<Elegant Beef> Well here is the super overkill thing i had running much more simplistically
08:30:45FromDiscord<Elegant Beef> https://hastebin.com/igafadojib.py
08:33:37ftsfis it possible for a macro to resolve a generic argument?
08:34:06Araqdunno about "resovle" but it surely can "inspect" it.
08:34:20AraqElegant Beef: omg adhere to our style guide
08:34:30Araqproc getCommandString etc
08:34:38AraqNim is not C#.
08:34:40ftsfproc foo[T](bar: T) = myMacro(T) macro myMacro(t: typedesc) untyped = $t # outputs "T"
08:35:12*FromGitter quit (Remote host closed the connection)
08:35:14ftsfi'd like for the macro to get whatever T actualy is
08:35:31*FromGitter joined #nim
08:38:38ftsfhttps://play.nim-lang.org/#ix=2bhF it raises "no registered type T"
08:40:06FromDiscord<Elegant Beef> Every language i write i use the C# styling
08:40:06FromDiscord<Elegant Beef> 😄
08:43:24*marmotini_ joined #nim
08:45:34FromDiscord<Elegant Beef> If i was releasing a library i'd certainly follow the styling
08:45:40FromDiscord<Elegant Beef> but for a oneoff thing screw it 😛
08:46:44*floppydh joined #nim
08:47:17FromDiscord<Elegant Beef> I already cant use tabs so... you're lucky
08:49:15*u0_a121 joined #nim
08:52:24*Guest83377 is now known as dadada
08:52:44dadadahas anyone here done work with C++ latest standard?
08:52:49dadadaC++20?
08:54:02*hinst joined #nim
08:58:45dadadasome of the things I read about "modern C++" seem enticing to me, but I don't really want to go back to C++, they have a track record of overcomplicating things... even the compile times alone speak against starting new projects with it... on the other hand there are many solid C/C++ libraries... hmm... hopefully nim's toolchain will get to the point where you can use C/C++ libs seemlessly, C++ will probably
08:58:51dadadastay around for a long time
08:59:26dadadaseemlessly would mean that I could do something like
08:59:43dadadaimport cpp.Qt5Core
09:00:07dadadaand nimble/nim figure out that Qt5Core must be a C++ library, (because of the cpp. prefix)
09:00:25dadadaautomatically run a tool like nimterop when it's fully developed
09:00:59dadadato create wrappers/bindings/(whatever you want to call it) without you even having to think about it
09:01:57dadadait should just be -> have the Qt5 headers/libs installed -> put import cpp.Qt5Core import cpp.Qt5Gui at the top of your source file
09:02:33dadadanim should then autoMAGICally create bindings wrappers (if they don't already exist)
09:02:48*Pqzcih5 joined #nim
09:02:48dadadaonce you start the normal compile or run cycle
09:03:41dadadathis would be the dream workflow ... it would be even better if that was nim's general philosophy about including libs of external languages
09:04:02dadadawant a python library? import python.numpy
09:04:30dadadawant to use a java class/library? import java.org.foobar.bla.etc
09:04:39FromDiscord<Elegant Beef> Ok we're getting a little far
09:04:59dadadaElegant Beef: I realize this is wishful thinking at this point
09:05:05FromDiscord<Elegant Beef> I mean it's also weird
09:05:20dadadawhy is it weird? because it hasn't been done before?
09:05:24FromDiscord<Elegant Beef> CPP and C libraries is fine
09:05:30FromDiscord<Elegant Beef> but java and python, is ewwy
09:05:47FromDiscord<Elegant Beef> Like you have to run the jvm to use the java classes, atleast i'd assume
09:06:16dadadaElegant Beef: there are already projecs binding python to nim and nim to python ... obviously there's a selection of people with the need for such weird things
09:06:48FromDiscord<Elegant Beef> I think when you attempt to bind a pythong library it prints out a fly for you nearby insane asylum
09:06:48dadadaElegant Beef: you are right, the java one is even worse than the python one in my opinion ...
09:06:49FromDiscord<Elegant Beef> 😄
09:07:02FromDiscord<Elegant Beef> python*
09:07:14FromDiscord<Elegant Beef> glyer*
09:07:17FromDiscord<Elegant Beef> flyer*
09:07:20FromDiscord<Elegant Beef> damn i good at typing right now
09:07:23FromDiscord<Elegant Beef> i am*
09:07:28FromDiscord<Elegant Beef> ok im just super daft atm
09:07:54dadadaElegant Beef: using python/java libs in nim wouldn't be ideal for sure, but sometimes there can be weird requirements for software that you can't get anywhere else, and then you do what?
09:08:18FromDiscord<Elegant Beef> Dont design software with weird requirements 😛
09:08:25FromGitter<kdheepak> I'm reading some binary data in nim and I have the `169` in a uint seq. This corresponds to `'©'`. But nim's `chr(169)` does not work. Does anyone know how I should convert this correctly?
09:08:27dadadawho says that I'm doing that
09:09:00dadadawho says that I don't have some customer (or get thrust into a weird situation by some other way) where I have to glue things from different langs together?
09:09:51FromGitter<kdheepak> https://play.nim-lang.org/#ix=2bhN
09:09:54dadadaElegant Beef: my priority by far is C/C++ bindings ... I just brought up the python and java examples, because I think it should be a generalized way for making bindings to/from any language
09:11:21dadadaElegant Beef: there are many bindings to use C++ code from Java, so you can see a lot of people must have this need to bridge a VM with machine code libraries, of course this isn't something a purist would want to do, however life throws weird things at you
09:11:52dadadaElegant Beef: https://github.com/bytedeco/javacpp
09:12:00dadada3k stars
09:12:17FromDiscord<Elegant Beef> Im not saying it's not wanted
09:12:23FromDiscord<Elegant Beef> just saying i view it super weird
09:13:15dadadaElegant Beef: maybe you can view it as less weird when you realize that it's just an arbitrary choice that java gets compiled to bytecode
09:13:36dadadathere used to be a compiler (GCJ/or GJC?) that compiled it to machine code just like C/C++
09:14:21dadadaI find it disappointing that they have given up basically because OpenJDK appeared on the scene (java was released as FOSS)
09:15:44dadadathere's nothing fundamentally wrong with the language except for the VM making it into a kind of a walled garden
09:16:01FromDiscord<Elegant Beef> I know it *Can* get combiled to machine code, but it's not, so to me stuff like that makes me think just make the app in the jvm and use shared memory for transfering thing
09:16:02dadadanote I don't particularly love java (to put it mildly)
09:16:44FromGitter<kdheepak> ( I had to convert it to a rune first and then write out to the screen )
09:17:12dadadaElegant Beef: I totally undestand your sentiment... didn't want to make this primarily about Java anyways
09:17:39dadadaie. there are a lot of pretty cool libraries for go, too, which gets compiled to machine code
09:18:06dadadamaybe in a future far far away we could import something like that with simply
09:18:13dadadaimport go.foo.bar.library
09:18:26*hax-scramper quit (Ping timeout: 265 seconds)
09:18:51*hax-scramper joined #nim
09:19:38*filcuc quit (Ping timeout: 240 seconds)
09:21:58*hax-scramper quit (Read error: Connection reset by peer)
09:22:26*hax-scramper joined #nim
09:23:34*Vladar joined #nim
09:29:41*u0_a121 quit (Read error: Connection reset by peer)
09:34:58*filcuc joined #nim
09:36:57Araq169 does not correspond to `'©'`.
09:37:21Araqit depends on the codepage. it's an illformed utf-8 character, I think
09:37:35Araqtry the encodings.nim stdlib module
09:39:14*filcuc quit (Ping timeout: 240 seconds)
09:47:46*solitudesf- joined #nim
09:49:01*solitudesf quit (Read error: Connection reset by peer)
09:54:03Araqhttps://github.com/nim-lang/RFCs/issues/191 this is great stuff
09:54:05disbotstandardize all stringification API's around allocation-free binary $ operator + variadic strAppend ; snippet at 12https://play.nim-lang.org/#ix=2bif
09:56:56dadadaAraq: I like having $ for turning anything into a string
09:57:19dadadaI'm not sure I like ret$" bar " for appending stuff
09:58:20dadadaI think I'd like this more:
09:58:46Araqread the proposal carefully
09:58:52Araqthe unary $ will stay
09:59:09dadadayeah, I think I saw that
09:59:42dadadamy issue is that the code (please don't stone me for this stupid comparison) all of a sudden starts to look like assembler
10:00:15*lqdev[m] joined #nim
10:00:15lqdev[m]I don't agree with this, `foo $ bar` looks nothing like assembler
10:00:45dadadaI know that's not really a factual description, but it's very uncommon to have a variable$foo
10:00:58lqdev[m]it's probably a matter of spacing
10:01:10dadadabeing something that you'd expect to be more like variable $= foo
10:01:18dadadayou have += for raising numbers
10:01:22lqdev[m]and don't say it's common to have variable & foo, either
10:01:40dadadalqdev[m]: true
10:01:59Araqbbl
10:02:02lqdev[m]but I kind of agree, $= would make more sense
10:02:52dadadawhat I like about the proposal is that foo =$ bar $morebar would work
10:03:14dadadaI added the = because I think it wouldn't break with traditions as much
10:03:57FromGitter<Varriount> Could you do...
10:04:23FromGitter<Varriount> good =$ (bar, morebar) instead?
10:04:42FromGitter<Varriount> Although, at that point perhaps a function call is better
10:04:47dadadathat would also be nice, why not have both
10:05:04dadadaof course in the shell you can do echo $bla $foo $bar
10:05:12dadadaso if you can do the same thing in nim
10:05:19FromGitter<Varriount> One other (nitpick) is that the `$` is generally hard to type.
10:05:34dadadanim all of a sudden becomes closer to a shell replacement + it looks cool in my humble opinion
10:06:29dadadaVarriount: what keyboard do you have? I like typing $ on my German keyboard, never heard anybody complain about it for shell scripts or PHP
10:07:38dadadaI want to clarify one things, I'm a fan of timotheecour's work
10:07:45dadadas/things/thing
10:07:59FromDiscord<Elegant Beef> ^ is probably the hardest symbol on a NA keyboard
10:08:09WilhelmVonWeinershift+6?
10:08:14FromDiscord<Elegant Beef> yea
10:08:21FromGitter<Varriount> Araq: What ever happened to using term-rewriting macros for these things?
10:08:23FromDiscord<clyybber> huh, its shift + 4 here
10:08:28FromDiscord<clyybber> and I'm on a US layout
10:08:39FromDiscord<Elegant Beef> The exponent sign is shift + 6?
10:08:44WilhelmVonWeineroh sorry my brain still saw NA and ignored it to go "GB"
10:09:06FromDiscord<clyybber> @Elegant Beef no the $, I thought your ^ was referring to above messages heh
10:09:13FromDiscord<Elegant Beef> Ah
10:09:17FromDiscord<Elegant Beef> my bad 😄
10:09:34FromDiscord<clyybber> Varriount: disruptek had a brilliant idea
10:09:41FromDiscord<clyybber> I commented on the github issue
10:09:55dadadathe only thing striking me as odd is that we can add something to a variable without =, you'd not expect ret+10 to increase ret by 10
10:10:13*hax-scramper quit (Ping timeout: 272 seconds)
10:10:18FromDiscord<clyybber> if we extend term-rewriting macros to be able to use lastuse information then this is gonna solve itself
10:10:20FromDiscord<Elegant Beef> isnt there also
10:10:20FromDiscord<Elegant Beef> `inc` and `dec`?
10:10:52FromDiscord<clyybber> dadada: This is only about $ and strings
10:10:54FromDiscord<clyybber> the RFC
10:10:58*hax-scramper joined #nim
10:13:35dadadaclyybber: I know Elegant Beef: yes, but those have the feel of a function, while $ has a different syntactical feel to it, I mean in the end they are all functions, but the expectations/consistencies are different
10:14:19*NimBot joined #nim
10:16:48dadadalet's say I want to echo a string of ret and $x (x being a float)
10:16:52dadadaso
10:17:10dadadaecho ret $" " $x # with a space between them
10:17:18dadadaif I understand the proposal right (which I might not!)
10:17:31dadadanot only does the echo do what I'd like it to
10:17:57dadadaret also becomes what echo echoes, which might not be intended
10:18:26FromDiscord<clyybber> Disrupteks suggestion would be possible without any API changes
10:18:27*solitudesf- quit (Ping timeout: 272 seconds)
10:22:30dadadacould you make the $ operater white space sensitive? what I mean is make foo $bar become "foostring barstring" and foo$bar become "foostringbarstring"?
10:22:59dadadajust for the one case of their either being space between them or not, not for different space lengths
10:24:34dadadas/their/there
10:24:57*muffindrake quit (Ping timeout: 260 seconds)
10:25:44FromGitter<gogolxdong> Is there any capture library like libpcap?
10:30:49dadadaI like https://github.com/nim-lang/RFCs/issues/190
10:30:51disbotallow `when` in enum types ; snippet at 12https://play.nim-lang.org/#ix=2biz
10:32:54*u0_a121 joined #nim
10:35:40*marmotini_ quit (Remote host closed the connection)
10:38:09*marmotini_ joined #nim
10:43:09*u0_a121 quit (Read error: Connection reset by peer)
10:45:06lqdev[m]dadada: I don't think that's a good change, it would only bloat the language and make $ into a compiler magic
10:49:44FromDiscord<clyybber> yeah, I don't like it either
10:50:45*marmotini_ quit (Ping timeout: 272 seconds)
10:50:45AraqVarriount: TR macros will be re-worked, I found a better design for them
10:51:07Araqbut TR macros cannot rewrite procs into "inplace" variants
10:51:14FromDiscord<clyybber> why?
10:51:15Araqif you don't offer the inplace variant.
10:51:25FromDiscord<clyybber> Ah, yeah sure
10:51:26Araqas I said, 'outplace' is 2-3 lines of code
10:51:33Araq'inplace' is an open research problem.
10:51:54FromDiscord<clyybber> We can solve a part of the problem though
10:51:55Araqso the stdlib is heading to "outplace all the things"
10:52:02*hax-scramper quit (Ping timeout: 240 seconds)
10:52:06FromDiscord<clyybber> By transforming & into &=
10:52:11FromGitter<Varriount> Yeah, I realized that about a minute after I asked
10:52:11Araqwhich is fine with me, it suits Nim's "system programming" aspect
10:52:35FromDiscord<clyybber> Like `x = a & b` -> `x = (a &= b; a)`
10:52:41FromDiscord<clyybber> When a is a var and a last use
10:53:14*hax-scramper joined #nim
10:53:15FromDiscord<clyybber> And the assignment here would be sinked
10:53:47FromDiscord<clyybber> It doesn't solve all the issues, but it is a way of making `x = a & b & c & ...` efficient
10:54:12FromDiscord<clyybber> and it would be a rad way to show off nims powers
10:54:20Araq & is specialized already and also strformat is really good at it
10:54:39Araqanyhow, instead of a binary &
10:54:47Araqwe can use 'toString'
10:55:12Araqproc toString(res: var string; x: CustomObject)
10:55:25FromGitter<Varriount> I guess the one issue I have with turning `$` into a binary operator is that such operators usually have an `=`, to denote that the left side is being modified
10:55:26Araqand then the single generic $ covers the convenience aspect
10:55:35Araqah
10:55:37Araqlol
10:55:42Araqwe already have &=
10:55:54FromDiscord<clyybber> yeah
10:55:59Araqwe could use it :-)
10:56:27FromDiscord<clyybber> inplace procs can not be parallellized
10:56:35FromDiscord<clyybber> though thats probably a theoretical issue
10:57:11FromGitter<Varriount> Wait, so are we talking about &= doing implicit string conversation (or rather, writing)?
10:57:43FromGitter<Varriount> `stringVal &= objectVal`?
10:58:06FromDiscord<clyybber> &=$ lol
10:58:08Araqwe're talking about how the unary $ is a bad building block
10:58:26Araqand figuring out simple and effective ways to deal with it
11:01:33FromDiscord<clyybber> If we have $=
11:02:09FromDiscord<clyybber> then we can automatically rewrite `a.add $b` to `a $= b`
11:02:55FromGitter<Varriount> clyyber: Sorta makes sense, though if you go with how other `=` operators work, that would be "set the left side the right side's stringified value"
11:03:45Araqah yeah $= vs &=
11:03:59AraqI think we should use 'toString'
11:04:00FromDiscord<clyybber> &= is worse because it already exists and simply appends
11:04:17Araqactually &= is a more abstract sink operation
11:04:24Araqthe idea is that you have
11:04:29FromDiscord<clyybber> $&= or &$= would be the most 'logical' but its also fing ugly
11:04:30Araq dest &= a
11:04:32Araq dest &= b
11:04:33Araq dest &= c
11:04:51Araqand you can switch between dest: string and dest: File easily
11:05:01Araqand dest: Socket
11:05:06FromGitter<Varriount> Araq: What about `writeString`? To signify that you are writing the string representation
11:05:07Araqbut I gotta go, bye
11:05:13FromDiscord<clyybber> bb
11:05:14FromGitter<Varriount> Bye
11:05:35dadadabye
11:05:44FromDiscord<clyybber> toString gives me java ptsd
11:08:23*u0_a121 joined #nim
11:08:23*u0_a121 quit (Read error: Connection reset by peer)
11:10:12FromGitter<Varriount> clyybber: As much as I dislike Java, you can't say that the method's weren't descriptive.
11:10:59FromDiscord<clyybber> yeah
11:11:34FromGitter<Varriount> As opposed to C, where it seems like the creators are/were aiming to keep functions under 8 characters
11:11:54FromDiscord<clyybber> you gotta look at ats
11:12:01FromGitter<Varriount> ats?
11:12:23FromDiscord<clyybber> https://github.com/githwxi/ATS-Postiats
11:16:37FromGitter<Varriount> Hm, looks interesting
11:16:56FromDiscord<clyybber> loook at it: http://ats-lang.sourceforge.net/LIBRARY/prelude/SATS/DOCUGEN/HTML/integer.html
11:18:57FromGitter<Varriount> C
11:20:22FromGitter<Varriount> I take it that the language doesn't have overloading?
11:21:46FromDiscord<clyybber> it actually does
11:22:01*abm joined #nim
11:26:28*skrylar[m] joined #nim
11:26:29skrylar[m]ATS seemed kind of neat but also quite complicated when i noodled around with it
11:27:53FromDiscord<clyybber> yeah
11:38:52dadadaany opinions on D here?
11:48:08dadadahas anyone here done work with graalvm?
11:48:16lqdev[m]dadada: it looks like an ok language, if a bit bloated.
11:49:23narimiranLast call!! Nim Community Survey 2019 will close in about 18 hours (Feb 11th, 6am UTC), now is your last chance to participate: https://nim-lang.org/blog/2019/12/20/community-survey-2019.html
11:52:52*krux02 joined #nim
11:56:58*dddddd joined #nim
12:01:22dadadagraalvm is almost revolutionary, it can glue together a huge number languages with native speed, if I'm not mistaken
12:01:34*Pqzcih5 quit (Remote host closed the connection)
12:01:42dadadait's language agnostic, I was oblivious to its details until today
12:02:10FromGitter<kristianmandrup> To test if a set has any elements, the only way I can see is using `mySet.len == 0` I think it would be nice to have a method `hasAny` for this typical case, as using `len` is too low level IMO
12:02:11FromDiscord<clyybber> not native speed
12:02:14FromDiscord<clyybber> but its pretty cool
12:02:37*marmotini_ joined #nim
12:02:39dadadaclyybber, what does hinder it from native speed, the garbage collector? and?
12:02:50FromDiscord<clyybber> the fact that its a VM 🙂
12:03:43FromDiscord<clyybber> the native AOT compilation also uses a simplified VM
12:04:06dadadayes, I understand that part
12:04:32dadadabut once its AOT code and it runs, it still runs inside a VM, cause I thought it was basically just a garbage collector at this point
12:04:37dadada?
12:06:04FromDiscord<clyybber> hmm, yeah. I think they are getting rid of VM like parts as much as possible
12:06:32dadadahmm... I'll definitely investigate this further
12:06:44dadadait can interact with llvm compiled c code
12:06:56dadadaso wouldn't that mean Nim is covered?
12:07:03FromDiscord<clyybber> oh
12:07:11FromDiscord<clyybber> I havent tried it, but it would be great
12:07:23dadadahttps://www.graalvm.org/docs/getting-started/
12:07:32dadada"GraalVM is a standalone Java Development Kit to execute Java or JVM-based languages (e.g. Scala, Kotlin), dynamic languages (e.g. JavaScript, R, Ruby, R, Python), LLVM-based languages (e.g. C and C++) in one shared runtime, and supports Linux, macOS and Windows platforms on x86 64-bit
12:07:53dadada"
12:07:57*fanta1 joined #nim
12:10:35*u0_a121 joined #nim
12:11:02dadadaI like the direction this is going in, I always disliked the separate ecosystems of c/c++/java/python/ruby/kotlin/php/whatever, not that I have a problem with many ecosystem the issue I have is with their insular nature, if graalvm is further developed, and gets support for more and more languages/better tooling then maybe this will be a gripe I can put to rest finally
12:11:12dadadaand I also always disliked the JVM a lot
12:11:23dadadanow libreoffice should run without it
12:12:30dadadabeing thankful for something that came out of oracle is kinda weird, I guess they have some great FOSS minded devs though
12:12:33FromDiscord<clyybber> I should try compiling java to native
12:12:41FromDiscord<clyybber> s / java / minecraft
12:13:18dadadado so, I'd like to get your verdict on it
12:14:01livcddadada: i dont think graalvm will be usable anytime soon for existing projects
12:14:25dadadalivcd: what's the matter?
12:14:26FromDiscord<clyybber> dadada: Do you know truffle?
12:14:33FromDiscord<clyybber> truffle and graal together are pretty amazing
12:15:32dadadaclyybber: read about it on wikipedia, and thought the same... it depends on the details of it, but I endorse all ideas of graalvm/truffle
12:15:37dadadathat I know of so far
12:15:38livcddadada: afaik graalvm does not work for java projects that heavily rely on reflection
12:16:15*theelous3 joined #nim
12:17:19dadadalivcd: "Substrate VM has partial support for reflection and it needs to know ahead of time the reflectively accessed program elements." you're right
12:17:23FromDiscord<clyybber> dadada: The details are spot on. A naive lua implementation I made a year or so ago ran about twice to thrice as fast as lua
12:17:49FromDiscord<clyybber> luajit is still magnitudes faster, but luajit is built with black magic
12:18:12dadadaclyybber, I think lua isn't known as particularly fast (might be mistaken), aside from that it's a really cool result
12:18:45dadadaI see, well for a naive implementation, as you say, that's really exciting
12:18:47FromDiscord<clyybber> dadada: LuaJit is known as particularily fast
12:18:49FromDiscord<Rika> luajit is absolute black magic
12:18:54FromDiscord<Rika> the creator is a time traveler
12:19:06FromDiscord<clyybber> dadada: Its faster than v8
12:19:19FromDiscord<clyybber> sadly it is in maintenance mode rn
12:19:34dadadaclyybber, Rika, clyybber first referred to lua, not luajit
12:20:08dadadaand good to know about the blackmagic luajit, thanks for filling me in
12:21:16livcdfor other languages you have a big obstacle as well
12:21:23livcdeg. ruby
12:21:45livcdideally you would take any C extension off the bat and it would automagically work
12:22:26FromDiscord<clyybber> I can only dream of luajit with https://github.com/LuaJIT/LuaJIT/issues/37 implemented
12:22:27disbotAdd Hyperblock Scheduling
12:23:53livcdi think the biggest problem is that this is an Oracle project
12:24:13dadadait did came to my mind
12:25:17livcdbut is actually luajit still faster than v8 ?
12:26:17*solitudesf joined #nim
12:26:50dadada"
12:26:59dadada"GraalVM provides a framework for creating language-agnostic tools like debuggers, profilers, or other instrumentations. In general, GraalVM provides a standardized way to express and run program code enabling cross-language research and the development of tools that are developed once and then can be applied to any language."
12:27:34FromDiscord<Rika> dadada, i never said anything about referencing your message
12:28:33dadadaI like that mission statement, even if Oracle is pushing it (who I despise for obvious reasons), if they're serious about this, there must be some good folks inside Oracle that have pushed for graalvm...
12:31:14FromDiscord<clyybber> livcd: Yeah
12:31:53livcdclyybber: my google fu is failing me
12:33:31*Hideki_ joined #nim
12:36:02*hinst quit (Ping timeout: 240 seconds)
12:36:53krux02dadada, I just started listening to the talk of graalvm and what problem it tries to solve.
12:37:11FromDiscord<clyybber> livcd: Try searching luajit vs v8
12:37:14dadadakrux02: link?
12:37:31krux02here this slide: https://youtu.be/oWX2tpIO4Yc?t=345
12:37:49krux02"current situation" and "how it should be" comparison.
12:38:00krux02That situation isn't true for Nim.
12:38:04FromDiscord<clyybber> @timotheecour Somehow your fix broke my code https://github.com/nim-lang/Nim/commit/79ec8c257183e01c01811a34e3930de7814756fb
12:38:22krux02nor is the "How it should be" desireable for Nim.
12:38:30krux02we don't want to prototype in Java
12:38:42FromGitter<Clyybber> @timotheecour Heres the issue: https://github.com/nim-lang/Nim/issues/13378
12:38:44disbotInternal error in getTypeDescAux ; snippet at 12https://play.nim-lang.org/#ix=2bj0
12:38:56dadadalivcd: the enterprise edition claims to include "Improved performance and security over GraalVM Community" https://www.graalvm.org/docs/faq/ ... so yes, one has to be careful before committing to an Oracle stack
12:39:00krux02Nim was compiled to C from the beginning
12:39:15FromGitter<Clyybber> Just goes to show that the bad magic that powers sigmatch shall never be touched or interacted with
12:39:16FromGitter<Clyybber> lol
12:39:39krux02and it was designed to be fast from the beginng
12:40:03krux02so we don't need to spend 100s of millions to get it fast as an afterthought (whitch doesn't work btw)
12:40:22krux02one could argue that the nimvm is a bit slow
12:42:25*endragor quit (Remote host closed the connection)
12:42:43dadadakrux02: for me the interesting thing about graalvm is 1) should I not be using nim for some reason and need java for some reason I may get better performance and there's no need for the JVM anymore 2) as nim is compiled to C, and graalvm can natively interact with that it makes an efficient glue between Nim code and Java/Kotlin/Scala/... possible, should I ever need a library from the java world, or vice versa
12:42:49FromDiscord<Rika> but nimvm isnt too critical is it? its mostly used at compiletime
12:43:21dadadakrux02: the nim code itself would continue to use its own memory management and not be hampered by graalvm
12:43:44*lritter quit (Quit: Leaving)
12:46:09krux02Well, personally I would throuw out the nim gc and replace it with a generic solution if I can, because developing a super awesome gc isn't the strength of nim.
12:46:28krux02the strength is to have the right abstractions for a language.
12:46:50krux02and what I've seen so far on the JVM is that all JVM languages basically have the same abstractions.
12:46:54FromDiscord<clyybber> thats what newruntime / gcarc is doing
12:47:11krux02or they build on top of JVM abstractions.
12:47:55krux02so java will always be the fastest language on the jvm and it is alwas a question of being not slower than java.
12:48:06krux02But java doesn't allow value types
12:48:13dadadakrux02: graalvm throws away the jvm, if I understand it correctly, you can't really call them jvm languages anymore once you migrate them to graalvm
12:48:14krux02it doesn't allow arrays of structs
12:48:37krux02well I didn't dig into the atoms of graalvm yet.
12:48:43krux02I thik I will do it
12:49:38krux02but my complaint here is, if you have a framework for developing new languges that provides you already with everything you need, then all the lanugages that you create tend to work the same, they just look a bit different.
12:49:42dadada"LLVM-based languages are fully supported via the LLVM bitcode execution environment."
12:49:58krux02It is a bit like those unity games. They all are kind of similar
12:50:04dadadaI get you!
12:50:27dadadabut you can make the argument for the target architecture x86 as well, everything that targets x86 in the end will hit the same walls
12:50:48*hinst joined #nim
12:50:49dadadaby that argument any sort of abstraction is bad, hopefully I've not oversimplified or misunderstood your argument
12:51:23krux02yes
12:51:39dadadanim can't go beyong the limits of C because it compiles to it
12:51:52dadadaC can't go beyond the limits of x86 machine code because it compiles to it
12:52:17dadadagraalvm integrates seemlessly with llvm compiled (i.e. C) machine code
12:52:37dadadaso there should really no be difference of performance when Nim is compiled for the graalvm runtime
12:52:55dadadaat least not a huge one
12:53:02FromDiscord<clyybber> I wonder if I can build a program in graal and call it from the JVM
12:53:25dadadalet me qualify this with: this is a conclusion with a lot of assumption and a limit amount of research
12:53:28dadada:D
12:53:34dadadaassumptions
12:54:16dadadaclyybber, call as in?
12:55:12FromDiscord<clyybber> call as in use
12:55:24FromDiscord<clyybber> for writing stuff in nim and calling it from java
12:56:45dadadadepends on what you mean, for best performance you'd have to recompile the formerly JVM stuff for graalvm first, then it might work
12:57:29dadadayou can even call nim code from java now, because there's JNI, you extern c from nim, and then you call from java with JNI
12:57:44dadadabut that's a slower bridge
12:58:00dadadaand as I understand it, with graalvm you get something better than JNI, with native speed
12:58:32dadadaI must stop myself, I need to dig into this, before I sputter any half-truths ;D
12:59:37FromDiscord<clyybber> hmm, cool
12:59:44dadadafinally, I agree with livcd, Oracle is the biggest downside I can see here
12:59:55FromDiscord<clyybber> I mean imagine making minecraft mods using nim, pure bliss of nostalgia and everything
13:00:08dadada:D
13:00:31FromDiscord<clyybber> Araq: ping
13:05:06*dddddd quit (Ping timeout: 268 seconds)
13:06:15krux02dadada, sorry got a phone call
13:06:44krux02regarding the target architecture x86
13:06:55*abm quit (Ping timeout: 272 seconds)
13:07:19krux02I don't think that this is a problem, since a programming language is executed most likely on x86, and if it isn't executed there, it is Arm
13:07:49krux02I even think a language should be as close the the target platform as possible
13:08:12krux02otherwise it isn't possible to use the target platform efficiently (see Jvm)
13:08:53FromDiscord<clyybber> krux02: You are probably a bit more well-versed with that part of the compiler, whats the essential difference between semTryExpr and semExpr?
13:09:03krux02but for other platforms, such as GPUs or FPGAs new languages should exist.
13:09:17krux02clyybber: I don't know
13:09:46krux02probably semExpr is general, and semTryExpr is for nkTry
13:10:43FromDiscord<clyybber> alright, thanks. I'll dig into it then
13:10:46federico3krux02: FPGAs are not computing platforms in themselves
13:11:00krux02federico3, for me they are.
13:11:13krux02they just work fundamentally different than CPUs
13:11:57*dddddd joined #nim
13:12:38federico3...
13:13:25krux02federico3, why is an FPGA not a coputing platform for you?
13:13:54krux02you can program an FPGA to becoma a CPU
13:14:08krux02but you can also program a CPU to emulate another CPU
13:15:47*vesper11 quit (Ping timeout: 272 seconds)
13:15:53*vesper joined #nim
13:17:52*dddddd_ joined #nim
13:18:17federico3or you can program many other logic blocks that do not implement a CPU
13:19:33FromGitter<alehander92> dadada i wanred to do something like this but not without
13:19:37FromGitter<alehander92> but not with nim*
13:19:57FromGitter<alehander92> krux02 i'd write my thing in nim dsl agreed
13:20:15FromGitter<alehander92> but i'd say such toolkits are good for prototyping
13:20:27*dddddd quit (Ping timeout: 240 seconds)
13:20:30FromGitter<alehander92> languages: stuff like semanthics, unusual features, type systems
13:20:35*dddddd_ is now known as dddddd
13:20:37FromGitter<alehander92> syntax experiments
13:21:01*Vladar quit (Quit: Leaving)
13:21:46FromGitter<alehander92> a motivation is that there is a lot of tooling stuff and architecture
13:21:51FromGitter<alehander92> that you dont need to reinvent
13:21:57dadadaalehander92: I love good tooling
13:22:01FromGitter<alehander92> e.g. if you structure your lang/codebase
13:22:07FromGitter<alehander92> in the right way from the start
13:22:47FromGitter<alehander92> you can get stuff like incremental compilation, parallel compiling modules, repl hooks, lang server etc much more easily
13:22:58*muffindrake joined #nim
13:23:06FromGitter<alehander92> or even automatically (of course, * if you reuse a framework/lib)
13:23:50FromGitter<alehander92> of course, people think their language needs something very custom, but thats always possible
13:24:05FromGitter<alehander92> and usually its better to somehow reuse cool tooling across languages
13:24:38*hinst quit (Remote host closed the connection)
13:24:49FromGitter<alehander92> krux02 i dont agree with this argument
13:25:20FromGitter<alehander92> such a framework can give you some libs/dsl-s/conventions/"language" to make it more easier to write language passes
13:25:23*Hideki_ quit (Remote host closed the connection)
13:25:47FromGitter<alehander92> e.g. a type relation dsl, a convention that forces you to process your modules in a way that can be cached/parallelized
13:25:52FromGitter<alehander92> etc
13:26:58*hinst joined #nim
13:30:22krux02alehander92, I think you can only get really good language interop, when you have a compatible types system.
13:30:23*u0_a121 quit (Read error: Connection reset by peer)
13:30:36krux02I am still reading about graalvm
13:30:48krux02but I wouldn't be surprised if they have such a thing.
13:33:59*rockcavera joined #nim
13:40:43*Kaivo joined #nim
13:56:02*Hideki_ joined #nim
14:00:26*Hideki_ quit (Ping timeout: 240 seconds)
14:02:31*u0_a121 joined #nim
14:05:39FromGitter<alehander92> i dont really focus on interop between languages built with the same toolkit
14:05:44FromGitter<alehander92> even the opposite
14:06:15FromGitter<alehander92> my idea would be to experiment with totally different systems/effects etc
14:07:38*marmotini_ quit (Ping timeout: 240 seconds)
14:11:19*Hideki_ joined #nim
14:15:57*dadada quit (Ping timeout: 272 seconds)
14:16:54*dadada joined #nim
14:17:18*dadada is now known as Guest6361
14:19:41FromGitter<alehander92> i would make dsl-s to make it easier to codegen for existing backends
14:20:16FromGitter<alehander92> and one can make it easier to somehow map stuff from targets to source language concepts
14:20:41FromGitter<alehander92> (to put a ffi/importc mechanism on top)
14:23:24*marmotini_ joined #nim
14:27:43*fanta1 quit (Quit: fanta1)
14:28:06*Hideki_ quit (Remote host closed the connection)
14:28:53*Hideki_ joined #nim
14:33:35*Hideki_ quit (Ping timeout: 260 seconds)
14:36:27*u0_a121 quit (Read error: Connection reset by peer)
14:41:33*drewr quit (Ping timeout: 245 seconds)
14:44:19ZevvHow do I format a time.Duration to MM:SS?
14:44:33*u0_a121 joined #nim
14:45:15*hax-scramper quit (Ping timeout: 260 seconds)
14:46:57*theelous3_ joined #nim
14:54:32*Guest6361 is now known as dadada
14:55:01dadadaalehander92: 100% support making things easier, where do you think all of this will end though?
14:55:41dadadaI think that IT-Adminstration being much of a challenge will be seen as a thing of the past in maybe 30-40 years
14:56:13dadadaas well as many programming tasks that are still considered costly/time consuming today
14:56:28FromGitter<alehander92> dadada yeah
14:56:47FromGitter<alehander92> i think more people would have "average" programming skill
14:56:51dadadanow you hear people claim that IT is a secure future, as opposed to manufacturing jobs, which is true for now! for now!
14:56:55FromGitter<alehander92> and the domain knowledge would start to matter more
14:57:10dadadaultimatively even for software there's a point where things get mostly good enough
14:57:13dadadaand what then?
14:57:30FromGitter<alehander92> e.g. if so many people can program to a X level , its better to hire people with very good domain knowledge in your domain
14:58:18dadadaon domains, for example auto insurance will largely go away, as self-driving mobility (cars/trains/buses) with sensors and compute power that will exist in 20 years
14:58:24FromGitter<alehander92> well, there will be still need of custom systems, more "low level"/"frameworks which all the other people use" experts
14:58:32FromGitter<alehander92> and legacy maintenance
14:58:49FromGitter<alehander92> yeah but e.g. about the justice stuff
14:59:09FromGitter<alehander92> many people think smart contract writing can replace many lawyers..
14:59:12dadadawill not cause 1/100th of the $ in accidents, so insurance will largely go away, so will many of the jobs
14:59:21FromGitter<alehander92> but you'll just get lawyers which can write code well
14:59:23FromGitter<alehander92> thats my point
14:59:54dadadahmm, I'll never higher a lawyer unless I'd have to
15:00:07dadadaas will no one else
15:00:10FromGitter<alehander92> i would hope so, but do you think we will have actual self driving in 20 years
15:00:16FromGitter<alehander92> i think only on special roads
15:00:34dadadait's one of my main interests, and I can tell you with the sensor technology that's coming up now
15:00:41FromGitter<alehander92> dadada law is very similar to programming in a way imo
15:00:58dadadait will happen much much quicker, in 5 years we'll have really good self-driving, even if it's not allowed by regulation
15:01:21FromGitter<alehander92> you have a a hierarchy of rules and programs based on it
15:01:29FromDiscord<clyybber> alehander92: Depends on what country
15:01:32FromGitter<alehander92> dadada yeah but regulation is everything
15:01:38FromDiscord<clyybber> also law is interpreted
15:01:43FromGitter<alehander92> clyybber because of common law?
15:02:02FromGitter<alehander92> dadada and even 50x less deaths would still result in much more outrage imo
15:02:14FromDiscord<clyybber> alehander92: I mean like, its interpreted by a NFA
15:02:16dadadaalehander92: not everything, it can even save money before it's legal, while the driver monitors the system, the system doesn't crash, thus lowering insurance costs
15:02:50dadadaalehander92: there will be enough lobbyists (rightfully) explaining what statistics is
15:03:24FromGitter<alehander92> clyybber what is a NFA
15:03:43FromGitter<alehander92> dadada i really dont like this tesla idea of "monitoring" the vehicle
15:03:53FromGitter<alehander92> it flies in the face of how humans work and basic safety
15:04:03FromDiscord<clyybber> non deterministic finite automaton
15:04:20FromGitter<alehander92> if stuff doesnt depend on you, you are not so focused
15:04:22FromDiscord<clyybber> have good lawyers -> be allowed to do shit
15:04:30FromGitter<alehander92> and often 0.5 seconds are needed for a reaction
15:04:48FromGitter<alehander92> clyybber ahhh i wondered if its it
15:05:02FromGitter<alehander92> yeah but this is like a side effect
15:05:16dadadalook how easy it has become for people to setup a website to day (ie. squarespace) in two decades the world will change to such a degree, that I don't think there'll be many safe jobs left, you'll have to constantly adapt, the time where you learned one thing and used that forever are just over
15:05:21FromGitter<alehander92> basically the point is that at least a subset of it like smart contract automatable stuff is common
15:05:25FromGitter<alehander92> and the way of thinking
15:05:41*drewr joined #nim
15:05:45FromGitter<alehander92> dadada yeah the automation scare
15:05:48FromGitter<alehander92> but think about it
15:06:11FromGitter<alehander92> when this happens, the tech itself would become so multi-layered and full of stuff
15:06:19FromGitter<alehander92> that you would have whole new "industries"
15:06:20dadadaalehander92: the car should warn you before you need to react, also the statistics already look pretty good for Tesla with a nice trend, too
15:06:23FromGitter<alehander92> like e.g. the wordpress people
15:06:40FromGitter<alehander92> youtube tutorial people and all kinds of similar stuff
15:07:05FromGitter<alehander92> dadada ehh.. it just doesnt sound good for non-professional driver
15:07:06dadadayeah, but who pays money to read a blog, or to watch a tutorial?
15:07:11FromGitter<alehander92> people literally fall asleep
15:07:14*Hideki_ joined #nim
15:07:14FromGitter<alehander92> behind tesla-s
15:07:19dadadamost people are freeloaders
15:07:22FromGitter<alehander92> its obvious this doesnt work well as a concept
15:07:25dadadawhen they can be
15:07:59FromGitter<alehander92> dadada well it sucks
15:08:01dadadaalehander2: there's camera in the model three that should be able to detect people that fall asleep and then make the car stop, they need to implement it, but the hardware is there
15:08:07FromGitter<alehander92> to put everything behind a paywall
15:08:24FromGitter<alehander92> and the fact is that people get paid for this stuff
15:08:41FromGitter<alehander92> currently from clients/ads but even these days there are various models
15:08:49FromDiscord<clyybber> what would really be needed is some way that cars communicate with each other
15:08:52dadadaI bet 99% of people on youtube don't make money from it (not more than cents
15:08:53dadada)
15:09:10dadadaand we can't all become YouTubers by any stretch of the imagination
15:09:10dadada:D
15:09:12FromGitter<alehander92> yeah, but the fact you already have like x% that do ..
15:09:17FromGitter<alehander92> is still interesting
15:09:22FromGitter<alehander92> not everyone would be that
15:09:28FromGitter<alehander92> but its just a silly example
15:09:32dadadaclyybber: they're working on some standards for v2v communcation
15:09:39FromDiscord<clyybber> nice
15:09:47FromGitter<alehander92> you would maintain stuff for the configuration of local autofood drones
15:10:00*hax-scramper joined #nim
15:10:08dadadaalehander92: in the beginning definitely
15:10:14FromGitter<alehander92> you would process data for machine datasets
15:10:16FromGitter<alehander92> and all kinds of stuff
15:10:25*theelous3_ quit (Ping timeout: 272 seconds)
15:10:27FromGitter<alehander92> clyybber i think this would work well on special roads indeed
15:10:32dadadaokay, maybe we could do that
15:10:36FromGitter<alehander92> just that they shouldnt be mixed
15:10:50FromGitter<alehander92> and the week might get shorter
15:10:51FromDiscord<clyybber> otoh I could imagine some corp selling different safety-tiers, and depending on which you have you are more or less likely to be sacrificed during a crash
15:10:52FromGitter<alehander92> like 6 hours
15:10:54*theelous3 quit (Ping timeout: 268 seconds)
15:11:09FromGitter<alehander92> and more time for other stuff like teaching other skills etc which bceomes more popular
15:11:20FromGitter<alehander92> clyybber yeah the ethics aspects are still scary
15:11:43disruptekclyybber: it's more important to recognize that the optimization is one of many that are enabled by nim's cfg and arc.
15:11:59FromDiscord<clyybber> disruptek: Yeah
15:12:04FromDiscord<clyybber> also hi
15:12:08disrupteksup dawg
15:12:21dadadaalehander92: https://www.youtube.com/watch?v=oK5_lRTUato I don't want to advertise for Tesla, but this is a nice video to see where their tech is at now, and they only use like 1/20th of the processing power of their ai accelerator, don't make full use of their input data yet, and the software isn't fully optimized either
15:12:56FromDiscord<clyybber> disruptek: U managed to get ryu a bit further?
15:13:11narimiran"in 5 years we'll have really good self-driving". yep, people said that back in 2015, too.
15:13:13dadadaconsidering all of this, it's impressive, and the other big OEMs will either catch up, are close behind, or possibly even leading (waymo), also it's much better compared to 2-3 years ago
15:13:29FromGitter<alehander92> tesla's tech seems very good, i am just saying that i still think it would be best for everyone to have roads optimized for that (with enforced car communication like clyybber said) etc, it just requires general AGI for all roads
15:13:34FromGitter<alehander92> and this is impossible
15:13:53dadadaworldwide standardized roads would be great, definitely
15:13:54disrupteki have to go through and fix all the hax that abuse bitops.
15:14:12FromGitter<alehander92> and we would have to fix bit stops on the roads
15:14:26disruptekeven when they are supported by nim, it's the wrong semantics.
15:14:36FromGitter<alehander92> indeed, i would expect a start sign
15:14:37FromDiscord<clyybber> in which cases?
15:14:57dadadaalehander92: my main point remains what do we (as a society) do when everything that used to be require a set of specialists, is either encoded in software or getting solved by highly complex specialist machines like 3d printers
15:15:00disruptekthe way we decode float into mantissa/exponent.
15:15:15dadadaalehander92: the assumption is that there'll always be enough industries to fill the voids
15:15:56FromGitter<alehander92> dadada yeah then you get more specialists for this stuff
15:16:07dadadaalehander92: but I doubt that we can make an accurate prediction that there'll be the next upcoming industry... how many needs do human beings even have?
15:16:11FromGitter<alehander92> and the fact that you automate stuff .. just means that programmers start to matter LESS
15:16:14FromDiscord<clyybber> disruptek: I'm worried that if we make one mistake in translation, and fix it later, its gonna get worse and worse
15:16:17FromGitter<alehander92> and domain experts start to matter MORE
15:16:19FromGitter<alehander92> imho
15:16:29disruptekwhat?
15:16:32FromGitter<alehander92> because now its more important what to do
15:16:33FromDiscord<clyybber> disruptek: Or do you know exactly where the behaviour differs?
15:16:58disruptekthe point is that i don't want to rely upon UB.
15:17:10dadadaalehander92: how many domain experts does the world need?
15:17:15FromDiscord<clyybber> could you point me somewhere?
15:17:17disruptekwe may overlook a case today, which is fine; it can be fixed tomorrow.
15:17:28FromGitter<alehander92> dadada well all of them?
15:17:34FromGitter<alehander92> the whole point of the automation is to make it easier
15:17:44FromGitter<alehander92> for other people to "configure" stuff to do what they need
15:17:47disrupteksure, lemme find where my code fucked off to.
15:17:49FromGitter<alehander92> and to have it
15:18:00FromGitter<alehander92> if the systems are good enough
15:18:11FromGitter<alehander92> you only need to provide the actual rules or good data
15:18:22FromGitter<alehander92> and both of them are more a domain-related thing
15:18:56FromDiscord<clyybber> while I like automation, I don't like complicated stuff being automated with even more complex stuff
15:19:12disruptekclyybber: do a pull and then see f2s.nim block at 450.
15:19:18FromDiscord<clyybber> aight
15:19:34disruptekwe're just making a mask, but it relies upon rollover.
15:20:17disruptekeven the debug stuff above should be rewritten. but whatever.
15:20:34disrupteki mean, we want this c code to be rewritten in nim. it has to be done.
15:21:01disruptekit'll be fine. just not something i wanted to jump into at 11p. 😉
15:21:05FromDiscord<clyybber> how is it UB tho?
15:21:38FromGitter<alehander92> disruptek
15:21:40FromGitter<alehander92> what debug stuff
15:21:57disrupteksome stuff in this ryu port.
15:22:03disruptek!repo disruptek/ryu
15:22:04disbothttps://github.com/disruptek/ryu -- 9ryu: 11ryu for nim 15 4⭐ 0🍴
15:22:34disruptekyou want to rely upon rollover when you don't have to?
15:23:23disrupteki just want to have a mask and say, "here, what matches?"
15:23:58FromDiscord<clyybber> wdym with rollover?
15:24:03disruptekoverflow
15:24:12FromDiscord<clyybber> in the addition?
15:24:21*Hideki_ quit (Ping timeout: 272 seconds)
15:24:46FromDiscord<clyybber> there: `ryuFloatMantissaBits + ryuFloatExponentBits` ?
15:25:22disruptekwe make a mask by shifting a 1 past the "edge" of the variable and then subtracting 1, which yields 0b11111111111... to the size of the integer.
15:26:22FromDiscord<Rika> ryu is the floating point printer right?
15:26:31FromDiscord<clyybber> yeah
15:26:32FromDiscord<Rika> amazing
15:26:33disrupteki believe differing behavior there is giving us overlarge exponents.
15:26:58FromDiscord<clyybber> huh
15:27:10FromDiscord<clyybber> we should see what C code it generates
15:27:11disruptekit's basically a hack, imo. as trivial as it is. and one i've done many, many, many times in my c career. but this isn't c.
15:27:50disruptekit generates x & ((1 << 23) - 1) or whatever.
15:28:08disruptekit generates x & (0b10000000000000000 - 1) or whatever.
15:28:18disruptekit generates x & 0b111111111111 or whatever.
15:28:24disruptekyou see?
15:29:28FromDiscord<clyybber> ah
15:30:36disruptekjust like krux was saying, i chose nim for its abstractions.
15:30:54disrupteksure, i want the underlying binary compat, but i'm here for the abstraction.
15:31:25FromDiscord<clyybber> yeah, I'm just wondering how there can be a difference
15:31:42disrupteki never want to learn the answer to that question.
15:31:48FromDiscord<clyybber> is ryuFloatMantissaBits and the like a int in ryu too?
15:31:58FromDiscord<clyybber> or is it a uint there?
15:32:14disruptekit's an int literal.
15:32:45*nsf quit (Quit: WeeChat 2.7)
15:32:50FromDiscord<clyybber> ah, so maybe its all fixed when we make it an uint
15:33:29FromDiscord<clyybber> I feel like we should first make it work and then make it beautiful and make it take advantage of nim
15:33:35disruptekno, that doesn't matter. it's just an arg to shift.
15:33:54FromDiscord<clyybber> oh, yeah
15:34:56disruptekit should work today. the 128bit stuff might take a little longer. i looked at it and it should work for us, but i'm not 100%.
15:35:10FromGitter<alehander92> so are we doing the podcast thing
15:36:46FromDiscord<clyybber> disruptek: Nice, though I have to confess that I don't get where 128bit is needed
15:37:07FromDiscord<clyybber> looking at ryu I can only see that its needed for 128bit float to string
15:37:17FromDiscord<clyybber> aaaah
15:37:20FromDiscord<clyybber> umul
15:37:21FromDiscord<clyybber> there it is
15:39:53*ftsf quit (Ping timeout: 268 seconds)
15:47:07*Zectbumo quit (Remote host closed the connection)
15:52:27*u0_a121 quit (Read error: Connection reset by peer)
16:04:43*ptdel joined #nim
16:04:44*u0_a121 joined #nim
16:06:07*fanta1 joined #nim
16:15:00disrupteki see the future.
16:15:31*tane joined #nim
16:15:48FromDiscord<clyybber> oh you do?
16:15:52FromDiscord<clyybber> show me
16:16:21disrupteki the future, not the past.
16:16:27disruptek^ see
16:16:28FromGitter<kristianmandrup> Hey @alehander92 :) What podcast?
16:18:58disrupteki just see it like i'm looking at a photograph.
16:19:04*luis_ joined #nim
16:20:09FromDiscord<clyybber> I hoped you saw it like you are looking at a passing test of ryu
16:20:42FromGitter<alehander92> @kristianmandrup hey
16:21:19FromGitter<alehander92> irc
16:21:21*Vladar joined #nim
16:21:29FromGitter<alehander92> and discord and gitter are bridged together here
16:21:35disruptekkinky
16:22:17FromGitter<alehander92> so yeah i still dont think you need to generate types for the javascript backend
16:22:47FromGitter<alehander92> but this is very subjective so i hope other people comment on the issue?
16:23:13FromGitter<alehander92> otherwise the podcast idea is to just make a #nim (or just language) podcast eventually
16:23:30FromGitter<alehander92> but its totally unprofressinal just-an-idea
16:25:05*tane quit (Quit: Leaving)
16:32:02*hax-scramper quit (Ping timeout: 240 seconds)
16:32:41*chemist69 quit (Ping timeout: 246 seconds)
16:33:58*chemist69 joined #nim
16:34:05*muffindrake quit (Ping timeout: 246 seconds)
16:35:09FromGitter<alehander92> disruptek is this
16:35:12FromGitter<alehander92> nickelbad
16:35:16FromGitter<alehander92> nickelback*
16:35:25FromGitter<alehander92> genuinely like them i just ok.
16:35:46*muffindrake joined #nim
16:35:51FromGitter<deech> Asked last night but, are there any examples that use the compiler as a library that do static analysis on Nim code after typechecking not just on the AST.
16:36:26disruptekalehander: nah, it's suntree.
16:36:41FromGitter<kristianmandrup> Podcast anyone?
16:36:45leorize@deech: probably not
16:36:47disruptekdeech: i would just write a useful test suite.
16:37:31FromGitter<deech> leorize, don't mind being the first do you see any reason it couldn't be done with the compiler API?
16:38:10leorizeI'm not the best person to ask about this :p
16:39:50FromGitter<kristianmandrup> @alehander92 How do I define a HashMap (table?) in a type def? ie. I'd like a collection `outputFiles` as a map of `TFile` keyed by name
16:40:15FromGitter<kristianmandrup> `ref Table[A, B]` ??
16:40:24disruptekTableRef[A, B]
16:40:33FromGitter<kristianmandrup> oh :O
16:41:09FromGitter<Clyybber> @timotheecour ping
16:42:02FromGitter<kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e4187da1d23aa47aa06b244]
16:42:58FromGitter<kristianmandrup> Anyone knows where in the Nim code base, the actual output file write to disk takes place?
16:43:22leorizedepends on the backend
16:43:43FromGitter<kristianmandrup> Found this for `jsgen` ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e41883f45000661fcb101ba]
16:44:08FromGitter<kristianmandrup> Does that look right? - Still not sure what the `Rope` thing means though
16:44:47leorizerope is a kind of string that can be concatenated with efficiency of O(1)
16:45:51FromGitter<kristianmandrup> okay, clever :) rope is a better string
16:46:07leorizefor use case of the compiler, yes :)
16:46:13disruptekjust different and use-cases are kinda esoteric.
16:46:18FromGitter<kristianmandrup> Does `wholeCode` then generate the full source code to be written to file?
16:46:34disruptekmost people who think they need ropes are wrong.
16:46:55FromGitter<kristianmandrup> rope to hang yourself, string to tie your shoe :P
16:47:14disruptekyep.
16:47:33leorizedisruptek: how's your ryu port going?
16:47:50disruptekima work on it once these edibles kick in.
16:51:39FromDiscord<clyybber> call me crazy, but I don't exactly love it when the compiler spews those link messages out by default
16:51:44FromDiscord<clyybber> they get pretty big
16:54:19*floppydh quit (Quit: WeeChat 2.7)
16:54:37disruptek~motd is if you make $50/hr and work a 40hr week, you cost (someone) $2,000. For the same amount of money, you can run 238 servers at $0.05/hr, 24/7. Can you create more value than that for $2,000/wk?
16:54:37disbotmotd: 11if you make $50/hr and work a 40hr week, you cost (someone) $2,000. For the same amount of money, you can run 238 servers at $0.05/hr, 24/7. Can you create more value than that for $2,000/wk?
16:55:02*marmotini_ quit (Remote host closed the connection)
16:55:37*marmotini_ joined #nim
16:56:04jkendisruptek, would that not be comparing apples to oranges? People can't speak TCP, servers can't write and debug code.
16:56:18FromGitter<kristianmandrup> What does this do?
16:56:25FromGitter<kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e418b38ecfa4461c050523a]
16:56:29disruptekthe point is, we've long since passed the point where computers are cheap enough.
16:56:35FromGitter<kristianmandrup> Where
16:56:38FromGitter<kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e418b46c900d747abf7a714]
16:56:42disruptekall we have left are problems we can't figure out how to ask a computer.
16:56:50disruptekor a cloud of computers.
16:58:01disruptekmaybe it's time to stop saying that an algorithm is impossible because we cannot enumerate all the solutions.
16:58:23*Trustable joined #nim
16:58:35leorize@kristianmandrup see ModuleGraph definition
16:58:52FromGitter<kristianmandrup> what does `PGlobals(graph.backend)` do? I've not seen this syntax before. Dynamic lookup in object?
16:59:06leorizeit's just conversion
16:59:21leorizegraph.backend is a RootRef, used to store backend-specific data
16:59:33FromGitter<kristianmandrup> ` ModuleGraph* = ref object`
16:59:35leorizePGlobals is what stored by the jsgen
17:00:44FromGitter<kristianmandrup> I see, basic type conversion, down casting
17:01:28FromGitter<kristianmandrup> Collected ropes (by compiler) to be output in a given order ⏎ ⏎ ```PGlobals = ref object of RootObj ⏎ typeInfo, constants, code: Rope``` [https://gitter.im/nim-lang/Nim?at=5e418c6845000661fcb11124]
17:01:53FromGitter<kristianmandrup> So I assume
17:02:34FromGitter<kristianmandrup> ```template line(p: PProc, added: string) = ⏎ p.body.add(indentLine(p, rope(added)))``` ⏎ ⏎ Makes each entry added to `body` available to the globals `code` somehow!? [https://gitter.im/nim-lang/Nim?at=5e418caa340a8019bbb38caf]
17:03:29FromGitter<kristianmandrup> Aha
17:03:32FromGitter<kristianmandrup> ```proc attachProc(p: PProc; content: Rope; s: PSym) = ⏎ p.g.code.add(content)``` [https://gitter.im/nim-lang/Nim?at=5e418ce4df1153705e283396]
17:05:00FromGitter<kristianmandrup> ``` genModule(p, n) ⏎ p.g.code.add(p.locals) ⏎ p.g.code.add(p.body)``` [https://gitter.im/nim-lang/Nim?at=5e418d3c19597421f3be7a50]
17:05:41FromGitter<kristianmandrup> Starting to make a tiny bit of sense... wish there was some kind of docs or high level architecture map ;)
17:06:47FromGitter<deech> Need a `libclang` for Nim. :)
17:12:03*marmotini_ quit (Remote host closed the connection)
17:13:26*hax-scramper joined #nim
17:19:12FromGitter<kristianmandrup> Anyone knows where the `nim` binary parses the CLI options and `nim.cfg` options etc?
17:19:38Araqcmdlinehelper.nim
17:20:19disruptekwe really have to do something about gitter pastes.
17:20:39disrupteki guess i will make the bot do that.
17:22:35FromGitter<kristianmandrup> ah, I found `proc processCmdLine(pass: TCmdLinePass, cmd: string; config: ConfigRef) =` in `nim.nim`
17:25:57*hax-scramper quit (Ping timeout: 272 seconds)
17:26:11*hax-scramper joined #nim
17:27:21FromGitter<Varriount> @kristianmandrup It's the once with the giant huge case statement, right?
17:32:22FromDiscord<clyybber> Araq: Hey, I assigned showstopper to a bug I am hitting, since I cant work around it
17:32:39FromDiscord<clyybber> I just locally reverted the offending commit
17:32:58*luis_ quit (Quit: luis_)
17:33:24*luis_ joined #nim
17:33:32FromDiscord<clyybber> This one: https://github.com/nim-lang/Nim/issues/13378
17:33:33disbotInternal error in getTypeDescAux ; snippet at 12https://play.nim-lang.org/#ix=2bj0
17:33:36FromDiscord<clyybber> its pretty weird
17:33:46FromDiscord<clyybber> or at least I don't entirely understand it
17:33:56FromDiscord<clyybber> but I also don't understand timotheecours fix
17:36:03*u0_a121 quit (Read error: Connection reset by peer)
17:38:52FromGitter<kristianmandrup> @Varriount Yeah, the Nim compiler code is kinda "scary"
17:39:19*nsf joined #nim
17:39:19AraqClyybber: reorder RenderTask and Resource
17:41:11Araqkristianmandrup: compiler/cmdlinehelper.nim
17:41:37Araqand also https://nim-lang.org/docs/intern.html for some documentation
17:41:39FromDiscord<clyybber> Araq: Doesn't help it
17:44:12FromGitter<alehander92> @deech do you want to reuse the typechecker from nim?
17:46:45*marmotini_ joined #nim
17:48:02*marmotini_ quit (Remote host closed the connection)
17:48:44*marmotini_ joined #nim
17:50:48FromGitter<deech> yes
17:55:00FromGitter<Varriount> @kristianmandrup I don't recommend looking at the lambda lifting code. Unearthly terrors from beyond mortal planes live there.
17:56:16FromGitter<alehander92> @deech in what way? do you want to use them for tooling
17:56:31FromGitter<alehander92> as i guess the langserver/similar tools should already do it
17:56:44FromDiscord<clyybber> Varriount: Eh, lamdalifting seems sane to me
17:56:49FromDiscord<clyybber> Its necessary complexity
17:56:58FromDiscord<clyybber> sigmatch and semexpr are the bad parts
17:57:02FromGitter<alehander92> its like weightlifting
17:57:04FromGitter<alehander92> for compilers
17:57:18FromGitter<alehander92> it probably needs a bit of nice comment overview?
17:57:24*u0_a121 joined #nim
17:57:40FromGitter<alehander92> a bit more*
17:59:03FromGitter<deech> @alehander92 As one small use case I'd like a write a linter that flags generic procs exposed by the package that don't have any concrete instantiations either in the package or in the tests.
18:00:16FromGitter<deech> Another is auto-wrapping a Nim library so exposed functions and types are exported to C.
18:14:45FromGitter<kristianmandrup> What is the Nim equivalent of `slice`? ie. cut off string at some position? Ah yeah, just a simple range if I recall ;)
18:16:47FromGitter<kaushalmodi> That "range" is actually returning a Nim Slice: https://nim-lang.github.io/Nim/system.html#Slice
18:18:14*Vladar quit (Quit: Leaving)
18:20:25*u0_a121 quit (Read error: Connection reset by peer)
18:20:31FromGitter<kristianmandrup> What is the range syntax for `slice(5)` meaning from index 5 to the end?
18:21:11leorize[5..^1]
18:24:15FromGitter<kaushalmodi> @kristianmandrup Also check this out: https://scripter.co/notes/string-fns-nim-vs-python/#string-slicing :)
18:30:36*blackbeard420 quit (Quit: ZNC 1.7.5 - https://znc.in)
18:30:36*hpyc9 quit (Quit: ZNC 1.7.5 - https://znc.in)
18:32:42FromGitter<kristianmandrup> @kaushalmodi Thanks
18:32:53FromGitter<kristianmandrup> Btw, how do I convert string into `Rope`?
18:33:47FromGitter<kristianmandrup> Ah, just use `add`
18:34:46*leorize quit (Quit: WeeChat 2.6)
18:35:24*leorize joined #nim
18:37:31*u0_a121 joined #nim
18:37:31*u0_a121 quit (Read error: Connection reset by peer)
18:40:32FromGitter<kristianmandrup> How to create `RelativeFile` from a `filePath` string?
18:41:55FromGitter<kristianmandrup> How to iterate a `TableRef`?
18:42:20Araqlike you do over everything else
18:42:53FromGitter<kristianmandrup> `for pairs in zip(names, years):` but how do I get the keys and values?
18:43:03Araqzip?
18:43:14FromGitter<alehander92> no, you have to learn about `pairs()` vs `items()`
18:44:40narimiran@kristianmandrup: take a look at this section of tables' documentation: https://nim-lang.github.io/Nim/tables.html#15
18:45:27FromGitter<kristianmandrup> I got it `for filePath, file in m.outputFiles`
18:46:10FromGitter<kristianmandrup> To create `RelativeFile` I expect I just need to create it, sth like `RelativeFile(filePath)`?
18:46:30FromGitter<alehander92> please, take a better look through the manual, kristian
18:46:31*Ven`` joined #nim
18:46:33AraqI doubt it will pass review but sure
18:46:38*Hideki_ joined #nim
18:46:42FromGitter<alehander92> this is under type conversions i think
18:47:44*blackbeard420 joined #nim
18:48:34FromGitter<alehander92> hm, what would be the idiomatic way : using some of the `os` split ops?
18:48:39*hpyc9 joined #nim
18:48:58*clyybber joined #nim
18:49:42AraqRelativeFile is compiler specific
18:49:57*clyybber quit (Client Quit)
18:50:14Araqyou usually don't convert to it, you already have it
18:50:28Araqor you don't and then you need to sure relativeTo or whatever
18:50:39Araq*to use
18:50:42FromGitter<alehander92> but is it doing a check if its actually relative
18:50:47FromGitter<alehander92> and is it coming to stdlib
18:51:11*Hideki_ quit (Ping timeout: 260 seconds)
18:54:27Araqif you use a type conversion, no checking is done as you cannot overload type conversions
18:58:08*arecaceae quit (Read error: Connection reset by peer)
18:58:19*tane joined #nim
18:58:31*arecaceae joined #nim
18:59:18FromGitter<alehander92> so .. arent they potentially unsafe
19:00:18FromGitter<alehander92> what i mean is e.g. id want to be able to limit the user to not just convert to relative file
19:01:04*u0_a121 joined #nim
19:01:52*tane quit (Client Quit)
19:02:10Araqit's an internal compiler API
19:02:18Araqit does exactly what I want it to do
19:02:26Araqit offers some protection
19:03:28disruptekonly abstinence is 100% effective.
19:05:13FromGitter<kristianmandrup> how do I equivalent of `"abc".indexOf("b")` ?
19:05:25FromGitter<kristianmandrup> been looking at strutils
19:05:27Araqfind
19:05:35Araqsystem.find
19:05:39FromGitter<kristianmandrup> yeah, but it complains I'm not using char
19:05:48narimiranthen use char
19:05:56narimiranfind('b')
19:06:10Yardanico@kristianmandrup if you need to search for a char in a string - use system.find
19:06:16Yardanicoactually there's strutils.find too
19:06:29FromGitter<kristianmandrup> Hmm, playground keeps crashing
19:06:44FromGitter<kaushalmodi> @kristianmandrup OK, I won't spam this more.. https://scripter.co/notes/string-fns-nim-vs-python/#find--from-left
19:11:35FromDiscord<clyybber> disruptek: Have the edibles hit yet?
19:13:42FromGitter<kristianmandrup> ideally, I'd like a find from right or find last
19:14:03*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:14:08disruptekyeah, so i'm getting closer.
19:14:17krux02Araq: when I add a new since annotation, what version should I pick?
19:14:31krux02(1,1) is in the past
19:14:40krux02but I don't know the name of the next version
19:14:49krux02is it (1,2)
19:15:12disruptekwe use 1,1 in devel
19:15:15FromGitter<kaushalmodi> @kristianmandrup If you scroll down a little bit on my notes.. you will find [find, index] x [left, right] variants
19:15:42disruptek(because we want to use it in devel 😉)
19:17:10disruptekclyybber: we are treating the exp as unsigned when it's signed, somewhere...
19:17:10FromGitter<kaushalmodi> krux02: I believe it would be (1, 1)
19:17:16disruptekthat's my theory atm, anyway.
19:17:19FromGitter<kaushalmodi> because we want to test that on devel and the next release (1,2)
19:17:35narimirankrux02: (1, 1) is not the past, it is the present, and you should use that one
19:19:13krux02ok
19:24:34*nsf quit (Quit: WeeChat 2.7)
19:25:43FromGitter<kristianmandrup> So I have a proc returning a tuple of strings, however...
19:26:03FromGitter<kristianmandrup> `result = ("", "")` tells me
19:26:05FromGitter<kristianmandrup> result = (filePath, content) else: ⏎ result = ("", "")' has no type (or is ambiguous)
19:26:52krux02narimiran: 1.1.1 is my current version, so I would expect the next release to have a higher version number
19:27:04narimirankrux02: that is correct
19:27:15narimiranbut that doesn't contradict with what i said
19:27:32Yardanico@kristianmandrup did you specify proc return type?
19:27:42krux02well for me it does contradict
19:27:55FromGitter<kristianmandrup> Why is this not valid?
19:27:58narimirankrux02: ok.
19:28:00FromGitter<kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e41aec01d23aa47aa0731b3]
19:28:12FromGitter<kristianmandrup> Oh, double parens :P
19:28:21narimirankrux02: do you know what is the current stable release of nim?
19:28:23krux02buf if you say to use version (1,1) then I will do that
19:28:30krux02narimiran, no
19:28:33FromGitter<kristianmandrup> LOL
19:28:41narimirankrux02: 1.0.6
19:28:55krux02ok
19:29:05FromGitter<alehander92> you have one paren too many kristian
19:29:09narimirankrux02: does this clarify the situation for you?
19:29:11krux02so the next release will be 1.1
19:29:11FromGitter<alehander92> in ((n:
19:29:18narimirankrux02: nope. 1.2.0
19:29:20FromGitter<alehander92> yea narimiran this is really confusing
19:29:28FromGitter<alehander92> sorry but this is just super confusing for users
19:29:32krux02so version 1.1.1 is an earlier version than 1.1
19:29:37narimiranno.
19:29:37krux02that is the conflict that I have
19:29:46FromGitter<alehander92> if i see since 1.1.0 i expect that there was a 1.1.0 somehow once
19:29:49narimiran1.1 is devel version
19:29:51FromGitter<alehander92> where the feature landed first
19:29:59narimiranlike 0.19.1 was, or 0.20.99 was
19:30:23FromGitter<alehander92> so there will be a 1.1 "final" version
19:30:30narimiranno.
19:30:41FromGitter<alehander92> but this just doesnt make sense the future "me"
19:30:43krux02so there won't be a 1.1
19:30:46krux02just 1.2
19:30:49narimiranyep
19:30:50krux02ok
19:30:55krux02interesting
19:31:07krux02is that written down somwhere?
19:31:15FromGitter<alehander92> so one day ill find out x is from y.z, but then i'll search for y.z.0 and ill find out it doesnt exist
19:31:16FromGitter<kaushalmodi> > yea narimiran this is really confusing ⏎ ⏎ It's real simple.. people using devel always see odd numbers, releases have always even minor/micro versions
19:31:26narimiranotherwise this `.since` thingy wouldn't work (you couldn't test it while in devel)
19:31:32FromGitter<alehander92> yeeep.. but why should this leak into .since
19:31:59krux02reminds me of the emacs versioning scheme
19:32:03FromGitter<alehander92> well there could be some kind of mode
19:32:20narimiranplease guys, lets not bike-shed over this, huh?
19:32:26FromGitter<kaushalmodi> @alehander92 I think the reason is that when writing since, we don't exactly know the next release version
19:32:34narimiran(there's ouplace operator to bikeshed about all day long :P :D)
19:32:54narimiranwe know the next release version
19:33:08FromGitter<alehander92> well, i am just saying it seems confusing to me for future users :P but if you've agreed this particular argument is wrong, ok
19:33:09FromGitter<kaushalmodi> e.g. 1.0.6 is released.. and we know for sure that the next major release will at least 1.1.x.. so we use since (1,1)
19:33:25FromGitter<alehander92> but kaushal thats not my point
19:33:26disruptekit's not confusing; you're just confused. 😀
19:33:33FromGitter<alehander92> my point is that a user in 2024
19:33:41narimiranwould 1.x.-1 be less confusing? followed by 1.x.0?
19:33:52FromGitter<alehander92> will find out x is from 1.9, and will try to search for 1.9 to see what happened there
19:33:54narimiranthat's "minus one", not "dash one"
19:33:56FromGitter<alehander92> but 1.9 doesnt even exist
19:34:06disruptekthe point is that in 1.2 you can look at features added in devel and /know/ that they exist even in the earliest 1.2 version.
19:34:09FromGitter<alehander92> so how can something be there "since 1.9" if there is no 1.9
19:34:20narimiranthere is
19:34:25narimirani'm currently on 1.1.1
19:34:28FromGitter<alehander92> disruptek explain this to my thought experiment guy
19:34:37FromGitter<kaushalmodi> 1) 9 would be the devel after 1.8
19:34:39narimiranand the feature started to exist in 1.1.1
19:34:41FromGitter<alehander92> narimiran ok, so there is a "final" 1.1 which becomes 1.2 ?
19:34:54narimiranok, if you want to call it that way, yes
19:34:56FromGitter<kaushalmodi> may be I find this "normal" because emacs releases are named similarly
19:35:00FromGitter<alehander92> yes, ok
19:35:04FromGitter<alehander92> no i like the version scheme
19:35:16narimiranit will be 1.1.1, then 1.2.0 official release, devel becomes 1.3.1, etc.
19:35:19FromGitter<alehander92> just .since seemed a tad strange to me
19:35:28narimiranin the mean time there will be 1.2.2, 1.2.4, etc.
19:36:01FromGitter<alehander92> i guess since can know that and enable 1.2n in 1.2n-1
19:36:09narimiranand "devel backport" (stuff that has been backported, but not released yet) also has odd patch number, e.g. 1.0.1, 1.0.3, 1.0.5, etc.
19:36:45FromGitter<alehander92> because users are expected to know it
19:36:58narimiranusers don't read documentation and generally don't care
19:37:22FromGitter<alehander92> i mean, programmers using nim
19:37:58narimiranok, then say so: people with OCD care very much about version numbers :D :D
19:38:34FromGitter<alehander92> i thought we were all super pedantic bikeshedding nerds here!
19:39:15narimiranof course we are :)
19:40:01*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
19:40:25*sagax quit (Read error: Connection reset by peer)
19:41:45FromGitter<alehander92> i just learned serbocroatian has like 7 cases today
19:41:56narimiranfor nouns? yep
19:41:56FromDiscord<clyybber> disruptek: AAAAAH
19:42:09FromGitter<alehander92> so i respect your child-education-based pedanticness even more
19:42:15narimiranhahaha
19:42:28FromDiscord<clyybber> disruptek: I was suspecting it
19:42:34FromGitter<alehander92> great grammar, i think we managed to remove all of ours
19:42:47FromGitter<alehander92> i will live near to a serbian guy so i might just learn some more
19:43:08narimiranwe should get rid of at least two of those 7 because they're mostly just a copy-paste of some others
19:43:14FromDiscord<clyybber> disruptek: Maybe we need ashr in some places
19:43:40narimirane.g. miran, mirana, miranu, mirana, miranu, mirane, miranom
19:44:24disruptekyou know what it is?
19:44:45Yardanicowell russian has 6 cases :P
19:44:48FromDiscord<clyybber> si ti tahw?
19:45:07FromGitter<alehander92> hmm, miranu is Miran's right
19:45:17*hax-scramper quit (Ping timeout: 272 seconds)
19:45:20narimirannope, that would be miranov
19:45:26FromGitter<alehander92> ahh
19:45:28narimiranand has nothing to do with those 7
19:45:32FromGitter<alehander92> yeah its hard without context
19:45:37FromGitter<alehander92> amazing analysis from me
19:45:40*hax-scramper joined #nim
19:45:41FromGitter<alehander92> razumeetsia
19:45:53Yardanicolol
19:46:19disruptekclyybber: ptal now
19:46:30FromDiscord<clyybber> aight aight
19:46:48narimiranmiran's something (miranov(a) stvar) is an adjective
19:46:51FromDiscord<clyybber> @timotheecour ping pong ping
19:48:16narimiranand 'miranu' means "(i give something) to miran"
19:48:40*sagax joined #nim
19:48:59Yardanicosame as in russian :o
19:49:15FromGitter<alehander92> we also have something like this, but i am not sure if verbs really change
19:49:38narimiranverb changing is completely different thing. and we have that too :D
19:49:38*hax-scramper quit (Ping timeout: 240 seconds)
19:49:50*hax-scramper joined #nim
19:49:53narimiranbut ok, even english has that :P
19:50:03FromGitter<alehander92> miran, na miran, miranov
19:50:09FromDiscord<clyybber> disruptek: aight, everything fails, but it fails closer
19:50:14narimiranok, not for every verb, i guess (english)
19:50:19FromDiscord<clyybber> 254 is almost <= 199
19:50:23FromGitter<alehander92> i really like the miran-ovica thing
19:50:26disruptekclyybber: no, look at the tests.
19:50:30FromGitter<alehander92> where miranovica would be your wife
19:50:36disruptekwe cannot pass 1.0 == "1E0"
19:50:45narimirani think we should switch to #nim-offtopic for this linguistic stuff :)
19:50:45FromDiscord<clyybber> disruptek: Eoh
19:51:35disruptek1.0 is getting decoded as 00111111100000000000000000000000
19:53:14FromDiscord<clyybber> disruptek: but I'm getting the OOB IN basically broken
19:53:53disruptekyep. you're supposed to.
19:54:27disruptekit's like floatToBits is broken but common passes the tests. maybe we need another test.
19:54:33FromDiscord<clyybber> ah, ok. I thought you were getting something different than "1E0"
19:54:43disrupteki am; it's failing.
19:54:50FromDiscord<clyybber> disruptek: yeah, I mean like output
19:54:52FromDiscord<clyybber> not crash
19:56:07FromGitter<alehander92> narimiran yes i moved it there
19:56:14FromDiscord<clyybber> how can floatToBits be broken
19:56:17FromDiscord<clyybber> its so simple
19:57:35FromDiscord<clyybber> disruptek: floatToBits is only used in the tests?
19:57:35disruptekwell, it doesn't work.
19:58:03disrupteki'm looking at it. we are getting our sign in the wrong spot.
19:58:11FromDiscord<clyybber> ah
19:58:14FromDiscord<clyybber> I missed its usage
19:58:21FromDiscord<clyybber> snarky snake case
19:58:25disruptekoh something like that. it just copies memory.
19:59:10disruptekit works for 0.0 and -0.0, so the sign the fine. but 1.0 becomes 00111111100000000000000000000000
19:59:52FromDiscord<clyybber> cant we just replace it with a cast?
20:01:05disrupteki feel like i must be missing something super obvious.
20:03:03FromDiscord<clyybber> eh
20:03:04*fanta1 quit (Quit: fanta1)
20:03:06FromDiscord<clyybber> call me crazy
20:03:12FromDiscord<clyybber> but float is float64
20:03:32disrupteki know, but semantically...
20:03:56FromDiscord<clyybber> but floatToBits takes a float32
20:08:51*u0_a121 quit (Read error: Connection reset by peer)
20:11:24FromDiscord<Elegant Beef> typically the data type, int and float corespond to their 32 bit counterpart
20:11:37Yardaniconot in nim
20:11:37FromGitter<alehander92> varriount
20:11:42FromGitter<alehander92> is sublime plugin maintained
20:11:49FromDiscord<Elegant Beef> I know not in nim
20:11:49FromGitter<alehander92> today
20:14:47*u0_a121 joined #nim
20:14:47*u0_a121 quit (Read error: Connection reset by peer)
20:16:39disruptekclyybber: you know what else i don't get?
20:16:59disruptekhow could the digit table work with less than 128 values?
20:18:59FromDiscord<clyybber> disruptek: But its 200?
20:19:07disruptekit's 100.
20:19:18FromDiscord<clyybber> yeah, 100 pairs
20:19:23FromDiscord<clyybber> why do we need more?
20:19:34FromDiscord<clyybber> do/wood
20:19:38FromDiscord<clyybber> would
20:19:46disruptekwe cannot output a 3-digit exponent.
20:20:01disruptekafaict
20:21:38disrupteki guess the exponent sign is sorta up to the impl.
20:21:55FromDiscord<clyybber> 10 * 10 = 100?
20:22:00FromDiscord<clyybber> what am *I* missing
20:22:19disruptekhow could it ever output an exponent of 101?
20:22:43disrupteki think this biased exponent is the source of the bug.
20:23:24*mahmudov joined #nim
20:25:00FromDiscord<clyybber> but is it like that in the original implementation?
20:25:39FromDiscord<clyybber> hmm, somehow a cast doesn't work
20:25:51FromDiscord<clyybber> a cast always ends up as 0
20:27:14FromDiscord<clyybber> disruptek: > it works for 0.0 and -0.0, so the sign the fine. but 1.0 becomes 00111111100000000000000000000000
20:27:18FromDiscord<clyybber> but that is correct
20:27:52FromDiscord<clyybber> first bit for the sign
20:27:57FromDiscord<clyybber> next 8 for the exponent
20:28:00FromDiscord<clyybber> which is 127 here
20:28:08FromDiscord<clyybber> and the rest of it, the mantissa all zero
20:28:12disruptekyep, so 2e^-127 is 1.
20:28:13ZevvDudes you guys need a toy
20:28:14Zevvhttp://evanw.github.io/float-toy/
20:28:18FromDiscord<clyybber> https://www.h-schmidt.net/FloatConverter/IEEE754.html
20:28:37FromDiscord<clyybber> Zevv: Beat me, thanks
20:29:07disruptekcute, but it doesn't change the problem.
20:29:18FromDiscord<clyybber> what IS the problem though?
20:29:22FromGitter<alehander92> zevv nice ui
20:29:23FromDiscord<clyybber> floatToBits definitely isnt
20:29:27disruptekhow could we ever expect to index a 200-item array with 2*127?
20:29:30FromGitter<alehander92> i need to continue with my memory ui..
20:29:42*mahmudov left #nim ("Leaving")
20:29:43FromDiscord<clyybber> disruptek: Aah
20:29:49disruptekyou feel me?
20:30:31disruptekdo you have an exam you should be studying for?
20:30:39FromDiscord<clyybber> nope, the storm saved me
20:30:53disruptekyou mean, it bought you more study time. 😉
20:31:05FromDiscord<clyybber> lol
20:31:11FromGitter<alehander92> clyybber arent you old
20:31:18FromDiscord<clyybber> im 19
20:31:19FromGitter<alehander92> i imagined you like 35+
20:31:21FromGitter<alehander92> man
20:31:24FromDiscord<clyybber> lol
20:31:40FromGitter<alehander92> lovely, good, cherish your youth
20:31:50FromGitter<alehander92> wow this sounds like 19th century byron
20:32:27disruptekso anyway...
20:32:43FromGitter<alehander92> sorry for disrupting you
20:33:13narimiran35+ considered old :(
20:33:24*luis_ quit (Quit: luis_)
20:33:29FromDiscord<clyybber> old considered harmful
20:33:49*luis_ joined #nim
20:33:53disruptekahh, this is what our FloatBias constant is for.
20:35:37FromGitter<kaushalmodi> 35+ considered old :⁠(
20:36:39FromGitter<alehander92> come on guys
20:36:43FromGitter<alehander92> i am getting married this week
20:36:49disruptekreally?
20:36:52FromGitter<alehander92> i will be old on monday as well :)
20:37:04disruptekhow come i didn't get a wedding invite?
20:37:10FromGitter<alehander92> is this how it works
20:37:14disruptekof course.
20:37:15narimiranmarried before getting your driver's licence?
20:37:16FromDiscord<Elegant Beef> i mean at 36 you have to start using a walker
20:37:22narimiranpriorities, man
20:37:32FromGitter<alehander92> my grandpa was born in 1914
20:37:35disrupteki guess we can show up uninvited, if you prefer.
20:37:49FromDiscord<Elegant Beef> Just show up and start evangalising nim
20:37:53*luis_ quit (Client Quit)
20:38:00FromGitter<alehander92> narimiran i got like 4 exams
20:38:04FromGitter<alehander92> i got really close the last time
20:38:07FromDiscord<Elegant Beef> "Have you ever wanted a statically typed programming language that uses already installed system runtimes?"
20:38:15FromGitter<alehander92> disruptek i really thoight about doing it
20:38:20FromGitter<alehander92> i was going to invite PMunch
20:38:26FromGitter<alehander92> and the others on fosdem
20:38:36FromGitter<alehander92> but its like i just didnt
20:38:38disruptekyou just don't love us. i get it.
20:38:53FromGitter<alehander92> you're more special to me
20:38:54FromDiscord<clyybber> spare the missing love for your wife
20:39:15FromGitter<alehander92> she missed bojack horseman from time to time
20:39:53FromGitter<alehander92> disruptek i invite you and rayman and your truck to plovdiv
20:39:57FromGitter<alehander92> in may
20:40:22disruptekplovdiv?
20:40:48disruptekthat's a wet drive, looks like.
20:40:50FromGitter<alehander92> it has great stuff, like 7 hills which look like 4 and overpopulation of cats
20:41:12*marmotini_ quit (Remote host closed the connection)
20:41:20disrupteknice mountain views.
20:41:44*marmotini_ joined #nim
20:42:17FromGitter<alehander92> https://images.myguide-cdn.com/bulgaria/companies/the-old-town-of-plovdiv/large/the-old-town-of-plovdiv-161252.jpg
20:42:43FromGitter<alehander92> yes, i try to make nimconf here from months
20:42:54FromDiscord<clyybber> cozy
20:42:55disruptekmay might be a little warm.
20:42:58FromGitter<alehander92> but after my podcats becomes super succesful, it would be easier
20:43:20FromGitter<alehander92> yes, it gets 40-ish degrees sometimes
20:43:32FromGitter<alehander92> ok, then i'll come to the usa, no worries
20:44:26disruptekif it's the us, it's probably nyc or sf, tbh.
20:44:31leorizelike 40C?
20:44:34leorizedamn that's hot
20:44:43FromGitter<alehander92> i really feel like a midwest boomer guy sometimes
20:45:14disrupteki guess it's not too bad in may; average high of ~36.
20:45:18FromGitter<alehander92> yes, thats why you have all the cats i guess
20:45:50disruptekfall seems like better temps and less rain.
20:45:55FromGitter<alehander92> where is that ~36? i imagine california is somethign like france
20:45:57FromGitter<alehander92> as weather
20:46:37FromGitter<alehander92> may is great, its warm enough
20:46:43*marmotini_ quit (Ping timeout: 272 seconds)
20:47:34Zevvwhat is 'expr' in 0.12 Nim?
20:47:48leorizeuntyped
20:47:49narimiranZevv: most likely 'untyped'
20:48:03FromGitter<alehander92> but if anyone is around this week, feel welcome(such a copout man!!!) at least zah is coming
20:48:24disrupteki'll say a little prayer for ya, alehander.
20:49:07Zevvnarimiran: tnx
20:49:33*u0_a121 joined #nim
20:51:22disruptekclyybber: so again... how the hell is this supposed to work?
20:52:01*u0_a121 quit (Read error: Connection reset by peer)
20:52:11FromDiscord<clyybber> no idea, but it works in C
20:52:22FromDiscord<clyybber> so we must miscalculate somewhere
20:53:13disruptekit's only copying two digits. and the output never includes two digits side-by-side. so that means that branch cannot possibly run in the c version.
20:53:53disruptekwe output 0 in the opposite branch, added to exp. so exp is 0 in the c version.
20:54:36disruptekit can only be zero if the parsed exponent is added to the output length and the -1 and yields zero.
20:54:44FromGitter<alehander92> disruptek love it
20:54:53disruptekergo, with olength==1 it must be zero as decoded.
20:54:57disruptekbut it's 127 for us.
20:55:04*u0_a121 joined #nim
20:55:55disruptekwe need to sub the bias.
20:56:10disrupteklet's do it right where we assgn exp.
20:56:52disruptekhmm, it didn't work. maybe i did it wrong.
20:57:28*marmotini_ joined #nim
20:59:57*u0_a121 quit (Read error: Connection reset by peer)
21:01:30Zevvstory of my life :/
21:01:46disruptekright?
21:01:52Zevvwrong!
21:02:09disruptekoften-wrong disruptek
21:02:19*marmotini_ quit (Ping timeout: 260 seconds)
21:02:28disruptekthat was a pretty cool plotline.
21:03:54FromDiscord<clyybber> disruptek: Do you have bazel by chance?
21:04:00disruptekyeah.
21:04:19disruptekyeah, i have a working c build.
21:04:19FromDiscord<clyybber> might be worth inserting a print call after the exp >= 10 branch
21:04:27FromDiscord<clyybber> to see what exp is on ulfjack
21:04:34FromDiscord<clyybber> nice
21:04:41disruptekyeah, but i think this is solvable here.
21:04:58FromDiscord<clyybber> yeah, sure, but then we at least now where our exp differs
21:04:59FromDiscord<clyybber> or how
21:06:23disruptekthe result we want is to output (at index [0]) a '1'.
21:07:18disruptekbut the output starts off as zero because it's copied from the mantissa, which is of course 0.
21:08:08FromDiscord<clyybber> does e10 differ?
21:08:27FromDiscord<clyybber> between c and nim I mean
21:08:56disruptekjeeze, i dunno. i don't worry about e10 yet.
21:09:21disrupteki think i have to remove the bias and carry the one to the mantissa but i don't really understand why that would be right.
21:09:43FromDiscord<clyybber> eh, dont differ from C
21:09:51FromDiscord<clyybber> exp is wrong
21:09:57FromDiscord<clyybber> exp is e10 + removed
21:10:03FromDiscord<clyybber> so either removed or e10 is wrong
21:10:15*Ven`` joined #nim
21:10:18disrupteki think you're looking at the wrong exp.
21:10:43disrupteklook at the end of to_chars
21:10:50FromDiscord<clyybber> argh
21:10:55FromDiscord<clyybber> sorry
21:11:37FromDiscord<clyybber> do you already know which part is wrong?
21:11:49FromDiscord<clyybber> v.exponent or olength?
21:12:07disruptekexponent
21:12:44disruptekbut if we change it, it follows that mantissa changes, which follows that we must add one -- because the output we want is chr('0'.ord + mantissa)
21:14:23disrupteki think it worked but the test failed somehow.
21:15:41disruptekwhat did you do to fix the stripping thing?
21:15:45FromDiscord<clyybber> is our ieeeExponent correct?
21:16:01FromDiscord<clyybber> disruptek: I did .strip(chars = {'\0'})
21:16:07disruptekit is what it is.
21:16:19FromDiscord<clyybber> yeah, but is it the same
21:16:23FromDiscord<clyybber> between nim and c?
21:16:43disruptekokay, that fixed it.
21:16:53FromDiscord<clyybber> oh, nice
21:17:56disruptekpushed that
21:18:49FromDiscord<clyybber> pulled that
21:18:59*u0_a121 joined #nim
21:20:59disrupteki wonder if the order of these tests is deliberate.
21:21:30*narimiran quit (Ping timeout: 265 seconds)
21:21:54disrupteki mean, maybe the subnormal failure tells us that the fix is wrong.
21:22:08FromDiscord<clyybber> disruptek: Why did you have to put the var exp somewhere else?
21:22:40FromDiscord<clyybber> I don't get why we need to do something different than the C version
21:22:56FromDiscord<clyybber> and when we do, its gonna make debugging the other failing tests more difficult?
21:23:09disruptekrelax. we're learning.
21:23:29FromDiscord<clyybber> sure, but I wonder why we are differing in the first place
21:24:18FromDiscord<clyybber> I mean, if we do something the C version must not do, we are doing something wrong
21:24:24FromDiscord<clyybber> and just applying flextape
21:24:25disruptekbecause for whatever reason, our floats are biased.
21:25:05disruptekyou can ask them, but you cannot trust that their answer is fair.
21:25:11FromDiscord<clyybber> and they are not in the C version?
21:25:13FromDiscord<clyybber> lol
21:25:40disrupteki think they are unbiased in the c version, yes.
21:26:36disruptekoh, it's because our types are unsigned, i guess.
21:29:41disrupteki wonder if we have this stuff use signed ints if it'll just magically work.
21:29:52FromDiscord<clyybber> so, fixed?
21:30:02disrupteksomething i might try.
21:30:31FromDiscord<clyybber> disruptek: Did you do any other more extensive changes other than the last 2 commits?
21:30:51disrupteki mean, shit man, i dunno.
21:30:58disruptekyou can look at the repo.
21:31:09disrupteki would say `no`.
21:31:37disrupteki fixed a few things.
21:32:00FromDiscord<clyybber> but not fixed as in reordered code?
21:32:36*MyMind quit (Quit: WeeChat 2.7)
21:32:51FromDiscord<clyybber> eh, void doesn't have bazel : /
21:38:04*marmotini_ joined #nim
21:39:58*marmotini_ quit (Read error: No route to host)
21:40:13*marmotini_ joined #nim
21:41:23*kaiyin joined #nim
21:41:48kaiyinIs there a way to turn off `noSideEffect` checks globally?
21:42:29FromDiscord<clyybber> nope, afaik
21:46:53*oculux quit (Ping timeout: 272 seconds)
21:47:06*oculux joined #nim
21:51:19Yardanicokaiyin: what for though? if you don't want them, just don't use noSideEffect or "func"
21:51:54kaiyinFor library code from another person.
21:52:35kaiyinI could just get the code and remove all the noSideEffect, yes, but that would be a big surgery for some debugging.
21:53:41disruptekclyybber: we'll just do this in floattobits.
21:56:40*oculux quit (Ping timeout: 268 seconds)
21:56:48disrupteki mean, when we create FloatingDecimal
21:57:41leorizekaiyin: use `{.noSideEffects.}: <code here>`
21:57:52*oculux joined #nim
21:57:55leorizethat'll instruct the compiler to not compute the effect in that block
21:58:19*Zectbumo joined #nim
22:00:26FromDiscord<clyybber> disruptek: ieeeExponent
22:00:30FromDiscord<clyybber> is sometimes wrong
22:00:37FromDiscord<clyybber> unless you also reordered the tests
22:01:51FromDiscord<clyybber> nope
22:01:53FromDiscord<clyybber> its wrong
22:02:11FromDiscord<clyybber> nevermind
22:02:17disruptekit's because you have to bias it by 127.
22:02:26FromDiscord<clyybber> nah, its alright
22:02:33FromDiscord<clyybber> I was diffing between the tests of C and nim
22:03:03FromDiscord<clyybber> so this must be wrong:
22:03:14FromDiscord<clyybber> `exponent: ieeeExponent.int32`
22:03:19FromDiscord<clyybber> why convert to int32 here?
22:03:43disruptekit's signed, but it should be -127.
22:04:11disruptek460 says we think it's unsigned.
22:04:34disruptekthat matches the c.
22:05:16FromDiscord<clyybber> huh, the C calls f2d?
22:05:28FromDiscord<clyybber> and f2d does not convert ieeeExponent to int32
22:05:44disruptekif we make that signed, it should flip 127 to 0.
22:06:49disruptekyeah, that's what i'm saying.
22:07:07FromDiscord<clyybber> but why don't we use f2d?
22:08:36FromDiscord<clyybber> disruptek: I don't understand this
22:09:18disruptekthis is so broken.
22:09:19disrupteklol
22:09:22FromDiscord<clyybber> yeah
22:09:32disruptekyeah; we should call it and we don't.
22:09:34FromDiscord<clyybber> but why do we not use f2d here?
22:09:37FromDiscord<clyybber> ah
22:09:42FromDiscord<clyybber> so it was an oversight?
22:09:46disrupteki think i transcribed it wrong somehow.
22:10:06FromDiscord<clyybber> hehe
22:10:12FromDiscord<clyybber> I'm inclined to do it all over again
22:10:13disruptekit's confusing because the c listed the type first, which made me just instantiate it.
22:10:21FromDiscord<clyybber> ah
22:11:29kaiyinleorize, that works. thanks!
22:12:15*oculux quit (Ping timeout: 265 seconds)
22:12:23disruptekpushed
22:12:27*oculux joined #nim
22:15:56FromDiscord<clyybber> disruptek: But its still not working...
22:16:51FromDiscord<clyybber> well, at least we are now getting range errors
22:17:03FromDiscord<clyybber> so lets hope that was the last transcription error
22:17:34FromDiscord<clyybber> oh no
22:17:41FromDiscord<clyybber> we are getting inaccuracies
22:17:44FromDiscord<clyybber> we are doomed
22:19:42*marmotini_ quit (Remote host closed the connection)
22:20:15*marmotini_ joined #nim
22:20:42disrupteklol
22:21:33disruptekis this even wrong?
22:22:24FromDiscord<clyybber> yeah
22:22:30FromDiscord<clyybber> I think so
22:22:51disrupteki don't get it.
22:24:10*hinst quit (Remote host closed the connection)
22:24:26*marmotini_ quit (Ping timeout: 240 seconds)
22:25:04FromDiscord<clyybber> f2s(33554450.0) == "3.355445E7"
22:25:04FromDiscord<clyybber> f2s(33554450.0) was 3.3554428E7
22:25:16disrupteki think that exponent should be unbiased.
22:25:41FromDiscord<clyybber> wdym with biased?
22:26:16*solitudesf quit (Ping timeout: 265 seconds)
22:26:52disruptekso 127 is what's going in, but the way the math works, we need it to be zero.
22:27:13FromDiscord<clyybber> check if we really do, check in the C version
22:27:53disruptekwell, it's not a transcription error.
22:29:29disrupteki would probably fix this so mantissas and exponents are typeclasses that include uint24, int24, int8, uin8, etc.
22:30:18disruptekthey will just be a union type that mirrors whatever you throw at it.
22:30:19FromDiscord<clyybber> but the C version can live without them
22:30:26FromDiscord<clyybber> we should first see whats wrong
22:30:32disruptekof course.
22:32:13disruptekwhy do we subtract mantissa bit count from e2?
22:33:51FromDiscord<clyybber> where?
22:36:45disruptekwell, look at it this way:
22:36:59disruptekit's computing an exponent of -8 right now, for the value 1.0.
22:38:34disruptekit's 2^-23 when it should be 2^0. know what else is 23? mantissa bit count.
22:40:02FromDiscord<clyybber> does it work with it not subtracted?
22:40:13*Trustable quit (Remote host closed the connection)
22:40:39disruptekwow, m2 is wrong, too.
22:40:57FromDiscord<clyybber> how?
22:40:59disruptekoh, i bet i need to pad my bit mask.
22:41:11*Zectbumo quit (Read error: Connection reset by peer)
22:42:08FromDiscord<clyybber> lets see who can get it to work first
22:42:20FromDiscord<clyybber> I'm gonna redo it from scratch
22:42:35disruptekoh c'mon, it's not worth that.
22:43:24FromDiscord<clyybber> yeah probably
22:43:37FromDiscord<clyybber> thats why who wins first wins
22:43:52FromDiscord<Recruit_main_70007> finishes?*
22:44:05FromDiscord<clyybber> yeah
22:44:28FromDiscord<clyybber> disruptek: I will stop if you get it to work
22:44:47FromDiscord<clyybber> but if you don't, then at least we have two broken translations :p
22:47:03FromDiscord<clyybber> disruptek: Better idea
22:47:21FromDiscord<clyybber> maybe the fixes fucked it up
22:47:40FromDiscord<clyybber> maybe reverting to a previous commit
22:47:44FromDiscord<clyybber> like waay previous
22:47:50FromDiscord<clyybber> and doing the f2d thing
22:47:54FromDiscord<clyybber> makes everything work?
22:48:25*Hideki_ joined #nim
22:48:31disruptekprobably worth trying, but i'm guessing with these fixes. they should be fixes, afaict.
22:48:46disrupteki mean, /i'm not guessing/ when i fix something.
22:48:49FromDiscord<clyybber> but why are they needed?
22:49:05disruptekwhich one, specifically?
22:49:10FromDiscord<clyybber> I mean, why does the C version not need them?
22:49:16FromDiscord<clyybber> disruptek: Like the mantissa one
22:49:19FromDiscord<clyybber> where we subtract it
22:49:28disrupteki really don't know.
22:49:49FromDiscord<clyybber> hmm
22:49:56disruptekbut i know that 1 * 2^0 == 1
22:50:51FromDiscord<clyybber> 1111111111111111111111111111111111
22:50:58FromDiscord<clyybber> :p
22:52:50*Hideki_ quit (Ping timeout: 240 seconds)
22:55:05disruptekit's definitely my mask.
23:00:20FromDiscord<clyybber> which one?
23:04:49*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:06:47*Ven`` joined #nim
23:07:09FromDiscord<clyybber> disruptek: success?
23:08:23*Ven`` quit (Client Quit)
23:14:16FromGitter<deech> Just published Nim bindings to LibClang: https://github.com/deech/libclang_bindings
23:15:03FromDiscord<clyybber> nice!
23:19:26*kaiyin quit (Remote host closed the connection)
23:20:10FromDiscord<treeform> deech, what are you going to do with the lib now that you have wrapped it?
23:20:50FromGitter<deech> Semi-automate bindings to C++.
23:21:14FromGitter<deech> Maybe nimterop could depend on it as well
23:22:06FromDiscord<treeform> ok
23:38:08*lritter joined #nim
23:46:21stefantalpalarudeech, you can plug it into c2nim for better C and C++ parsing. Look at how Zig does it.
23:47:08FromGitter<deech> Or that.
23:48:31FromGitter<deech> I still think it has to be semi-automated. Friction free auto binding to C++ does not exist AFAIK. Even D folk are struggling with it. Should work for C quite well though.