<< 10-10-2018 >>

00:11:35*xet7 quit (Read error: Connection reset by peer)
00:13:40*zachk quit (Quit: Leaving)
00:45:27FromGitter<zacharycarter> I want to play with forth more at some point - and compilers in general - I'm thinking, another pipe dream project is to write a forth interpreter with Nim
00:55:12*abm quit (Ping timeout: 244 seconds)
00:57:44*ftsf joined #nim
00:58:56FromGitter<malkomalko> I was playing around with go for a while and I'm definitely planning on going through https://interpreterbook.com/ and https://compilerbook.com/ in nim. Up next on my reading list is also the compiler docs. I'm very much interested to see how the compiler gets bootstrapped to allow for the compiler to be written in nim.
00:59:34FromGitter<zacharycarter> have you looked at - http://craftinginterpreters.com/ ?
00:59:55FromDiscord_<malkomalko> Yah, but I don't think it's finished
01:00:15*Nolan[m] is now known as nolan_d
01:00:26FromGitter<zacharycarter> it's not - but I imagine unless you read really quickly, it would probably be done by the time you got through it
01:00:33FromGitter<zacharycarter> there's a lot of content in there and a lot of exercises / example code
01:01:05FromDiscord_<malkomalko> https://www3.nd.edu/~dthain/compilerbook/ is also a good free resource
01:01:24FromGitter<zacharycarter> thanks! all three links you shared I hadn't seen before
01:01:57FromGitter<malkomalko> All good. It's definitely on my list post Nim in Action read through.
01:18:19*darithorn joined #nim
01:31:34FromGitter<malkomalko> so is the `/private` directory just a convention but not enforced in anyway?
01:38:45*redlegion quit (*.net *.split)
01:38:46*deepend quit (*.net *.split)
01:38:47*rlr quit (*.net *.split)
01:38:47*nif quit (*.net *.split)
01:38:47*flaviu quit (*.net *.split)
01:38:47*edcragg quit (*.net *.split)
01:38:49*craigger quit (*.net *.split)
01:38:49*Yardanico quit (*.net *.split)
01:38:49*JStoker quit (*.net *.split)
01:38:49*tobbez quit (*.net *.split)
01:38:50*def- quit (*.net *.split)
01:38:50*dada78641 quit (*.net *.split)
01:38:51*Jesin quit (*.net *.split)
01:38:51*MrAxilus[m] quit (*.net *.split)
01:38:52*enigmeta quit (*.net *.split)
01:38:52*LyndsySimon quit (*.net *.split)
01:38:54*TheKing[m] quit (*.net *.split)
01:38:54*Demos[m] quit (*.net *.split)
01:38:56*derlafff quit (*.net *.split)
01:38:57*sz0 quit (*.net *.split)
01:38:57*FromGitter quit (*.net *.split)
01:38:58*surma_ quit (*.net *.split)
01:38:58*AlexMax quit (*.net *.split)
01:38:58*copygirl quit (*.net *.split)
01:38:59*euantor quit (*.net *.split)
01:38:59*revere quit (*.net *.split)
01:38:59*crem quit (*.net *.split)
01:39:00*gmpreussner quit (*.net *.split)
01:39:00*grahamg quit (*.net *.split)
01:39:00*dvn quit (*.net *.split)
01:39:00*cornfeedhobo quit (*.net *.split)
01:39:01*Miguelngel[m] quit (*.net *.split)
01:39:01*nolan_d quit (*.net *.split)
01:39:01*toofly[m] quit (*.net *.split)
01:39:01*zielmicha[m] quit (*.net *.split)
01:39:01*TheManiac[m] quit (*.net *.split)
01:39:01*yglukhov[m] quit (*.net *.split)
01:39:01*pqflx3[m] quit (*.net *.split)
01:39:02*GitterIntegratio quit (*.net *.split)
01:39:02*pydsigner quit (*.net *.split)
01:39:03*skelett quit (*.net *.split)
01:39:03*MyMind quit (*.net *.split)
01:39:03*chemist69 quit (*.net *.split)
01:39:03*opi_ quit (*.net *.split)
01:39:04*flyx quit (*.net *.split)
01:39:06*Sentreen quit (*.net *.split)
01:39:07*xomachine[m] quit (*.net *.split)
01:39:07*vegax87 quit (*.net *.split)
01:39:08*gangstacat quit (*.net *.split)
01:39:10*lukd quit (*.net *.split)
01:39:10*r4vi quit (*.net *.split)
01:39:11*zielmicha__ quit (*.net *.split)
01:39:11*pigmej quit (*.net *.split)
01:39:12*bozaloshtsh quit (*.net *.split)
01:39:12*shodan45 quit (*.net *.split)
01:39:12*darithorn quit (*.net *.split)
01:39:13*shashlick quit (*.net *.split)
01:39:14*Tongir quit (*.net *.split)
01:39:14*joshbaptiste quit (*.net *.split)
01:39:14*erratic quit (*.net *.split)
01:39:14*pwntus quit (*.net *.split)
01:39:14*Sargun_ quit (*.net *.split)
01:39:15*masterm quit (*.net *.split)
01:39:15*acidx quit (*.net *.split)
01:39:16*nuxdie quit (*.net *.split)
01:39:17*Elronnd quit (*.net *.split)
01:39:18*junland quit (*.net *.split)
01:39:18*notbot[m] quit (*.net *.split)
01:39:18*Xe quit (*.net *.split)
01:39:18*snowolf quit (*.net *.split)
01:39:19*awal quit (*.net *.split)
01:39:19*macsek1911[m] quit (*.net *.split)
01:39:20*dashed quit (*.net *.split)
01:39:20*odc quit (*.net *.split)
01:39:21*Araq quit (*.net *.split)
01:39:21*SunDwarf quit (*.net *.split)
01:39:22*petersjt014[m] quit (*.net *.split)
01:39:22*dyce[m] quit (*.net *.split)
01:39:22*zacharycarter[m] quit (*.net *.split)
01:39:24*dom96 quit (*.net *.split)
01:39:24*Amun_Ra quit (*.net *.split)
01:39:24*qwertfisch quit (*.net *.split)
01:39:25*Zevv quit (*.net *.split)
01:39:25*planetis[m] quit (*.net *.split)
01:39:25*sg-james[m] quit (*.net *.split)
01:39:25*gh0st[m] quit (*.net *.split)
01:39:25*Connor[m]1 quit (*.net *.split)
01:39:26*syntonym[m] quit (*.net *.split)
01:39:26*endes[m] quit (*.net *.split)
01:39:26*stisa[m] quit (*.net *.split)
01:39:26*hitchhooker[m] quit (*.net *.split)
01:39:26*bitstoppa[m] quit (*.net *.split)
01:39:26*m712 quit (*.net *.split)
01:39:27*msmorgan_ quit (*.net *.split)
01:39:28*hogeland quit (*.net *.split)
01:39:28*ftsf quit (*.net *.split)
01:39:29*rockcavera quit (*.net *.split)
01:39:29*banc quit (*.net *.split)
01:39:29*leorize quit (*.net *.split)
01:39:30*mal``` quit (*.net *.split)
01:39:31*FromDiscord_ quit (*.net *.split)
01:39:31*c15ade4 quit (*.net *.split)
01:39:32*beatmox quit (*.net *.split)
01:39:32*fyber quit (*.net *.split)
01:39:33*zama quit (*.net *.split)
01:39:34*Tortice quit (*.net *.split)
01:39:34*voiceftp quit (*.net *.split)
01:39:35*ghost64 quit (*.net *.split)
01:39:35*masterdonx quit (*.net *.split)
01:39:35*avsej quit (*.net *.split)
01:39:36*regtools quit (*.net *.split)
01:39:36*Lord_Nightmare quit (*.net *.split)
01:39:36*oprypin quit (*.net *.split)
01:39:37*cavariux quit (*.net *.split)
01:39:37*d10n quit (*.net *.split)
01:39:37*ltr_ quit (*.net *.split)
01:39:38*ldlework quit (*.net *.split)
01:39:38*GaveUp quit (*.net *.split)
01:39:38*Widdershins quit (*.net *.split)
01:39:40*onionhammer quit (*.net *.split)
01:39:41*ven473 quit (*.net *.split)
01:39:41*jsn- quit (*.net *.split)
01:39:42*jonafato quit (*.net *.split)
01:39:42*kadin_ quit (*.net *.split)
01:39:42*CcxWrk quit (*.net *.split)
01:39:42*livcd quit (*.net *.split)
01:39:43*shadowbane quit (*.net *.split)
01:39:44*seni quit (*.net *.split)
01:39:44*tdc quit (*.net *.split)
01:39:45*gsingh93 quit (*.net *.split)
01:39:46*jxy quit (*.net *.split)
01:39:46*Cthalupa quit (*.net *.split)
01:39:46*ng0 quit (*.net *.split)
01:39:47*abeaumont quit (*.net *.split)
01:39:48*RushPL quit (*.net *.split)
01:39:49*monofuel[m] quit (*.net *.split)
01:39:49*vqrs quit (*.net *.split)
01:39:49*sendell[m] quit (*.net *.split)
01:39:49*SolitudeSF[m] quit (*.net *.split)
01:39:49*spymasterd[m] quit (*.net *.split)
01:39:49*jaens[m] quit (*.net *.split)
01:39:49*narimiran[m] quit (*.net *.split)
01:39:49*codevance[m] quit (*.net *.split)
01:39:50*jakeprem quit (*.net *.split)
01:39:50*Death916 quit (*.net *.split)
01:39:50*EastByte quit (*.net *.split)
01:39:51*SenasOzys quit (Quit: Leaving)
01:45:00*shodan45 joined #nim
01:45:00*pigmej joined #nim
01:45:00*zielmicha__ joined #nim
01:45:00*r4vi joined #nim
01:45:00*bozaloshtsh joined #nim
01:45:00*gangstacat joined #nim
01:45:00*lukd joined #nim
01:45:00*vegax87 joined #nim
01:45:00*euantor_ joined #nim
01:45:00*surma__ joined #nim
01:45:00*sz0_ joined #nim
01:45:00*EastByte joined #nim
01:45:00*Death916 joined #nim
01:45:00*jakeprem joined #nim
01:45:00*codevance[m] joined #nim
01:45:00*narimiran[m] joined #nim
01:45:00*jaens[m] joined #nim
01:45:00*spymasterd[m] joined #nim
01:45:00*SolitudeSF[m] joined #nim
01:45:00*sendell[m] joined #nim
01:45:00*vqrs joined #nim
01:45:00*monofuel[m] joined #nim
01:45:00*RushPL joined #nim
01:45:00*deepend joined #nim
01:45:00*redlegion joined #nim
01:45:00*xomachine[m] joined #nim
01:45:00*Sentreen joined #nim
01:45:00*flyx joined #nim
01:45:00*opi_ joined #nim
01:45:00*chemist69 joined #nim
01:45:00*MyMind joined #nim
01:45:00*skelett joined #nim
01:45:00*AlexMax_ joined #nim
01:45:00*der joined #nim
01:45:00*SunDwarf joined #nim
01:45:00*Araq joined #nim
01:45:00*odc joined #nim
01:45:00*dashed joined #nim
01:45:00*macsek1911[m] joined #nim
01:45:00*awal joined #nim
01:45:00*Xe joined #nim
01:45:00*notbot[m] joined #nim
01:45:00*snowolf joined #nim
01:45:00*junland joined #nim
01:45:00*Elronnd joined #nim
01:45:00*pydsigner joined #nim
01:45:00*pqflx3[m] joined #nim
01:45:00*yglukhov[m] joined #nim
01:45:00*GitterIntegratio joined #nim
01:45:00*TheManiac[m] joined #nim
01:45:00*toofly[m] joined #nim
01:45:00*zielmicha[m] joined #nim
01:45:00*Miguelngel[m] joined #nim
01:45:00*cornfeedhobo joined #nim
01:45:00*dvn joined #nim
01:45:00*grahamg joined #nim
01:45:00*nolan_d joined #nim
01:45:00*gmpreussner joined #nim
01:45:00*crem joined #nim
01:45:00*Cthalupa joined #nim
01:45:00*ng0 joined #nim
01:45:00*abeaumont joined #nim
01:45:00*jxy joined #nim
01:45:00*gsingh93 joined #nim
01:45:00*tdc joined #nim
01:45:00*seni joined #nim
01:45:00*shadowbane joined #nim
01:45:00*FromDiscord joined #nim
01:45:00*dada78641 joined #nim
01:45:00*def- joined #nim
01:45:00*JStoker joined #nim
01:45:00*Yardanico joined #nim
01:45:00*craigger joined #nim
01:45:00*edcragg joined #nim
01:45:00*flaviu joined #nim
01:45:00*nif joined #nim
01:45:00*tobbez joined #nim
01:45:00*rlr joined #nim
01:45:00*FromGitter joined #nim
01:45:00*livcd joined #nim
01:45:00*CcxWrk joined #nim
01:45:00*kadin_ joined #nim
01:45:00*jonafato joined #nim
01:45:00*jsn- joined #nim
01:45:00*ven473 joined #nim
01:45:00*onionhammer joined #nim
01:45:00*Widdershins joined #nim
01:45:00*GaveUp joined #nim
01:45:00*ldlework joined #nim
01:45:00*ltr_ joined #nim
01:45:00*d10n joined #nim
01:45:00*cavariux joined #nim
01:45:00*oprypin joined #nim
01:45:00*Lord_Nightmare joined #nim
01:45:00*regtools joined #nim
01:45:00*avsej joined #nim
01:45:00*masterdonx joined #nim
01:45:00*ghost64 joined #nim
01:45:00*voiceftp joined #nim
01:45:00*Tortice joined #nim
01:45:00*zama joined #nim
01:45:00*koppeh joined #nim
01:45:47*Jesin joined #nim
01:45:47*MrAxilus[m] joined #nim
01:45:47*LyndsySimon joined #nim
01:45:47*enigmeta joined #nim
01:45:47*Demos[m] joined #nim
01:45:47*TheKing[m] joined #nim
01:45:50*planetis[m] joined #nim
01:45:50*sg-james[m] joined #nim
01:45:50*gh0st[m] joined #nim
01:45:50*Connor[m]1 joined #nim
01:45:50*syntonym[m] joined #nim
01:45:50*stisa[m] joined #nim
01:45:50*endes[m] joined #nim
01:45:50*hitchhooker[m] joined #nim
01:45:50*bitstoppa[m] joined #nim
01:45:50*m712 joined #nim
01:45:50*msmorgan_ joined #nim
01:45:50*hogeland joined #nim
01:45:54*Zevv joined #nim
01:45:54*petersjt014[m] joined #nim
01:45:54*dyce[m] joined #nim
01:45:54*zacharycarter[m] joined #nim
01:45:54*dom96 joined #nim
01:45:54*Amun_Ra joined #nim
01:45:54*qwertfisch joined #nim
01:45:57*c15ade4 joined #nim
01:46:03*darithorn joined #nim
01:46:03*shashlick joined #nim
01:46:03*Tongir joined #nim
01:46:03*joshbaptiste joined #nim
01:46:03*pwntus joined #nim
01:46:03*Sargun_ joined #nim
01:46:03*masterm joined #nim
01:46:03*acidx joined #nim
01:46:03*nuxdie joined #nim
01:46:09*rockcavera joined #nim
01:46:09*banc joined #nim
01:46:09*leorize joined #nim
01:46:09*fyber joined #nim
01:46:09*mal``` joined #nim
01:46:09*beatmox joined #nim
01:46:18*thomasross quit (Remote host closed the connection)
01:47:16*shashlick quit (Remote host closed the connection)
01:48:36*FromGitter is now known as Guest40822
01:48:37*c15ade4 is now known as Guest32018
01:48:57*revere joined #nim
01:48:59*thomasross joined #nim
01:50:27*arecaceae quit (Ping timeout: 252 seconds)
01:50:27*so quit (Ping timeout: 252 seconds)
01:51:43*euantor_ quit (Changing host)
01:51:43*euantor_ joined #nim
01:51:43*surma__ quit (Changing host)
01:51:43*surma__ joined #nim
01:51:43*sz0_ quit (Changing host)
01:51:43*sz0_ joined #nim
01:52:44*arecaceae joined #nim
01:54:15*PrimHelios joined #nim
02:04:24*banc quit (Quit: ZNC - http://znc.in)
02:09:38*PrimHelios quit (Quit: Leaving)
02:16:25*erratic joined #nim
02:19:55*banc joined #nim
02:22:51*PrimHelios joined #nim
02:34:38*rockcavera quit (Ping timeout: 245 seconds)
02:35:29*rockcavera joined #nim
02:46:17*so joined #nim
02:48:25*AlexMax_ left #nim (#nim)
02:49:21*AlexMax joined #nim
02:50:24*vlad1777d quit (Ping timeout: 252 seconds)
03:25:48*chemist69_ joined #nim
03:25:56*chemist69 quit (Ping timeout: 260 seconds)
04:28:41*endragor joined #nim
04:38:24*narimiran joined #nim
04:50:59*anamok joined #nim
05:41:28*darithorn quit ()
05:47:25*nsf joined #nim
05:48:41*cavariux quit (Quit: bye, bye!)
05:48:48*leorize quit (Ping timeout: 245 seconds)
05:49:36*cavariux joined #nim
05:50:12*cavariux quit (Client Quit)
05:54:52*cavariux joined #nim
06:09:46*cavariux quit (Quit: bye, bye!)
06:10:42*krux02 joined #nim
06:12:04*cavariux joined #nim
06:15:17*cavariux quit (Client Quit)
06:15:48krux02goood morning
06:16:09*cavariux joined #nim
06:19:09*narimiran quit (Ping timeout: 244 seconds)
06:22:08*leorize joined #nim
06:24:13anamokmorning
06:28:45anamokFor writing OOP code that is similar to Python, what library is suggested? As I saw there are several solutions using macros.
06:29:55krux02anamok, that is hard to say for me. I have very little Python experience. But the Nim way to write progras is to avoid OOP style of programming.
06:30:25anamokNim doesn't force it, but you can do OOP if you want
06:30:33krux02There is inheritance and that stuff, but Nim has other ideoms for generic reusable code that is more efficient than class hieracies.
06:32:04*shadwick joined #nim
06:32:21krux02but if you just want to port some python code with the least possible effort into Nim, or if you want to use Nim without changing your habits of programming, I can understand this idea.
06:32:40krux02anamok, can you name me examples of what you want to be able to do?
06:33:56krux02Nim isn't dynamically typed
06:34:20anamokNothing specific at the moment. I was just reading about OOP in Nim, but the syntax is a bit strange.
06:36:44anamokI'd like to create classes similarly to Python. There are macros for this, but I don't know if there is a preferred solution.
06:37:09krux02you want a class syntax?
06:37:25krux02No better get used to not use those macros.
06:37:36krux02they are not necessary.
06:38:39krux02unlike python, in Nim you don't need to "install" a method for a class. You can just create a free procedure with the "self" argument and you can already call it like a method
06:40:48krux02I have seen how you create a class in Python, and I honesty think it is quite pointless. There is a "class" body with all its methods, but then from the methods you can't directly access members of the class, you still have to prefix it with self.method
06:47:27anamokThanks. I will do some examples without the macros to get used to it.
06:51:20krux02anamok, generally try to avoid inheritance, the preferred way in Nim is composition.
06:52:10anamokDo you have a doc/link about composition in Nim?
06:52:33krux02no nothing Nim specific
06:53:10krux02composition is just objects with members instead of object that inherit something
06:57:20anamokthanks
07:06:35*flaviu quit (Remote host closed the connection)
07:06:58*flaviu joined #nim
07:08:16*Yardanico quit (Quit: Quitting)
07:08:33*JStoker quit (Ping timeout: 252 seconds)
07:08:37*Yardanico joined #nim
07:09:40*dada78641 quit (Ping timeout: 252 seconds)
07:10:12*tobbez quit (Ping timeout: 252 seconds)
07:10:26*dada78641 joined #nim
07:10:33*JStoker joined #nim
07:10:45*tobbez joined #nim
07:11:12*Guest40822 quit (Remote host closed the connection)
07:11:31*FromGitter joined #nim
07:31:13*PMunch joined #nim
07:37:14*FromGitter quit (Remote host closed the connection)
07:37:32*FromGitter joined #nim
07:40:19*anamok quit (Ping timeout: 246 seconds)
07:41:53*floppydh joined #nim
07:55:15*koppeh quit (Quit: koppeh)
07:55:22*copygirl joined #nim
08:03:12*gmpreussner quit (Ping timeout: 250 seconds)
08:03:43*gmpreussner joined #nim
08:05:48*euantor_ quit (Changing host)
08:05:48*euantor_ joined #nim
08:05:58*euantor_ is now known as euantor
08:08:45*krux02_ joined #nim
08:08:45*krux02_ quit (Read error: Connection reset by peer)
08:21:01FromGitter<bung87> `castptr UncheckedArray[uint8 (self)` when converting a ptr float32 to ptr UncheckedArray what’s the inside type? `uint8 ` or `ptr uint8 `?
08:24:37Araquint8
08:28:51*shadwick quit (Quit: Page closed)
08:30:54FromGitter<bung87> ah thanks!
08:33:37*Vladar joined #nim
08:33:50*abm joined #nim
08:34:26PMunchCasting floats to unsigned integers, have history though us nothing!
08:34:34PMunchtaught*
08:37:14PMunchJust kidding by the way. But when Ariane 5 was first launched it exploded when the computers shut down after unexpected values caused by a float to int conversion
08:38:17PMunchIt was based on the older Ariane 4 design that didn't accelerate as quickly and therefore never reached the overflow of the int. But Ariane 5 was a lot faster and the int overflowed and the whole system went boom
08:38:51PMunchThis was a cast from float64 to int16 by the way, not sure who thought that would be a good idea
08:39:00FromGitter<bung87> ah,I didnot know that
08:40:30FromGitter<bung87> I’m porting a cpp lib seems like I need implement all the `[]` `+=` `-=` procs
08:40:33PMunchHalf a billion USD rocket was lost because of hit
08:41:19PMunchWhat library?
08:41:49FromGitter<bung87> https://github.com/facebookresearch/fastText
08:43:54PMunchHuh, interesting
08:55:22FromGitter<bung87> is there a example for something in cpp like this `centroids[k * d + j2] += sign * eps` centroids is ptr float32
08:56:15FromGitter<bung87> I’m not sure I write correctly so far :(
08:58:03leorizebung87: you wanted to wrap C++ `+=` in Nim?
08:58:43FromGitter<bung87> there are so many pointer operation in the fastext
08:59:17FromGitter<bung87> I’v never programming in such low level .
09:00:17FromGitter<bung87> leorize I dunno maybe using memset or something ..
09:00:49PMunchbung87, well that is probably an array
09:01:10PMunchA pointer in C++ can also be a C style array
09:02:05PMunchSo centroids[k * d + j2] is the same as centroids + (k * d + j2)*sizeof(float32)
09:02:12*abm quit (Ping timeout: 252 seconds)
09:02:36PMunchSo what's actually going on there is += on the float located at that position
09:03:01leorizeor `cast[ptr UncheckedArray[float32]](centroids)[k * d + j2]`
09:03:25PMunchYeah, that's what you would use in Nim
09:03:34PMunchI ended up writing some strange C/Nim hybrid :P
09:03:36*krako joined #nim
09:03:46FromGitter<bung87> does it unit8 inside ?
09:03:52FromGitter<bung87> araq just told me
09:04:13PMunchThat's because you cast it to an UncheckedArray of uint8s
09:04:56PMunchWhat leorize did there was cast the centroids pointer to an unchecked array of float32, which is what C++ assumes it is
09:05:07PMunchNim is just stricter with pointers
09:05:10FromGitter<bung87> the cpp will assign the value to that offset
09:05:54FromGitter<bung87> but I get uint8 not a ptr
09:06:37PMunchWhat is the exact code you are trying to convert?
09:08:36FromGitter<bung87> just that one line code ,I mean `cast[ptr UncheckedArray[uint8]][offset]` here I will get a `uint8` ?
09:08:56PMunchYes, since you're casting to uint8..
09:10:28FromGitter<bung87> so it is a copy value store in other memory space ? then how can I assign value to original memory address
09:10:45leorizeno, it's not
09:11:33FromGitter<mratsim> do `let a = cast[ptr UncheckedArray[uint8]]` then `a[0] = 1`
09:12:03PMunchhttp://ix.io/1oPT/Nim
09:12:50PMunchbung87, the three first lines simulates a pointer to an array from C/C++
09:13:01PMunchThis is what centroids is
09:13:41*abm joined #nim
09:13:56FromGitter<narimiran> i have very limited knowledge of those things, so can somebody explain why the third line in PMunch's example isn't just `arrp = addr statarr`?
09:14:20FromGitter<bung87> ah I get you guys point , a[0] = 1 will assign to the original address
09:14:32PMunchIt could've been, but I wanted to completely remove the type information for the sake of the example
09:14:59PMunchuarr is making Nim aware that arrp is an array of floats and not a pointer to a something else. But we are just casting the pointer, so when Nim assigns to uarr[1] we can see that statarr[1] also updates it's value
09:16:05PMunchAll of this just exists in Nim as type information, all of these casts and stuff don't actually do anything, it just tells Nim what type the pointer is, and by that what procedures should be available for it
09:16:06*leorize quit (Ping timeout: 264 seconds)
09:16:41PMunchArrays have [] defined for them, so by casting our pointer to an array we can use [] on it
09:17:02PMunchIf we had tried to access something that was out of the range of the array it could lead to an error
09:17:09FromGitter<bung87> so it does like a `void*` in c /
09:18:30*vlad1777d joined #nim
09:19:17PMunchIn fact if we do this: http://ix.io/1oPV/Nim you can see that Nim now thinks the pointer is a single float, and allows us to use += on it, which works since the element pointed to be the pointer is in fact a float (an array of floats is just floats placed one after another in memory, and [] just calculates which address to retrieve a float from)
09:20:24FromGitter<narimiran> PMunch so casting this way is bit more explicit than using `addr foo`, but under the hood they are the same? or not?
09:21:08PMunchaddr foo returns the address of the variable foo
09:21:17PMunchIt's the opposite of the cast
09:21:55FromGitter<bung87> that’s interesting example
09:22:27PMunchYou see on line 3 I use addr get the address to statarr (which is the address of the first float).
09:23:03FromGitter<narimiran> hmmm, why does replacing `castpointer (statarr.addr)` with `addr statarr` work then?
09:24:01FromGitter<narimiran> as i said, my knowledge is very limited, and usually i see disclaimers "use 'cast' only if you really know what you're doing", and i don't know what i'm doing so i have never experimented with them
09:24:37PMunchAh, addr statarr (or statarr.addr) returns a ptr array[3, float64], the cast just hides what it's a pointer to
09:25:11PMunchNim keeps track of what things are a pointer to, with the cast[pointer] I hide this information from the compiler
09:26:45PMunchWe can cast it to something else as well. In this case I cast it to an integer, then I add the size of a float to the integer before casting it back to a float: http://ix.io/1oPY/Nim
09:27:23PMunchSince the floats are placed back to back in memory this is essentially the same as statarr[1]
09:28:00PMunch|float|float|float
09:28:24PMunchThe pointer initially points to the first pipe, when adding the size of a float to the pointer it now points to the second pipe.
09:29:03FromGitter<narimiran> yeiy, i can understand that :)
09:29:29FromGitter<narimiran> thanks for the illustrating example
09:29:37PMunchNo problem :)
09:33:34FromGitter<narimiran> with `arrp = addr statarr`, `arrp[]` is the whole array; with `arrp = castptr float (statarr.addr)`, you point just to the first element
09:34:29FromGitter<mratsim> https://github.com/nim-lang/graveyard fun
09:35:09PMunchnarimiran, correct
09:36:50PMunchmratsim, haha like the name :P
09:37:34PMunchHmm, I need to find something to PR for Hacktoberfest
09:37:59FromGitter<bung87> `centroids[k * d + j] += sign * eps` I re checked the code , `eps` is also a float32 ,will it hit the stack overflow ?
09:38:00FromGitter<narimiran> PMunch don't you have 4 PRs already with Options? :)
09:38:14FromGitter<technicallyagd> Obsolete meaning it should not be used? or just being kicked out of the `stdlib`?
09:38:37FromGitter<narimiran> @technicallyagd both :)
09:39:39FromGitter<narimiran> @technicallyagd this is why those packages are in the graveyard: https://github.com/nim-lang/Nim/issues/8238#issuecomment-403225632
09:39:53PMunchnarimiran, yeah. But I need 5 :)
09:40:03FromGitter<technicallyagd> PMunch if you don't mind the slightly sinister approach, you can actually make a pull request to your own repo
09:40:13PMunchbung87, why would it hit a stack overflow?
09:40:15FromGitter<technicallyagd> @narimiran Ah! I see, thank you.
09:40:50PMunchtechnicallyagd, yeah I know. But I feel that's cheating :P
09:40:54FromGitter<bung87> I mean out of the value range ?
09:41:08PMunchOh, well you could theoretically
09:41:20FromGitter<mratsim> unchecked array has their name implied has no bound checking
09:41:31FromGitter<mratsim> as*
09:42:49PMunchmratsim, that shouldn't be an issue. I assume Facebook made sure the array wouldn't access outside its bounds
09:43:03*rockcavera quit (Remote host closed the connection)
09:43:25FromGitter<bung87> oh it as it is.
09:45:46FromGitter<mratsim> btw @Vindaar do you need some help for NimYaml: https://github.com/flyx/NimYAML/pull/64 Starting tomorrow/friday I will probably use it as Ethereum 2.0 testing suite will be yamal based instead of Json based.
09:46:29FromGitter<technicallyagd> @PMunch lol indeed, since there's still 35,000+ T-shirts to go, cheating is probably not necessary.
09:51:03*rockcavera joined #nim
10:03:46FromGitter<narimiran> @PMunch there are 1443 in nim repo to pick, i'm sure you can find one to make PR :)
10:03:56FromGitter<narimiran> *1443 open issues
10:05:31FromGitter<bung87> 1443 hehe
10:06:13*xet7 joined #nim
10:08:00FromGitter<narimiran> let's make that 1337 ;) (https://en.wikipedia.org/wiki/Leet)
10:17:26FromGitter<bung87> intersting thing
10:26:35FromGitter<technicallyagd> Is there a way to know which part of the language is likely to change so one could avoid using it?
10:34:27*krux02 quit (Remote host closed the connection)
10:35:29FromGitter<narimiran> @technicallyagd there is {.experimental.} pragma for some stuff, so you should be prepared that that might change, but other than that, i think you shouldn't limit yourself too much as the language shouldn't change to much as we're preparing for v1.y
10:35:32FromGitter<narimiran> 1) v1.0
10:41:06FromGitter<kaushalmodi> Continuing a conversation from https://github.com/nim-lang/Nim/pull/9266#issuecomment-428486750: why would one pick runnableExamples vs commented rst code blocks in docstrings?
10:41:30FromGitter<kaushalmodi> Seems like both kinds of code blocks runs as tests during `nim doc`
10:43:48FromGitter<kaushalmodi> TheLemonMan: Does that commit mean that RST code blocks will run on "nim doc" only if ":test:" is found in those?
10:44:28FromGitter<kaushalmodi> If so, why do you have "Don't run it!" in that example?
10:46:15FromGitter<narimiran> @kaushalmodi because it will raise an exception? (yeah, some other example might be better to show that capability of code block)
10:46:19FromGitter<kaushalmodi> Also, you said "This was already the case when the documentation was exported as html/tex.". That's confusing too.. "nim doc" generates html? So what's the "already the case"?
10:47:37FromGitter<kaushalmodi> @narimiran I understood the exception part, but who's the "Don't run it!" for? It contradicts with ":test:".
10:47:56FromGitter<kaushalmodi> So does that code block run during "nim doc" or not?
10:48:09FromGitter<kaushalmodi> If it does, what about the exception? :)
10:50:47FromGitter<kaushalmodi> Basically I want to document for myself on the differences between (1) runnableExamples (2) rst code block with ":test:", and (3) rst code block without ":test:".
10:52:38*PrimHelios quit (Ping timeout: 250 seconds)
10:54:11Araqtechnicallyagd: stay away from .experimental and you're very safe. the not-nil strings/seqs were a bigger breaking change than what came before and afterwards
11:17:14FromGitter<xmonader> guys how do you build static binary of the whole application in nim?
11:17:40FromGitter<xmonader> I've a demo in 30 mins and i don't know how really
11:17:48*couven92 joined #nim
11:18:37Araq--app:staticlib
11:19:16Araqbut it usually alsos requires --cppCompileToNamespace:Xyz and compilation to C++
11:20:02FromGitter<xmonader> i'm also using -d:ssl
11:26:59FromGitter<xmonader> @araq it's a console app u thing --app:console would help?
11:29:16FromGitter<kaushalmodi> I don't think this will statically compile SSL, but in any case I did an experiment with building static binaries using musl, and it worked out well: https://github.com/kaushalmodi/hello_musl
11:29:39FromGitter<kaushalmodi> I'm using the same approach on a real Nim project ntangle, and it works great there too.
11:31:08FromGitter<kaushalmodi> 30 mins? May be installing ssl on your demo machine is faster :)
11:38:56*kmies joined #nim
11:40:30*kmies quit (Client Quit)
11:52:20*Flox[m] joined #nim
11:55:18*elrood joined #nim
12:03:26Flox[m]I am getting an error when a node js client sends a request to my asynchttpserver. does anybody know what this error means?
12:03:27Flox[m]Error: unhandled exception: /opt/Nim/lib/pure/ioselects/ioselectors_epoll.nim(180, 11) `
12:03:27Flox[m]not (pkey.ident == InvalidIdent)` Descriptor 14 is not registered in the selector!
12:04:41FromGitter<technicallyagd> @Araq @narimiran okay, thank you.
12:07:58*Flox[m] is now known as hohlerde
12:08:17FromGitter<xmonader> @kaushalmodi they want to use the app themselves i think i'll just record it until i figure out how to do the static binary cleanly
12:10:46FromGitter<kaushalmodi> Yeah, the static binary happens cleanly using musl, but without ssl. Please ping me if you find a solution to statically compile ssl dep too.
12:11:01FromGitter<kaushalmodi> I have another project in pipeline that can make use of that.
12:11:26*Vladar quit (Remote host closed the connection)
12:15:25*kmies joined #nim
12:16:53*kmies quit (Client Quit)
12:17:49*anamok joined #nim
12:17:51anamokhi
12:17:57hohlerdethe complete stacktrace: https://privatebin.tarakis.de/?fa68ea7c6c81ebd3#jTmy83RY8oFMAswXXro3IBEGONEzqDz8sd28P9DRCrQ=
12:17:58hohlerdeand basically the loop in my thread calling poll:
12:17:59hohlerdehttps://privatebin.tarakis.de/?41832fcd19770e59#SgADrwfbY5/SjOSR0qxSsQM26C6tu11vdT818o2uYsQ=
12:19:40anamokIs the sugar module stable (more or less)? I ask it because future was like a sandbox, things moved out of it with new releases. What about sugar?
12:19:54FromGitter<tim-st> When the stdlib starts using Concept types, should every type be redefined in each module?
12:22:31FromGitter<tim-st> I think it's better to define a `StringLike` in `system.nim` and maybe this should be separated between readonly StringLike and mutuable StringLike
12:22:41FromGitter<rokups> i need to pass a proc to a c function. is there some magic pragma that will make code pass raw function pointer instead of a magic struct that nim seems to create for procs? `exportc` somehow is not doing any difference
12:23:05*leorize joined #nim
12:23:33FromGitter<rokups> generated code is `T1_.ClP_0 = ((TM_VmYOAKcSs9cz9aBmfJ9bgam7Q_16) (entryPointWrapper)); T1_.ClE_0 = NIM_NIL; newCtx = make_fcontext(stack.stack, stack.size, T1_);` where i need `newCtx = make_fcontext(stack.stack, stack.size, &entryPointWrapper);`
12:23:38Araqrokups, look up "calling conventions", most likely you want a .cdecl annotation
12:23:51FromGitter<rokups> ah ha, thanks
12:24:18Araqanamok: the 'lc' will be deprecated the other things in there are fine I think
12:25:12FromGitter<kaushalmodi> Araq: can you comment on the runnableExamples vs rst code blocks.
12:25:20anamokAraq, will 'lc' disappear in the future? What's wrong with it? Should we use map and filter?
12:25:55FromGitter<narimiran> @anamok it is ugly! :D
12:26:07FromGitter<kaushalmodi> anamok: there are few alternatives to lc. I linked my notes yesterday so won't spam that here again.
12:26:14Araqin 0.19 we got for-loop expressions that we should make use of
12:26:38FromGitter<kaushalmodi> In there, look for List Comprehension section for lc and alternatives.
12:26:53Araqkaushalmodi: I'm still making up my mind.
12:27:19FromGitter<kaushalmodi> Araq: OK, it would be nice for one way to write docstrings tests
12:27:26anamokI learned about lc yesterday and I was happy to see that it was similar to python :)
12:27:31FromGitter<kaushalmodi> Having 2 ways is .. inconsistent :)
12:27:42Araqfor now I'm leaning towards a new '.. code-block:: nimtest' RST feature :P
12:27:44FromGitter<Vindaar> @mratsim thanks! I'm mostly done now I think. One thing to address and then fix the last test case (which I think is a simple fix). You're welcome to review the PR though!
12:27:52FromGitter<kaushalmodi> Araq: Noooo
12:28:39FromGitter<kaushalmodi> runnableExamples is a nice Nim-specific but not doc language specific feature
12:29:51Araqglad you like it, feels like nobody else does :-)
12:30:01FromGitter<tim-st> Araq: will `StringLike` also be used for `var` strings?
12:30:20Araqright now not even parseutils works with StringLike
12:30:59Araqbut that aside, it's not yet clear what the concepts need to look like.
12:31:01FromGitter<narimiran> i like it too! so that makes three of us :P
12:31:09FromGitter<tim-st> yes, but defining this in each module that uses string is a bit bad. Also StringLike could support zero copy strings when defined good
12:31:35Araqthis zero-copy-madness must stop.
12:32:09FromGitter<tim-st> it's only for database wrapper, when I see python can do it and go and others and Nim not, I'm wondering why
12:32:32Araqit's completely out of touch with how the hardware works, all cache layers *copy*
12:33:03FromGitter<tim-st> I saw benchmark with the zero copy string which was much quicker
12:33:18FromGitter<tim-st> (in another language)
12:33:29Araqand I saw benchmarks where it made no difference.
12:33:53FromGitter<tim-st> especially for range iteration with kvstore, maybe not for sqlite
12:33:59Araqwhat hurts is not the copy, it's the allocations and the resulting GC pressure
12:33:59FromGitter<kaushalmodi> About runnableExamples, @timotheecour is onboard too, so that's 4 of us
12:34:40AraqI've also seen benchmarks where memmap loses against fread
12:34:49FromGitter<kaushalmodi> (we need an official poll for this: feature request to add polling to nimforum)
12:35:26PMunchkaushalmodi, oh that would be nice
12:35:31anamokIn sequtils we have all and any, but `none` is missing. It would be useful too.
12:35:59Araqnone is just 'not any'
12:36:52FromGitter<kaushalmodi> PMunch: GitHub has a feature to add polling to issues. Araq just has to enable it.
12:37:15FromGitter<alehander42> runnableExamples is better than more custom RST stuff 10 of 10 times
12:37:20Araqthumbs up/down is ok, what does that require another app?
12:37:26anamokHow to put that in a chain? toSeq(...).any(...)
12:38:20Araqflox[m]: please report it on github
12:38:39FromGitter<kaushalmodi> Araq: It's more visual, and allows polling among non-binary options.
12:38:42hohlerdeok
12:38:54FromGitter<kaushalmodi> But in any case, I digress.
12:38:58FromGitter<alehander42> @anamok i also used list comprehensions in python, but that's because map/filter and lambdas suck there: you need to constantly write lambda and you can't `.` chain them
12:39:17Araqkaushalmodi, sorry, but did you look into nightlies? we need it
12:39:31FromGitter<alehander42> in languages like ruby, elixir, nim (randome examples) I think chaining functional methods seems nicer
12:40:41FromGitter<kaushalmodi> Araq: You mean deploying Nim builds on nightlies?
12:41:36FromGitter<narimiran> Araq: should the remaining two files (nimblepkglist.nim and website.ini) be removed from the 'web' folder?
12:42:06FromGitter<kaushalmodi> Araq: asking because there was also the thing about running htmltest on nightlies.
12:42:21Araqabout deploying Nim builds
12:42:47Araqnarimiran: yeah
12:43:06FromGitter<kaushalmodi> Araq: OK, I'll look into deploying via Travis at least. I'm not much conversant with Appveyor/Windows.
12:43:13FromGitter<narimiran> ok, i'll do it
12:43:57*krux02 joined #nim
12:44:00anamokalehander42, I agree. In Python I almost never use map and filter, but in nim they're nice. Especially with mapIt and filterIt.
12:45:08Araqsum(for a in x: for b in a: if b != 0: b) # iirc that's now possible in 0.19
12:47:05FromGitter<narimiran> Araq that looks better than `lc`!
12:47:42anamokAraq, is it like a generator expression in Python? It doesn't build a sequence, right?
12:50:15Araqit's just syntax, 'sum' needs to be a macro that does all the work
12:50:39anamokFor checking if a text doesn't contain and lowercase letters, I used this: `text.allIt(not it.isLowerAscii)`. Here `none` would look better: `text.noneIt(it.isLowerAscii)`.
12:50:54FromGitter<narimiran> web folder deleted. next in the category "boring but long overdue": all those stale branches waiting to be deleted
12:55:18Araqyeah, the branches ... I gave up on them
12:56:03Araqkaushalmodi: there is also a "github deploy" Nimble package or similar that could be useful
12:56:39FromGitter<kaushalmodi> Yes, github_release
12:57:03FromGitter<narimiran> Araq well, i'm in the cleaning mood (as you can tell :)), i'm willing to do it if you want
12:58:43livcdDid you guys try "sciter" ?
13:08:23*chemist69_ quit (Quit: WeeChat 2.2)
13:08:39*chemist69 joined #nim
13:17:02*PrimHelios joined #nim
13:26:09FromGitter<rokups> hmm is it possible that nim tries to build assembly (.S) files as native arch even if --cpu:i386 is passed?
13:31:16planetis[m]does nim need somthing like this: https://github.com/python/cpython/blob/master/Modules/mathmodule.c#L1299 ?
13:32:52anamokKotlin has none, see here: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/none.html . I just did `none` and `noneIt` in nim with templates. Can I send an issue about it on Github for further discussion?
13:33:38FromGitter<stvnfx> Hey everyone, does anyone know what "Error: 'spawn' takes a GC safe call expression” means?
13:34:02planetis[m]julia offers 'sumPairwise' and used to had this: https://en.wikipedia.org/wiki/Kahan_summation_algorithm#Further_enhancements then it got moved in a library
13:34:22PMunchanamok, why not just len == 0?
13:34:32planetis[m]which algorithm to port?
13:34:57anamokPMunch: go down to the bottom of the page. I mean the other `none`.
13:35:11FromGitter<mratsim> I think I just found the weirdest Nim bug, does the following crash for you and does removing the comment fix it? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bbe000f600c5f642384c727]
13:35:16Araqnarimiran, sure if you can do it
13:35:19anamokwhere none can have a predicate
13:37:06Araq@mratsim not really weird the doc comment means it stays an nkStmtList and somewhere in the C backend we don't understand this
13:37:12FromGitter<narimiran> Araq I would need "admin rights" (or whatever it is called to become collaborator/maintainer), so if you can give me that for the next half an hour (than take it back) i'll do it
13:37:15Araq*nkStmtListExpr
13:37:47FromGitter<mratsim> Are you saying that comments are allowed to crash the C backend? :P
13:38:37FromGitter<mratsim> oj, If I use a single # instead of ## it works, I see
13:38:41FromGitter<mratsim> oh*
13:40:29PMunchanamok, ah, that makes more sense
13:40:44PMunchfilter.len
13:41:43anamokPMunch: example: check if a string has no lowercase letters: `text.none(isLowerAscii) == true`
13:42:44anamokbut it's missing from sequtils
13:42:48FromGitter<narimiran> `text.any(isLowerAscii) == false`
13:43:01FromGitter<kaushalmodi> Just saying, Emacs Magit makes it easy to delete branches :)
13:43:16FromGitter<kaushalmodi> It's literally 2 key presses `bk`
13:43:39anamoknarimiran: yes, but that's harder to read IMO. One needs to think more :)
13:46:26anamokYou can read `text.none(isLowerAscii)` like this: "in text, no character is lowercased".
13:49:13*der quit (Remote host closed the connection)
13:49:24PMunchMakes sense I guess
13:50:02*vlad1777d quit (Ping timeout: 272 seconds)
13:51:25*derlafff joined #nim
13:54:27*couven92 quit (Read error: Connection reset by peer)
13:55:23*rockcavera quit (Remote host closed the connection)
14:00:35*TheLemonMan joined #nim
14:00:49*stefanos82 joined #nim
14:01:09TheLemonMankaushalmodi, I just wanted to show that you can keep writing your comment after the code block
14:01:54anamokI opened an issue for this addition: https://github.com/nim-lang/Nim/issues/9282
14:02:36*endragor quit (Remote host closed the connection)
14:02:51TheLemonMancan't you just use not any(...) ?
14:03:33anamok"any" is "not all". Why is there "any" then?
14:04:29PMunchany isn't not all
14:04:30TheLemonManfor the same reason we don't have != but only ==
14:04:31FromGitter<narimiran> "any" is "some". it could be one, it could be all, it could be in between
14:05:57FromGitter<technicallyagd> also, `not all` can be `none`
14:06:01FromGitter<narimiran> anamok: "In the module sequtils, we have map and filter, but none is missing" i guess you wanted to say that we have all and any?
14:07:00anamoknarimiran: right, thanks; corrected
14:09:05TheLemonManplanetis, the Kahan Babushka Neumaier algorithm!
14:09:42planetis[m]alright lol
14:09:51planetis[m]did you pick it for the name ;)
14:10:55planetis[m]I thought msum was the most presice and difficult to port but I could do it if its worth it.
14:11:05TheLemonManof course heh I don't know if that's faster than pairwise tho
14:11:27TheLemonManbut if you want to benchmark them you're in the right place at the right time
14:11:45planetis[m]pairwise is quite simple but gives wrong results when len > 125
14:12:02planetis[m]pairwise is def the fastest
14:12:09planetis[m]and msum slowest
14:12:53*nsf quit (Quit: WeeChat 2.2)
14:13:17planetis[m]i will make pr and upload all the algorithms
14:13:23*PrimHelios quit (Ping timeout: 245 seconds)
14:13:31planetis[m]Got to earn that t-shirt :p
14:16:00*PrimHelios joined #nim
14:19:57*tay_ joined #nim
14:20:28*tay_ quit (Client Quit)
14:20:47*tay_ joined #nim
14:20:48*tay_ quit (Remote host closed the connection)
14:22:30*PrimHelios quit (Ping timeout: 252 seconds)
14:30:57anamokbye
14:31:07*anamok quit (Quit: Leaving)
14:35:35*PrimHelios joined #nim
14:38:42*pigmej quit (Ping timeout: 252 seconds)
14:40:32FromGitter<mratsim> how about creating a high precision arithmetic lib :P
14:40:49*pigmej joined #nim
14:53:58*Vladar joined #nim
14:59:02*narimiran joined #nim
15:03:23*narimiran quit (Client Quit)
15:03:50*narimiran joined #nim
15:04:10*tay_ joined #nim
15:05:38*PrimHelios quit (Ping timeout: 244 seconds)
15:06:39*hzx joined #nim
15:10:03*tay_ quit (Ping timeout: 245 seconds)
15:11:58*PrimHelios joined #nim
15:14:38*PMunch quit (Quit: Leaving)
15:21:14*PrimHelios quit (Quit: Leaving)
15:25:51*endragor joined #nim
15:27:19*Pisuke joined #nim
15:28:21*MyMind quit (Ping timeout: 260 seconds)
15:30:41*endragor quit (Ping timeout: 260 seconds)
15:31:28*floppydh quit (Quit: WeeChat 2.2)
15:33:23FromGitter<Varriount> @mratsim Don't we already have an arbitrary precision arithmatic lib?
15:35:16hzxis the iup gui package still offical part of Nim? The included version is from 2009...
15:36:28FromGitter<mratsim> @Varriount arbitrary is not higher precision than high ;)
15:36:35FromGitter<mratsim> but the cost is also high
15:36:53FromGitter<mratsim> arbitrary is higher*
15:38:00TheLemonManhzx, you're lucky then, the libzip version shipped by the `zip` package is from 2007
15:38:42hzxyikes
15:38:56FromGitter<mratsim> and C is from 89 ;)
15:40:03hzxyes, but everyone should use the c11 vesion :)
15:40:22hzxor the c18
15:40:47TheLemonManthis IUP thing looks nice but Tk is still my go-to solution for portable guis
15:42:36hzxThe iup.nim wrapper were created with c2nim and then hand-crafted... if I create a new one based on the latest IUP version, where should I send it?
15:43:57TheLemonMansend a PR here https://github.com/nim-lang/iup
15:44:33hzxhm, "The wrapper was originally part of the standard library. This project was created to remove it from the standard library, update it to the latest version of IUP and integrate it with nimble."
15:45:09TheLemonMan2 out of 3 tasks were done :P
15:45:09narimiranhzx: congrats, you've became a maintainer of nimble package :)
15:46:47TheLemonManit'd be nice to have a iup-sys package with the "raw" C bindings only and a iup one where the bindings are shaped in a nim-esque form
15:46:54TheLemonMannim-eable?
15:47:00TheLemonMannim-ish?
15:47:01hzxhuh, maybe those shoes are too big for me, but will try
15:49:23hzxraw c bindings won't work in every cases
15:49:49*darithorn joined #nim
15:50:13hzxKS_a and KS_A defines had to be renamed KS_lowerA and KS-upperA for example
15:50:50hzxbecause of case insensitivity
15:51:58*Trustable joined #nim
15:52:46*shashlick joined #nim
15:53:46FromGitter<Vindaar> @mratsim so from my side I'm almost done with the yaml PR. Still have 2 questions, see in my last comment: https://github.com/flyx/NimYAML/pull/64#issuecomment-428626879 If you have any ideas, feel free to comment! :)
16:00:40narimirananybody has an idea how to fix this wrong example from the manual: https://github.com/nim-lang/Nim/issues/6217 ?
16:03:00*shashlick quit (Remote host closed the connection)
16:03:23TheLemonManyou gotta dig into the patterns.nim module to see why it triggers
16:03:38*shashlick joined #nim
16:16:15*krako left #nim (#nim)
16:20:13*TheLemonMan quit (Quit: "It's now safe to turn off your computer.")
16:22:19FromGitter<kaushalmodi> I was reading up on term rewriting ..
16:22:23FromGitter<kaushalmodi> it says "We cannot duplicate 'a' if it denotes an expression that has a side effect! Fortunately Nim supports side effect analysis"
16:22:24FromGitter<Lite5h4dow> ok, quick question, is there a GUI library for Nim that supports, windows, linux & android?
16:22:34FromGitter<kaushalmodi> should it be "We should not duplicate 'a' .."?
16:22:45FromGitter<Lite5h4dow> (and how do i compile for android?)
16:22:53*shashlick quit (Remote host closed the connection)
16:23:18*shashlick joined #nim
16:28:08leorizeLite5h4dow: There is nimx AFAIK
16:29:37Araqthere is also ui.nim
16:29:46FromGitter<kaushalmodi> trying to understand this term rewriting example:
16:29:52FromGitter<kaushalmodi> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bbe28ff1c100a4f2961c56a]
16:30:12FromGitter<kaushalmodi> prints (ignore the colons): ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bbe291482893a2f3bc559dc]
16:30:26FromGitter<kaushalmodi> why is `3` not an int?
16:31:00narimiran@kaushalmodi make template return `a+a+a` for easier disambiguation ;)
16:31:55narimirandoes this have to do with: "3 * 2.5" is ok, but "let a = 3; b = 2.5; a * b" is not ok?
16:32:54FromGitter<kaushalmodi> yep
16:33:09FromGitter<kaushalmodi> debugEcho helps know if the term rewriting is happening
16:33:17FromGitter<kaushalmodi> I started reading that section just today
16:33:30FromGitter<kaushalmodi> I couldn't understand if the term rewriting was happening or not
16:33:48FromGitter<kaushalmodi> see this other example built up on prev:
16:33:51FromGitter<kaushalmodi> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bbe29eff659e6777291b83d]
16:34:07FromGitter<kaushalmodi> that gives: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bbe29ff3844923661177139]
16:34:17FromGitter<kaushalmodi> so what's wrong with literal `3`?
16:38:46FromGitter<kaushalmodi> Also, this example gives a strange result:
16:38:50FromGitter<kaushalmodi> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bbe2b1a435c2a518e82fcb3]
16:39:09*Sembei joined #nim
16:39:19FromGitter<kaushalmodi> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bbe2b37ae7be94016333714]
16:40:34FromGitter<kaushalmodi> Even if I set x to 0 above, the "-> Term rewriting activated!" gets printed 36 times
16:40:54*Pisuke quit (Ping timeout: 252 seconds)
16:41:41leorizeit doesn't overflow? I thought that was a recursive term-writing macro
16:42:13FromGitter<kaushalmodi> hmm, I didn't get any error
16:42:26FromGitter<kaushalmodi> 36 is some magic number set internally?
16:44:59leorizeyou can run a debugger through the compiler to find out :P
16:45:13leorizes/through/on/
16:46:47FromGitter<kaushalmodi> running a debugger goes out of my skill set, but for now, I will note that 36 repetitions is an infinite loop
16:46:48FromGitter<Lite5h4dow> im getting errors compiling the examples for ui.nim
16:47:50FromGitter<Lite5h4dow> ```code paste, see link``` ⏎ ⏎ and thats just the last few lines ⏎ gtk3 is installed... [https://gitter.im/nim-lang/Nim?at=5bbe2d35e65a634336b5e6de]
16:48:22leorizehave you installed libui?
16:49:42FromGitter<Lite5h4dow> its not mentioned as a dependancy
16:50:06FromGitter<Lite5h4dow> does it not come with the nimble install?
16:50:11leorizeoh yea it can be used directly since it bundled libui already
16:50:14leorizeprobably a bug
16:50:38leorizefor now you can install libui
16:50:53FromGitter<Lite5h4dow> just pakku -S libui?
16:50:55leorizethen pass `-d:useLibUiDll` to the compiler
16:50:57leorizeyes
16:51:47FromGitter<Lite5h4dow> man, i wish shit would actually work like w/ python or c++
16:52:02FromGitter<Lite5h4dow> everything made for nim is badly packaged or half broken
16:52:42Araqfor me that was true for Python and C++ too :-)
16:53:25FromGitter<Lite5h4dow> well i dont know what packages you were using but i havent had something as bad as a missing dependancy for the actuall package.....
16:53:39leorizeit doesn't miss it
16:53:46leorizeit just didn't compile the thing for some reason
16:53:55FromGitter<Lite5h4dow> but why...
16:54:14leorizeask Araq :P
16:54:41Araqkaushalmodi: it's not an infinite loop, what happens is that diverging rewrite rules get cancelled at some point
16:55:15Araqprobably it would be better to produce a sane error message though :P
16:56:00leorizeLite5h4dow: I think I know why...
16:56:25leorizecd into the package folder
16:56:34leorize`git submodule init; git submodule update`
16:58:29FromGitter<kaushalmodi> Araq: Cool! how should I describe this issue?
16:59:11FromGitter<Lite5h4dow> @leorize nice.
16:59:42leorizeAraq: `{.compile: ("./libui/common/*.c", "common_$#.obj").}` this line compiles even when the `libui` folder is empty... is it a bug?
17:00:35*anamok joined #nim
17:00:46FromGitter<Lite5h4dow> also, add libui as a required dependency for Linux as well. it will run even if that folder is empty
17:01:00FromGitter<Lite5h4dow> instead of jsut a footnote
17:03:03leorizethe easier way is to get nimble to actually clone that folder...
17:06:16Araqleorize: not really, *.c can match 0 files
17:06:45Araqand I don't care, originally I had precise instructions how to build it and then it was "automated"
17:07:30Araqand automating a build for an unknown OS setup/environment rarely works
17:07:31FromGitter<kaushalmodi> It doesn't hurt to add a parameter called "recursive" to .nimble @dom96?
17:08:00FromGitter<kaushalmodi> then nimble simply need to do `git clone --recurse-submodules FOO`
17:15:15leorizeor maybe all you need to do is to add a task that's executed after `nimble install`
17:20:46*PMunch joined #nim
17:21:52FromGitter<Lite5h4dow> i forgot to ask, does this compile to android too?
17:21:59FromGitter<Lite5h4dow> ui.nim i mean
17:27:15FromGitter<xmonader> @kaushalmodi well if i've the luxury of time, been thinking to rewrite the whole thing in go now
17:28:46FromGitter<Lite5h4dow> anyone?
17:29:40FromGitter<kaushalmodi> @xmonader oh, you are thinking of switching to Go?
17:30:05FromGitter<xmonader> I've been coding in go for 2 years at least..
17:31:34Araqleorize: yeah at least the task can check there are some .c files
17:31:45FromGitter<kaushalmodi> @xmonader ok, so you started exploring Nim after that..
17:31:59PMunchLite5h4dow: https://github.com/andlabs/libui/issues/35
17:32:05PMunchlibui doesn't support Android
17:32:12PMunchBut Nim can compile to Android
17:32:46FromGitter<xmonader> @kaushalmodi I professionally use Python and Go, been trying to push nim a little bit in my current company
17:33:17FromGitter<kaushalmodi> cool
17:35:58anamokIs there a REPL for Nim?
17:36:13FromGitter<xmonader> however, today i was surprised by the fact they expect the current app to work cross platform, in one statically linked binary -thought this part was easy- :D
17:36:35FromGitter<alehander42> i found out i've considered nim in a "language-to-choose for a tool" report in my prev company in 2016
17:36:38narimirananamok: there's https://github.com/AndreiRegiani/INim
17:36:54FromGitter<alehander42> but i had no memory of that after when I started actually using nim
17:37:05FromGitter<kaushalmodi> my start of notes on TRM: https://scripter.co/notes/nim/#term-rewriting-macros
17:37:36anamokgreat, thanks
17:37:58FromGitter<Lite5h4dow> ty @PMunch
17:38:55FromGitter<alehander42> @anamok there's gonna be a better repl after https://github.com/nim-lang/Nim/issues/8927
17:39:14FromGitter<alehander42> eventually
17:41:16FromGitter<Lite5h4dow> nimx fails to install via nimble
17:41:18FromGitter<Lite5h4dow> -_-
17:41:29*SenasOzys joined #nim
17:41:35FromGitter<Lite5h4dow> idk anymore
17:42:22anamoknarimiran: "nimble install inim" fails
17:43:05narimirananamok: yeah, now i see several people have reported that already
17:43:30narimirantry to do `nimble install inim@#head` and see if it works
17:43:33FromGitter<kaushalmodi> anamok: inim has that backward incompatible nil string issue
17:43:42FromGitter<kaushalmodi> narimiran: same issue with that
17:43:57anamokshould i install nim 0.18?
17:43:58narimiran@kaushalmodi when did you try that?
17:44:01FromGitter<Lite5h4dow> jnim fails too
17:44:24FromGitter<kaushalmodi> narimiran: just now
17:44:31narimiranoh, now i see that the fix is not merged
17:44:55FromGitter<kaushalmodi> @Lite5h4dow it would be useful to report the nimble install failure in nimx repo
17:45:09FromGitter<kaushalmodi> there's a slim chance that nimx dev is reading this
17:45:54FromGitter<Lite5h4dow> its an issue with a dependancy for nimx
17:46:02FromGitter<Lite5h4dow> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bbe3adac7bf7c3662eaab9b]
17:47:05FromGitter<Lite5h4dow> probably a typo thanks to whoever whrote teh nimble file for jnim
17:47:31FromGitter<Lite5h4dow> (>'-')>
17:51:02FromGitter<kaushalmodi> Fixing inim was easy
17:51:07FromGitter<kaushalmodi> (https://files.gitter.im/nim-lang/Nim/x9dr/image.png)
17:51:20FromGitter<kaushalmodi> anamok, narimiran: I am sending a PR soon
17:51:30*Tortice quit (Remote host closed the connection)
17:51:45anamokthat was quick
17:51:51narimiran:thumb_up:
17:52:05*Tortice joined #nim
17:52:07FromGitter<kaushalmodi> you can do this fix locally:
17:52:11FromGitter<kaushalmodi> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bbe3c4b600c5f642386db41]
17:52:58*wildlander joined #nim
17:53:04FromGitter<kaushalmodi> granted that I haven't tested it throughly to check if that preload being "" was ever a valid case
17:53:20FromGitter<kaushalmodi> but seems to work fine based on brief trial
17:55:37anamokthanks, I could build it
17:55:55FromGitter<Lite5h4dow> wait, why is nim still on 0.18 on arch?
17:56:08*MyMind joined #nim
17:56:15narimiranbecause nobody updated it? :P
17:56:29*Tortice quit (Remote host closed the connection)
17:56:48*Sembei quit (Ping timeout: 252 seconds)
17:56:53*Tortice joined #nim
17:59:10FromGitter<kungtotte> It's a better idea to use choosenim anyway, since it lets you keep multiple toolchains installed and switch between them.
17:59:16narimiran+1
17:59:45FromGitter<Lite5h4dow> screw this, ive spent an entire afternoon for nothing. im going back to c#
18:00:56narimiran?
18:01:13*PrimHelios joined #nim
18:01:15FromGitter<Lite5h4dow> (the reason nim is still on 0.18 is because 0.19 dosent work on arch....)
18:01:37narimirani use manjaro (arch derivative), and 0.19 works just fine
18:01:48FromGitter<kungtotte> Same here
18:02:01FromGitter<Lite5h4dow> i updated arch this morning
18:02:02FromGitter<kungtotte> I install it via choosenim though
18:02:14FromGitter<Lite5h4dow> nim wasnt on the pakku update list
18:02:36FromGitter<Lite5h4dow> https://www.archlinux.org/packages/community-testing/x86_64/nim/
18:02:47FromGitter<Lite5h4dow> nim 0.19 is still undergoing community testing
18:02:53narimiranjust to `curl https://nim-lang.org/choosenim/init.sh -sSf | sh` and install nim via choosenim and you're ready to go
18:02:55FromGitter<Lite5h4dow> how do you have 0.19 on arch?!!
18:03:11FromGitter<Lite5h4dow> ty
18:03:21narimiransee the details here: https://github.com/dom96/choosenim/
18:03:28FromGitter<Lite5h4dow> why isnt this the default install via pacman?
18:03:35FromGitter<Lite5h4dow> why is everything so segmented?
18:03:54FromGitter<SolitudeSF> why the hell nim has python as dep on arch? or bash? did someone just randomly put them there?
18:04:36FromGitter<alehander42> do people really expect the newest 0.x version from os package managers?
18:04:45FromGitter<Lite5h4dow> yes....
18:04:54narimiran@alehander42 in arch: yes
18:04:59FromGitter<kaushalmodi> @Lite5h4dow just clone and build locally
18:05:10FromGitter<Lite5h4dow> arch is normally very well maintained with the core packages from my experience
18:05:31FromGitter<Lite5h4dow> aur not so much
18:05:53FromGitter<Lite5h4dow> but core normally always stays up to date
18:06:24FromGitter<alehander42> maybe, i haven't used arch indeed :D
18:06:54narimiranit is famous for being "bleeding edge"
18:07:08FromGitter<Lite5h4dow> hence why i run it
18:08:09narimiran@Lite5h4dow if you want to be on the bleeding edge, then choosenim is the way to go: you can have both stable 0.19 version, and you can easily rebuild every day the newest 0.19.1 devel version
18:08:35FromGitter<Lite5h4dow> ty
18:08:55FromGitter<Lite5h4dow> i just get annoyed when things aren't packaged properly.
18:09:16FromGitter<Lite5h4dow> not many people use my software, but if they do they have all the information they need.
18:09:20FromGitter<kungtotte> 1) 19 is in community-testing. If you want to be bleeding edge set your repos accordingly...
18:09:28narimiranwell, after you cool down, you should definitely mail the maintainer that he should update nim package ;)
18:10:09FromGitter<Lite5h4dow> @kungtotte how do you think i found out it didnt work...
18:10:37FromGitter<Lite5h4dow> will do @narimiran
18:13:55FromGitter<xmonader> @kaushalmodi with ur article on static deployment ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bbe4163ae7be9401633eb18]
18:14:22FromGitter<tim-st> the update for arch is in the testing branch, dont know why: https://www.archlinux.org/packages/community-testing/x86_64/nim/
18:15:18FromGitter<kaushalmodi> @xmonader hmm, I haven't used musl with -d:nimDebugDlOpen and pcre
18:15:39FromGitter<kaushalmodi> (also not sure what that switch does yet)
18:15:50FromGitter<kaushalmodi> anamok: btw that PR got merged
18:15:54FromGitter<kaushalmodi> you can install inim from its head
18:20:52FromGitter<xmonader> @kaushalmodi well that flag was suggested after failing execution ⏎ ⏎ ```could not load: libpcre.so(.3|.1|) ⏎ compile with -d:nimDebugDlOpen for more information``` [https://gitter.im/nim-lang/Nim?at=5bbe4304c7bf7c3662eaf1db]
18:21:18FromGitter<kaushalmodi> yeah, musl does not have pcre lib as part of it
18:21:33FromGitter<kaushalmodi> this is outside of my knowledge area
18:21:53FromGitter<kaushalmodi> somehow you need to get a static lib for pcre and bake that into the nim compiled binary
18:22:07FromGitter<kaushalmodi> hopefully someone else can chime in
18:22:28FromGitter<xmonader> pfff it's docopt who requires pcre -_-
18:23:16FromGitter<kaushalmodi> use cligen!
18:23:29PMunchIs Nim docopt compile-time?
18:24:11FromGitter<xmonader> @kaushalmodi cligen doesn't support features needed
18:24:23FromGitter<xmonader> @PMunch ?
18:24:54FromGitter<kaushalmodi> which are those?
18:25:10FromGitter<xmonader> subcommands dispatching.
18:25:40FromGitter<kaushalmodi> may be I don't understand.. by something like "app sub1 --foo" and "app sub2 --foo"?
18:26:07FromGitter<xmonader> like ⏎ docker container list ⏎ docker container exec --cmd=X
18:26:22FromGitter<kaushalmodi> it does
18:26:51FromGitter<xmonader> No https://github.com/c-blake/cligen/issues/13
18:27:48FromGitter<kaushalmodi> understood
18:28:01FromGitter<kaushalmodi> there's a workaround though
18:28:21FromGitter<kaushalmodi> you use `seq[string]` and the switches in the first level dispatch commands too
18:28:40FromGitter<kaushalmodi> when using a for loop over the seq[string] arg, you call the respective command
18:29:04FromGitter<xmonader> back to docopt then :)
18:29:19FromGitter<kaushalmodi> yeah :)
18:29:28FromGitter<kaushalmodi> I see that you are already aware of that workaround
18:29:33FromGitter<Lite5h4dow> @narimiran is there any way to get choosenim to install nim to /bin?
18:30:16FromGitter<kaushalmodi> @Lite5h4dow if you are comfortable with bash script, you can look at my custom install script
18:30:16FromGitter<Lite5h4dow> since the nim VScode plugin dosent support having nim installed to ~/.nimble
18:30:21FromGitter<xmonader> i am i even tried to hack on the dispatch proc partially worked but was swamped
18:30:48FromGitter<Lite5h4dow> @kaushalmodi ill give it a look, could you link me?
18:31:22FromGitter<kaushalmodi> Here: https://ptpb.pw/VD3b/bash
18:31:35FromGitter<kaushalmodi> you should need to update just line 48 that sets `nim_install_dir`
18:36:02FromGitter<Lite5h4dow> ty @kaushalmodi ill give it a try
18:41:54*PrimHelios quit (Ping timeout: 252 seconds)
18:51:05*PrimHelios joined #nim
18:51:34FromGitter<mratsim> @kaushalmodi I tried term-rewriting templates in Arraymancer but it was a bit of a hit and miss
18:52:48FromGitter<mratsim> Like those don’t work: https://github.com/mratsim/Arraymancer/blob/master/src/math_ops_fusion/math_ops_fusion.nim#L32-L42 ⏎ ⏎ But those do: https://github.com/mratsim/Arraymancer/blob/master/src/tensor/optim_ops_fusion.nim#L54-L75
18:54:31FromGitter<kaushalmodi> yeah, as I started writing notes to understand TRM, I ended up with a lot of questions
18:54:58FromGitter<kaushalmodi> I don't understand why many things don't work as I thought I understood its syntax works
18:55:42FromGitter<kaushalmodi> here's the basic "why?": ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bbe4b2ec7bf7c3662eb3154]
18:56:07FromGitter<kaushalmodi> it's not `int{lit}` and still that `echo 3 * 2` doesn't activate TRM
18:56:30FromGitter<kaushalmodi> it
18:56:52FromGitter<kaushalmodi> *it's as if that "3 * 2" op finishes before the `*` TRM is checked
18:57:18FromGitter<xmonader> @kaushalmodi from the brothers in rust https://github.com/emk/rust-musl-builder addresses also openssl
18:57:24FromGitter<kaushalmodi> trying again: \*it's as if that "3 \* 2" op finishes before the `*` TRM is checked
18:58:15anamokkaushalmodi, I just read your message. Congrats for the merged PR.
18:58:28FromGitter<kaushalmodi> @xmonader thanks, though I don't how how to translate that to nim
18:58:38FromGitter<kaushalmodi> hopefully you or someone else does, and writes about it
18:58:47Araqas I said, there is not much to understand here, sadly this feature is underdeveloped and the spec is imprecise
19:03:58Araqbut it's awesome and we'll make it work better :P
19:04:30FromGitter<kaushalmodi> @xmonader I don't understand Docker, but I'd have to guess that https://github.com/emk/rust-musl-builder/blob/master/Dockerfile#L72-L79 needs to be translated to the .travis.yml
19:04:54FromGitter<kaushalmodi> and "some" switches need to be added to the .nims to fetch that statically built openssl lib
19:05:05*Trustable quit (Remote host closed the connection)
19:14:33hzxI finished upgrading iup.nim from 2009 to 2018
19:14:47hzxnow I have to learn how to make a pull request
19:17:04FromGitter<kaushalmodi> hzx: that sounds like a sweet update :)
19:20:29*PMunch quit (Remote host closed the connection)
19:21:08*rockcavera joined #nim
19:32:13*tay_ joined #nim
19:34:57*PrimHelios quit (Ping timeout: 268 seconds)
19:35:04FromGitter<xmonader> @kaushalmodi yeah think it's bit straightforward
19:43:20*zachk joined #nim
19:47:10FromGitter<xmonader> @kaushalmodi ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bbe573e271506518decaf88]
19:47:34*niew joined #nim
19:47:59FromGitter<xmonader> i extracted it from the docker file ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bbe576fe65a634336b74109]
19:48:12FromGitter<xmonader> mine is installed at /usr/lib/musl not /usr/local/musl but should be fine
19:51:46FromGitter<kaushalmodi> @xmonader Thanks!
19:52:53FromGitter<xmonader> urw, trying now with pcre
19:54:12FromGitter<kaushalmodi> so that builds libssl.a. Then how is it linked during Nim compilation?
19:54:22FromGitter<kaushalmodi> what extra switches are needed?
19:55:03FromGitter<kaushalmodi> or probably no extra switches are needed because the libs live in the musl lib dir?
19:57:09FromDiscord<An unconspicuous looking friend> are there any templates/macros in stdlibs for getting generic parameters from types?
19:57:32FromGitter<mratsim> there is a PR, or you can use my macros
19:57:55FromDiscord<An unconspicuous looking friend> not needed all that much, just wondering if I was missing something
19:58:01FromGitter<xmonader> @kaushalmodi i believe it's passL:libssl.a
19:58:04FromDiscord<An unconspicuous looking friend> I just needed to access a single one
19:58:07FromGitter<mratsim> https://github.com/nim-lang/Nim/pull/8554
19:58:34FromGitter<mratsim> or https://github.com/numforge/loop-fusion/blob/master/loopfusion.nim#L3-L12
19:59:30FromGitter<mratsim> actually this one is shorter and maybe more generic: https://github.com/mratsim/Arraymancer/blob/master/src/private/ast_utils.nim#L42-L44
20:00:36FromGitter<mratsim> but basically do a `getTypeInst` on your input, then do `echo foo.treerepr` and check the index you need to use to get the generic type
20:01:17FromDiscord<An unconspicuous looking friend> so far this was all I needed: template etype[N, T](a: array[N, T]): type = T
20:01:30FromDiscord<An unconspicuous looking friend> but thanks for info anyway
20:01:39*tay_ quit (Ping timeout: 252 seconds)
20:01:49FromGitter<mratsim> if the subtype is passed as a generic param it’s much easier indead
20:01:52FromGitter<mratsim> indeed*
20:02:06FromGitter<xmonader> @kaushalmodi ``` ⏎ crt1.o libc.a libdl.a libpcre32.a libpcrecpp.la libpthread.a libutil.a rcrt1.o ⏎ crti.o libcrypt.a libm.a libpcre32.la libpcre.la libresolv.a libxnet.a Scrt1.o ⏎ crtn.o libcrypto.a libpcre16.a libpcre.a libpcreposix.a librt.a musl-gcc.specs ⏎ engines libc.so libpcre16.la libpcrecpp.a libpcreposix.la libssl.a
20:02:06FromGitter... pkgconfig ... [https://gitter.im/nim-lang/Nim?at=5bbe5abef659e6777293420a]
20:02:46FromGitter<mratsim> in my case I couldn’t because Nim doesn’t have higher kinded type like foo\A, T: seq\[A\ (x: T)
20:02:47planetis[m]Araq: create another issue? https://github.com/nim-lang/Nim/issues/9263#issuecomment-428705008
20:03:29*tay_ joined #nim
20:03:42hzxFirst PR in my life :)
20:05:08FromGitter<xmonader> it worked!!! @kaushalmodi
20:06:07FromGitter<kaushalmodi> @xmonader 👍
20:06:10*MyMind quit (Quit: WeeChat 2.3-dev)
20:06:15FromGitter<kaushalmodi> please write this up somewhere
20:06:25FromGitter<kaushalmodi> in nimdays or Nim wiki or as a guest post on Nim site
20:06:32FromGitter<xmonader> oh god it works! i'm so happy!
20:07:13*Vladar quit (Remote host closed the connection)
20:07:28FromGitter<xmonader> @kaushalmodi i'll add it to the issue u created and maybe u can give another look and make it better `scripted` to have a better build?
20:08:29FromGitter<kaushalmodi> @xmonader probably have a NimScript or something to build the static libs of ssl/pcre and then the app build will use those
20:09:21FromGitter<xmonader> yeah that's the plan for my tmw :)
20:15:03*hzx quit (Quit: Going offline, see ya! (www.adiirc.com))
20:22:12*narimiran quit (Ping timeout: 252 seconds)
20:26:06FromGitter<xmonader> Here's an example with statically built against libssl ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bbe605d435c2a518e84b00a]
20:28:37*niew quit (Quit: Page closed)
20:30:14anamokbye
20:30:41*anamok quit (Remote host closed the connection)
20:35:44FromGitter<xmonader> @Araq despite the passL:libssl.a when i do ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ I always hit the else? can you give me some guidance? [https://gitter.im/nim-lang/Nim?at=5bbe62a0600c5f6423880e57]
20:37:03FromGitter<kaushalmodi> maybe you need explicit `-d:ssl` too?
20:40:10FromGitter<xmonader> yeah true, indeed! also now i need libcrypto.so :D this is hilarious :D
20:44:28FromGitter<kaushalmodi> @xmonader https://forum.nim-lang.org/t/4149#25967
20:44:38FromGitter<kaushalmodi> I think that's the last thing remaining
20:47:36FromGitter<xmonader> checking it thank you
20:53:19FromGitter<xmonader> nim --passL:-static --gcc.exe:musl-gcc --gcc.linkerexe:musl-gcc -d:ssl --dynlibOverride:libssl --dynlibOverride:libcrypto --passL:/usr/lib/musl/lib/libssl.a --passL:/usr/lib/musl/lib/libcrypto.a --out:/tmp/dmdm c /tmp/dmdm.nim ⏎ ⏎ Hint: used config file '/home/striky/.choosenim/toolchains/nim-0.19.0/config/nim.cfg' [Conf] ⏎ ⏎ /usr/bin/ld: /home/striky/.cache/nim/dmdm_d/stdlib_openssl.c.o: in function
20:53:19FromGitter... `SSL_library_init_jYbJB8dFb3nVeuPiifklXQ': ... [https://gitter.im/nim-lang/Nim?at=5bbe66bebbdc0b25051c0e18]
20:54:37FromGitter<xmonader> Good night now totally exhausted
20:57:33*tay_ quit (Ping timeout: 245 seconds)
21:02:23planetis[m]i dont know will make one and see
21:02:37*zachk quit (Changing host)
21:02:37*zachk joined #nim
21:09:06FromGitter<kaushalmodi> @xmonader I got pcre baked into nims!!
21:45:45*tay_ joined #nim
21:45:55*vlad1777d joined #nim
21:55:32*Jesin quit (Quit: Leaving)
21:56:41FromGitter<kaushalmodi> how do I pass "-I/path/to/include" to nim?
21:57:36FromGitter<kaushalmodi> asked here too soon :) --passC
21:57:48*Jesin joined #nim
22:00:35*tay_ quit (Quit: Leaving)
22:09:13FromGitter<kaushalmodi> Some awesome collaboration @xmonader 👍 Now .nims is used like shell script to build pcre statically and then link to it :D
22:09:44FromGitter<kaushalmodi> Now https://github.com/kaushalmodi/hello_musl/blob/master/config.nims can be used to run "nim musl -d:pcre foo.nim"
22:24:14*ryuo joined #nim
22:35:24AlexMaxman this is a pain in the neck
22:35:58AlexMaxc2nim seems to think that any use of a special set of identifiers means that --nep1 shouldn't capitalize them
22:36:58AlexMaxnot really sure why the exceptions....after all, if a c file is defining its own 'int' (or more likely foo_int that gets truncated) type, it's probably not the same thing as a nim 'int' and should be kept distinct
22:37:49AlexMaxbut the more curious thing I'm finding is that one of the identifiers isn't being capitalized
22:38:46AlexMaxnk_cursor is being turned into cursor*
22:39:06AlexMaxeven though the structs above and below it are capitalized properly
22:45:06*krux02 quit (Remote host closed the connection)
23:11:22*elrood quit (Quit: Leaving)
23:35:08*platoff quit (Read error: Connection reset by peer)
23:35:08*Jesin quit (Quit: Leaving)
23:35:18*SenasOzys quit (Remote host closed the connection)
23:35:40*SenasOzys joined #nim
23:35:58*xet7 quit (Remote host closed the connection)