<< 24-02-2019 >>

00:15:37smitopWhy is this happening? https://usercontent.irccloud-cdn.com/file/guwrNmzK/image.png
00:15:50*narimiran quit (Ping timeout: 250 seconds)
00:18:42smitopWhat use does nimforum have for my physical location?
00:22:04smitopI've never seen that before
00:25:23*rnrwashere quit (Remote host closed the connection)
00:26:17*noeontheend quit (Ping timeout: 245 seconds)
00:28:52*rnrwashere joined #nim
00:46:06*rnrwashere quit (Remote host closed the connection)
00:47:59*rnrwashere joined #nim
01:02:44*rnrwashere quit (Remote host closed the connection)
01:07:33*rnrwashere joined #nim
01:09:38*rnrwashere quit (Remote host closed the connection)
01:10:26*zachk quit (Quit: night)
01:10:36*rnrwashere joined #nim
01:33:20*abm quit (Ping timeout: 246 seconds)
01:42:38*abm joined #nim
01:54:12*abm quit (Ping timeout: 250 seconds)
01:58:10*rnrwashere quit (Remote host closed the connection)
02:04:39*rnrwashere joined #nim
02:09:29*ng0 quit (Quit: Alexa, when is the end of world?)
02:12:28*rnrwashere quit (Remote host closed the connection)
02:18:38*rnrwashere joined #nim
02:37:53*rnrwashere quit (Remote host closed the connection)
02:38:11*rnrwashere joined #nim
02:42:57*rnrwashere quit (Remote host closed the connection)
02:46:01*rnrwashere joined #nim
02:49:20*rnrwashere quit (Remote host closed the connection)
02:59:46*rnrwashere joined #nim
03:02:33*banc quit (Quit: Bye)
03:11:03FromGitter<deech> `fieldPairs` has the type signature `iterator fieldPairs*T: tuple|object (x: T): RootObj` and is used as `for name, value in fieldPairs(...): ...`. What is the type of `name` in this case? Is it some kind of symbol or it just coerced into a `string` by the iterator?
03:16:42FromGitter<Varriount> @deech It's an expression type
03:18:25FromGitter<deech> @Varriount Thanks! Where should I look for it in the compiler source? Looking at the def. of `RootObj` wasn't helpful.
03:18:55FromGitter<Varriount> Unfortunately I don't really know. Perhaps where the magic procedures are handled?
03:25:16*banc joined #nim
03:33:55*rnrwashere quit (Remote host closed the connection)
03:58:02*smitop quit (Quit: Connection closed for inactivity)
04:04:31*rnrwashere joined #nim
04:12:23*rnrwashere quit (Remote host closed the connection)
04:13:35*rnrwashere joined #nim
04:22:36*rnrwashere quit (Remote host closed the connection)
04:30:29*aguspiza quit (Ping timeout: 255 seconds)
04:31:48*rnrwashere joined #nim
04:34:23*rnrwashere quit (Remote host closed the connection)
04:35:46*rnrwashere joined #nim
04:38:37*rnrwashere quit (Remote host closed the connection)
04:41:37*nsf joined #nim
04:53:35*rnrwashere joined #nim
05:00:39*rnrwashere quit (Remote host closed the connection)
05:11:14*rnrwashere joined #nim
05:12:17*rnrwashere quit (Remote host closed the connection)
05:14:06*rnrwashere joined #nim
05:27:20*noeontheend joined #nim
05:46:59*noeontheend quit (Ping timeout: 255 seconds)
05:49:44*Marumoto joined #nim
05:51:10*rnrwashere quit (Remote host closed the connection)
05:52:00*Marumto quit (Ping timeout: 246 seconds)
05:55:11*rnrwashere joined #nim
06:16:54*dddddd quit (Remote host closed the connection)
06:34:55*nsf quit (Quit: WeeChat 2.3)
06:43:47*sDF_ joined #nim
07:06:11*sDF_ quit (Ping timeout: 256 seconds)
07:23:42*Marumoto quit (Ping timeout: 246 seconds)
07:29:18*rnrwashere quit ()
07:41:48*narimiran joined #nim
07:48:33*nsf joined #nim
08:00:00*gmpreussner quit (Quit: kthxbye)
08:03:12*salewski joined #nim
08:03:22Zevv~
08:04:43*gmpreussner joined #nim
08:04:57salewskinarimiran, from https://nim-lang.org/documentation.html we now get the 0.19.9 github docs
08:05:11narimiransalewski: yes, on purpose, until 0.20 is out
08:05:19salewskilike https://nim-lang.github.io/Nim/manual.html and https://nim-lang.github.io/Nim/lib.html
08:05:37salewskiOK, fine for me. Bye.
08:05:51*salewski quit (Client Quit)
08:32:17*Arlenx joined #nim
08:35:54*neceve quit (Ping timeout: 250 seconds)
08:36:15*neceve joined #nim
08:54:17*lritter joined #nim
08:56:17*neceve quit (Ping timeout: 245 seconds)
09:03:59*neceve joined #nim
09:05:16*sealmove joined #nim
09:09:48*sealmove quit (Ping timeout: 268 seconds)
09:11:51*Vladar joined #nim
09:18:57Araqdoes anybody know when we introduced pragmas for enum fields?
09:22:00Araqok, it was added in December...
09:25:23Araqyay 0.19.4 lacks it, I am free to change it
09:27:28FromGitter<matrixbot> `Juan Carlos` pragmas deserve vacations too :P
09:29:58*leorize joined #nim
10:04:54*nsf quit (Quit: WeeChat 2.3)
10:25:59*narimiran quit (Ping timeout: 244 seconds)
10:27:10*ng0 joined #nim
10:36:12Araqhttps://perception-point.io/resources/research/analysis-and-exploitation-of-a-linux-kernel-vulnerability/
10:36:49Araqwould my saturated sticky integer semantics have prevented this? the answer is: Yes.
10:37:39Araqwe are building castles on quicksand with these terrible "wrap around integers".
10:48:30Zevvwhat would you propose then, with modern hardware still lacking proper saturated arithmetic?
10:51:39dom96> <smitop> Why is this happening? https://usercontent.irccloud-cdn.com/file/guwrNmzK/image.png
10:51:44dom96Now that is super strange.
10:52:09dom96My best guess is it's one of your browser extensions asking for the location. The forum doesn't do that.
11:04:15*ng0 quit (Remote host closed the connection)
11:05:18*ng0 joined #nim
11:07:06FromGitter<kayabaNerve> I know Google is saying f-it, SPECTRE can't be solved in software, but now I'm questioning how many of these critical bugs could be solved, without 50% performance loss, if you built the OS around it.
11:07:26FromGitter<kayabaNerve> (around making sure these bugs can't be abused)
11:09:59*vlad1777d joined #nim
11:13:34AraqZevv: emulate it in software until the hardware gets there.
11:14:39FromGitter<matrixbot> `Juan Carlos` Having AMD I scaped some of those, ARM just launched smaller (Nm) CPU too.
11:15:57FromGitter<matrixbot> `Juan Carlos` The stuff inside is smaller I mean, probably frees more room for more cores.
11:20:54AraqZevv: in fact, we could embrace the FP math to give us +-Infinity values
11:21:19AraqI don't think atomicInc works on floats though :-/
11:25:28*neceve quit (Ping timeout: 268 seconds)
11:25:43*neceve joined #nim
11:27:54Araqwell a CAS loop can do it
11:35:47Zevvyour Z3 question from yesterday changes of course with taking overflows in account
11:36:15Zevvhttp://paste.debian.net/1069918/. The answer from Z3 is that this does not hold when len(a) == #x7ffffffc
11:42:32Araqoverflows trap in Nim though so it's still correct
11:44:13*neceve quit (Ping timeout: 245 seconds)
11:44:23*neceve joined #nim
11:48:53*stefanos82 joined #nim
11:54:16Zevvthat makes sense. so, what would be next then, proving-wise?
11:55:01Zevvif you say "I can give you precondition this and that", where do those come from?
12:14:44*dddddd joined #nim
12:16:25*nsf joined #nim
12:33:20*neceve quit (Ping timeout: 255 seconds)
12:34:29*neceve joined #nim
12:35:27*seerix joined #nim
12:50:09*krux02 joined #nim
12:52:55*Vladar quit (Remote host closed the connection)
12:59:12*vlad1777d quit (Ping timeout: 245 seconds)
13:05:56*volkov joined #nim
13:06:24AraqZevv: well they come from the Nim compiler, what it knows about Nim's semantics, our 'range' type
13:06:33Araqand about the control flow
13:06:47Araqand the compiler understands what 'countup' and 'countdown' mean
13:21:08dom96does rand(0.0 .. 1.0) ever give 1.0? It should since HSlice is inclusive, right?
13:25:52Araqit's technically hard to do
13:26:02Araqso I don't think it can produce 1.0
13:26:14dom96I see. Fair enough.
13:27:21Araqbetter work with 1..100 and div by 100 to get a fraction
13:28:42dom96I'm writing my own simpler RNG so I was actually wondering how to solve it
13:28:47dom96but it's not that big of a problem
13:33:15Zevvghehe, let u = (0x3FFu64 shl 52u64) or (x shr 12u64)
13:35:36Araqcan we get a readLn for 0.20?
13:36:26Araqor something with a better name
13:40:02*volkov quit (Quit: volkov)
13:40:19*krux02 quit (Remote host closed the connection)
13:49:43Zevvlike 'readline', but then native Nim?
13:55:27Araqwith a \n at the end to be able to say "EOF"
14:09:08FromGitter<alehander42> Araq aren't countdown etc just stdlib
14:10:11FromGitter<alehander42> It's better if the compiler can understand the math effect of those functions purely based on their signature / something like that
14:26:19*vlad1777d joined #nim
14:27:29FromGitter<Varriount> Araq: why not just add an optional argument to readline?
14:27:40*narimiran joined #nim
14:43:03Araqalehander42: too hard so I special cased it
14:44:41AraqVarriount: bah, optional arguments everywhere, that's why
14:45:41Araqbecause the old version should be deprecated, otherwise we need the optional argument in the 'lines' iterator too, for "consistency"
14:46:20Araqand now that 'import io' becomes a thing, it's the right time to get the API right
15:06:01*nsf quit (Quit: WeeChat 2.3)
15:08:18*neceve quit (Remote host closed the connection)
15:09:27*nsf joined #nim
15:16:33*sealmove joined #nim
15:20:10*Trustable joined #nim
15:40:05*couven92 joined #nim
15:42:37*sealmove quit (Quit: WeeChat 2.4)
16:15:33federico3how can i create a File object from an fd?
16:24:37federico3aha: open(..) Creates a File from a filehandle with given mode.
16:24:38*Arlenx quit (Read error: Connection reset by peer)
16:28:47*smitop joined #nim
17:09:12*Tyresc joined #nim
17:23:24FromGitter<Varriount> Araq: Well, for API ideas, I would suggest looking at other languages (Go might be the first place to look)
17:23:47*ldlework stares.
17:25:07*FromGitter * Varriount stares
17:39:16*nsf quit (Quit: WeeChat 2.4)
17:42:07FromGitter<Varriount> Anyone know of a way to disable the standard sigsev fault handler?
17:48:42*vlad1777d quit (Remote host closed the connection)
17:48:49Araq-d:noSignalHandler
17:49:31AraqVarriount: I don't need API ideas really, all we need to do is to deprecate 'endOfFile' as it's the wrong idea for streams
17:49:49*vlad1777d joined #nim
17:49:54Araqand an old leftover from Nim's Pascal roots.
17:52:47FromGitter<Varriount> Araq: What do I do if I want to have Nim call a different C compiler ('afl-clang') but treat it the same as Clang?
17:56:04*a_chou joined #nim
17:56:05*a_chou quit (Remote host closed the connection)
17:56:41*a_chou joined #nim
17:57:43*a_chou quit (Client Quit)
17:58:14*a_chou joined #nim
17:58:23*a_chou quit (Client Quit)
17:59:13*a_chou joined #nim
17:59:43*Trustable quit (Remote host closed the connection)
18:08:07*Trustable joined #nim
18:15:20Araqyou edit the nim.cfg to use some other 'clang.exe = ...'
18:31:23*a_chou quit (Ping timeout: 258 seconds)
18:37:04*smitop quit (Quit: Connection closed for inactivity)
18:41:54*a_chou joined #nim
18:42:08*Trustable quit (Remote host closed the connection)
18:43:09*Trustable joined #nim
18:51:15*a_chou quit (Quit: a_chou)
18:55:07*dddddd quit (Remote host closed the connection)
19:04:42dom96Just profiled a game I'm working on (JS backend). Cycle collection can take 500ms+ in Firefox :(
19:07:25dom96Huh, seems to be a Firefox bug actually. Restarting Firefox helped
19:11:10*aguspiza joined #nim
19:12:16*Trustable quit (Remote host closed the connection)
19:18:44*dddddd joined #nim
19:25:24*lritter quit (Ping timeout: 246 seconds)
19:39:00*abm joined #nim
19:51:50*vlad1777d quit (Ping timeout: 272 seconds)
19:59:52*Jesin quit (Quit: Leaving)
20:02:22*Jesin joined #nim
20:21:55*V-X joined #nim
20:35:27V-XQuestion regarding macro compilation order, I'm making an RPC library and I allow the server to mark certain functions as remote ex: `proc ping(self: client): string {.remote.} =` `remote` is a simple pass-through macro that adds the methods name, parameter types, etc. to a compile-time array that I later use to generate the code required to handle
20:35:27V-X incoming messages to invoke the related function and return the result. The issue I'm having is that the message handling code is inside a package called server, and is being generated before any of the actual functions (such as `ping`) are added to the array. Logically it makes sense that the package is compiled first, but I can't think of a way
20:35:28V-Xto get around this issue. Any thoughts?
20:39:20Araqone way to do it is to emit the code explicitly with a call like emitRemotes()
20:48:26V-XWhat would emitRemotes() look like?
21:01:28*vlad1777d joined #nim
21:12:02*sealmove joined #nim
21:12:04*sealmove quit (Client Quit)
21:12:25*sealmove joined #nim
21:16:03*noeontheend joined #nim
21:20:06*rockcavera joined #nim
21:28:23*aguspiza quit (Ping timeout: 245 seconds)
21:29:39*narimiran quit (Remote host closed the connection)
21:30:45*sealmove quit (Ping timeout: 250 seconds)
21:33:03*sealmove joined #nim
22:03:48V-X@Araq I can't seem to find any references to how you would go about emitting the code like that. Would you mind explaining a bit more?
23:08:01*abm quit (Remote host closed the connection)
23:08:26*abm joined #nim
23:15:05AraqV-X: well it iterates over your .compileTime array/seq and produces the dispatcher that you need
23:24:40V-XThat makes sense, how would I go about producing that dispatcher though? As I currently have it implemented when a message comes over the line it contains a string of the proc name and a string seq for the arguments, I then have a macro that uses the compileTime seq to generate switch cases that know how to deserialize the args into their respectiv
23:24:41V-Xe types and invoke the proc. With that in mind, I'm unsure of how to do what you're suggesting with how I'm currently implementing it
23:27:47*sealmove quit (Quit: WeeChat 2.4)
23:39:18*abm quit (Ping timeout: 268 seconds)
23:57:03FromGitter<Varriount> dom96: Doesn't Nim use JavaScript's GC?