<< 24-03-2014 >>

00:01:44renesacwhy we can't ask for 'inline' at the call site instead of the function definition?
00:01:58renesacthis is a general question, not really nimrod specific
00:04:20Demoswell "inline" does not do anything in c/c++, it is just a linker directive. In nimrod it is because it is not implemented yet
00:04:40Demosalso, it causes problems when you do not actually have the code for a given function
00:04:50renesacDemos, it is a hint for the compiler
00:05:05DemosI dont think modern compilers treat it as a hint
00:05:23Demosit disables the ODR
00:05:33renesacIIRC GCC -O3 will inline by default functions up to x size
00:05:55renesacbut if said function is declared as inline, it will accept a much larger function
00:06:02Demosright, but the only functions it can inline are those declared inline, or templates, or inline member functions
00:06:09Demosunless you turn on lto
00:06:12Demosor do a unity build
00:06:14renesacand if __AWAYS_INLINE (or something like that), it will aways inline
00:06:51Demosagain I dont see how gcc can even inline anything that does not already have inline linkage
00:07:11Demos(except for lto and unity builds ofc)
00:09:58renesachum, so it is a problem when you don't have the whole source code at hand
00:14:12Demosyeah, in general I would just let the nimrod and C compilers decide what to inline
00:15:35Demosthe motivation for being able to get the AST of any proc is to do stuff like rewriting that proc to run on the GPU and stuff, not to do inlineing
00:17:16renesacI wonder if anonymous procs are inlined by default... I guess they normally are by the C compiler, given that they are short
00:18:01renesacthough I haven't looked at how long nimrod makes them it's output C
00:20:05fowlrenesac, no, they have to be able to be passed around and carry an environment with them
00:20:14Demosyou could test by making a nice big array and compareing nimrod's sort to c++'s std::sort
00:21:12renesacfowl, oh, true
00:21:27renesaceven if they are not returned by the function?
00:21:34renesaclike simple lambdas?
00:24:38fowlrenesac, i guess in theory it could be inlined if its not passed around at all, it doesnt apply to many cases though
00:25:08fowllike if you wanted to do echo (proc(): int = 4)()
00:25:59renesacwell, I'm thinking more as a lambda passed as a parameter for a function
00:26:01renesaclike map()
00:26:28renesacI guess you can never know what the function will do with the function you passed to it...
00:26:37renesac*closure
00:27:27*zahary1 quit (Quit: Leaving.)
00:27:51*zahary1 joined #nimrod
00:31:05DemosI just timed it with sort. Nimrod is like twice as slow as c++, but it could be random num generation
00:31:26renesacDemos, generate the random number array first, then start the timer
00:31:35Demosyeah
00:32:19*zahary1 quit (Ping timeout: 264 seconds)
00:32:52Demoschanged from random() to rand() in nimrod and we are now way faster than c++
00:33:20Demosdamn rand() is compile time
00:33:38renesactake the random()/rand() out of the picture
00:33:40renesacyeah
00:35:31Demosyeah what library can I use in nimrod to time things/get accurate timers
00:36:09renesachttps://github.com/Araq/Nimrod/blob/devel/lib/system/timers.nim <-- this isn't public
00:36:24renesacI was going to work on it btw
00:37:03renesacin the mean time, you can do many loops and time outside it
00:37:11renesac*another alternative is
00:37:31renesacso you have some seconds, where the timer precision isn't a isseu
00:37:36renesacissue
00:38:24renesacone of the reasons I'm asking those questions is to see if I can make my 'timeit' function a proc instead of a template
00:38:47renesacbut it seems it needs to be a template if I don't want extra function call overhead
00:44:51*brson joined #nimrod
00:46:33DemosOK it looks like nimrod inlines simple lambda functions
00:50:25Demosfuck me g++ generates a lot of code
00:53:21Demoseven with that little short program the nimrod version is 1/2 as long and 1/2 as wide
00:54:33Demosand renesac take a look at std::chrono (http://en.cppreference.com/w/cpp/header/chrono) it is pretty well designed
01:15:41*eximius quit (Disconnected by services)
01:16:38*brson quit (Ping timeout: 252 seconds)
01:21:05renesacDemos, nice, but I'm not sure if I can trust it to inline aways
01:21:29Demoswell if it can inline and it would actually be a good idea to inline it probably will
01:21:40renesacis the nimrod binary bigger or smaller than c++?
01:22:59Demosa bit bigger
01:23:26renesacoh, considering that nimrod has to fit a whole GC in it, not bad
01:23:39Demosbut nobody cares, also c++ may dynamic link libc++
01:24:11Demosyup!
01:24:23renesacyeah
01:25:13Demosanyway comparing the sizes of little programs is super pointless
01:26:01renesacDemos, for my benchmark usage, I will convert the high resolution times to a simple floating point value... like nimrod times does
01:26:25Demosmake sure not to do arithmetic on it
01:26:35Demoslike don't accumulate it
01:26:46Demosfor a library you usually want to store times in integers
01:27:39renesacprecision problems will be significant if using a float64?
01:27:48renesacit has a 53bit mantissa..
01:28:30renesacand clock precision varies between OSes
01:31:08Demosclock precision varies between CPUs, if your OS does not let you use the CPUs high precision clock you should get a better OS
01:31:41BitPuffinDemos: why do you think it is a strange choice?
01:32:02DemosBitPuffin: why do I think what is a strange choice
01:32:07BitPuffinDemos: C :P
01:32:20BitPuffinDemos: I'm not either close to being done yet, lucklily it's a minild
01:32:31BitPuffinDemos: the thing is, I accidentally started ray tracing
01:32:40*brson joined #nimrod
01:32:42BitPuffinand now I have to optimize before I even have stuff on the screen haha
01:32:52renesachttp://nadeausoftware.com/articles/2012/03/c_c_tip_how_measure_cpu_time_benchmarking <-- many options
01:33:02Demoswow welcome to the party. I think it is a strange choice because it prioritized speed that you will likely not need. I am using love for that reason, although I have not worked on it today...
01:33:12renesacbbl
01:33:34BitPuffinDemos: well I can't even imagine how slow it would be in something like lua
01:33:52BitPuffinDemos: the speed is definitely needed, do you realize the computing power it takes to ray trace in real time :P
01:34:09fowlhow intensive ray tracing do you need for a demake though
01:34:09BitPuffinI am gonna implement trees and shit xD
01:34:48BitPuffinfowl: it's not bouncing light or anything so not very
01:34:58BitPuffinstill though it's pretty intensive
01:35:09Demosray casting was a common way to render back in the day
01:35:28BitPuffinconsidering I get ~20 FPS when only calculating the directions for each pixel
01:35:33BitPuffinDemos: yeah but ray casting is done in 2d
01:35:40BitPuffinI'm doing essentially ray casting in 3d
01:36:04BitPuffinso say you are rendering with 800*600 resolution
01:36:10Demosoh, I thought ray casting was like ray tracing but with just one bounce and like one ray per pixel
01:36:13BitPuffinwith regular oldschool ray casting that would be 800 rays
01:36:19Demosoh
01:36:20Demosright
01:36:23BitPuffinbut with my method it is 800*600
01:36:49EXetoCluajit excluded I assume
01:36:54BitPuffin480 000, as opposed to 800
01:37:04BitPuffinEXetoC: there is also that language
01:37:07BitPuffinEXetoC: you know
01:37:12BitPuffinthe systems programming variant of lua
01:37:49BitPuffinTerra
01:37:58BitPuffinhttp://terralang.org/
01:39:19Demoswell nimrod looks better :D
01:40:29BitPuffinDemos: and it's not designed to interoperate with Lua and C
01:40:32BitPuffincompletely different languages :P
01:41:20DemosI guess
02:03:12*DAddYE joined #nimrod
02:03:59*Demos quit (Quit: Textual IRC Client: www.textualapp.com)
02:07:48*DAddYE quit (Ping timeout: 252 seconds)
02:09:03fowlWarning: Cannot prove that 'ev' is initialized. This will become a compile time error in the future. [ProveInit]
02:09:29fowlwill there be a way to ignore it?
02:11:43*Demos joined #nimrod
02:40:01*brson quit (Ping timeout: 240 seconds)
03:03:51*DAddYE joined #nimrod
03:05:06*Demos_ joined #nimrod
03:07:37*Demos quit (Ping timeout: 240 seconds)
03:08:01*DAddYE quit (Ping timeout: 240 seconds)
03:12:16*Demos joined #nimrod
03:15:13*Demos_ quit (Ping timeout: 240 seconds)
04:44:36*darkf quit (Ping timeout: 253 seconds)
04:46:40*darkf joined #nimrod
04:48:06*DAddYE joined #nimrod
05:00:15*runvnc joined #nimrod
05:58:30*DAddYE quit (Remote host closed the connection)
06:10:41*DAddYE joined #nimrod
06:22:59*Demos quit (Read error: Connection reset by peer)
07:18:42*DAddYE quit (Remote host closed the connection)
07:19:08*DAddYE joined #nimrod
07:19:23*Zuchto quit (Ping timeout: 268 seconds)
07:19:38*renesac quit (Ping timeout: 240 seconds)
07:20:06*renesac joined #nimrod
07:23:18*DAddYE quit (Ping timeout: 240 seconds)
07:24:41*Zuchto joined #nimrod
07:28:02*zahary1 joined #nimrod
07:58:53*zahary1 quit (Quit: Leaving.)
08:02:56*Mordecai joined #nimrod
08:02:59*psquid quit (Ping timeout: 240 seconds)
08:03:15*Mordecai is now known as Guest10997
08:19:42*DAddYE joined #nimrod
08:21:44*Endy joined #nimrod
08:24:04*DAddYE quit (Ping timeout: 246 seconds)
08:28:37*BitPuffin quit (Ping timeout: 268 seconds)
08:45:34*brihat joined #nimrod
08:45:36*brihat1 joined #nimrod
08:45:42*brihat left #nimrod (#nimrod)
08:45:47*brihat1 quit (Client Quit)
08:45:59*zahary1 joined #nimrod
08:51:36*faassen joined #nimrod
08:59:22*zahary1 quit (Quit: Leaving.)
09:01:08*BitPuffin joined #nimrod
09:20:18*DAddYE joined #nimrod
09:23:34*runvnc quit (Quit: Leaving)
09:24:25*runvnc joined #nimrod
09:24:44*BitPuffin quit (Ping timeout: 268 seconds)
09:24:51*DAddYE quit (Ping timeout: 265 seconds)
09:28:02flyxmorning folks
09:28:54flyxis the opengl binding usable? I get "SIGSEGV: Illegal storage access. (Attempt to read from nil?)" when calling glMatrixMode
09:29:41flyx… or any other method from it
09:32:43*CarpNet joined #nimrod
09:47:36flyxit seems like the "new" opengl binding just uses stdcall no matter what, while the old gl binding uses the correct calling convention, which works
09:48:53*BitPuffin joined #nimrod
09:57:40*XenMaster joined #nimrod
10:05:49Skrylarmeep!
10:17:09*[1]Endy joined #nimrod
10:18:02NimBotAraq/Nimrod devel 711c798 Zahary Karadjov [+1 ±2 -0]: failing test case preventing the use of --gc:v2: tsymchoicefield
10:18:21*zahary_ joined #nimrod
10:19:58*Endy quit (Ping timeout: 240 seconds)
10:19:58*[1]Endy is now known as Endy
10:22:00zahary_Araq, do you think we should have some kind of parity between procs and fields. if x.someProc could be a proc, should we also support someField( x )?
10:24:24zahary_take a look at a failing test case that I pushed for which I'm not sure how the fix should be approached. it's somewhat related to the question above
10:39:18Skrylarzahary: is there a use case for doing that?
10:39:30SkrylarX(someObject)
10:40:19zahary_only relatively silly arguments. you could do map(list, name) - where name could be both a function or a field
10:42:20Skrylari guess you could do that, and have functions resolve before fields
10:42:31zahary_if you want your code to be generic, you should be careful to prefer the dot syntax at the moment, because it will handle both fields and procs
10:43:03Skrylaryeah, i ran in to that with some rect code
10:43:20Skrylarwhat happens if you have a function and field with the same name though?
10:43:30Skrylari guess a magic GetField(x,y) could solve that
10:43:51zahary_they could be overloaded normally
11:08:42SkrylarNimrod's AST is crazy looking o_O
11:09:05SkrylarDumped a tree repr to look at some macro output and there's this huge stack of "open sym list" and the same identifier a dozen times
11:25:21*Trimsty joined #nimrod
11:31:46Araqzahary_: in fact 'x.y' is broken in generics right now
11:32:05Araqso "prefer dot access in generics" doesn't even work as a rule
11:32:22Araqfix should be easy though but could break code
11:33:43AraqI like to have full x.f vs f(x) interoperability
11:34:15Araqbut x.f() is ambiguous if 'f' is a proc field
11:35:10Araqwe could always transform x.f() to f(x) and require (x.f)() to call the *field* but that's ugly when you use closures for interfaces
11:38:21Araqand at that point I gave up and left the rules as they are now ...
11:39:46Araqwhat we should do instead is to provide easy-to-use readonly field access so no trivial getters are to be generated
11:40:09Araqwe could use + instead of * for public readonly fields
11:40:34Araqwrite access is still allowed in the same module for initialization
11:41:01*clovis joined #nimrod
11:41:01*clovis left #nimrod (#nimrod)
11:44:27Araqflyx: stdcall is mapped to cdecl when os != windows
11:44:42Araqseems unlikely that this is your problem
11:46:31AraqSkrylar: yeah we should fix the view of symbol choices
11:46:32flyxAraq: I don't see any other difference between the bindings
11:47:10Araqflyx: well do the old bindings work and the new don't? what's the error message?
11:47:26Araqhi XenMaster welcome
11:48:01flyxAraq: the old bindings work, the new produce the segfault I pasted
11:49:42Araqcall loadExtensions() after you setup the context
11:50:43flyxah, that works
11:50:53AraqI guess this should make it into the FAQ lol
11:50:56flyxglMatrixMode is hardly an extension, is it?
11:51:07Araqtrue that's weird
11:51:27Araqbut I'm no opengl expert, ask fowl when he's around
11:51:36Araqor BitPuffin or whoever
11:52:14Araqmaybe the new wrapper thinks glMatrixMode is an extension
11:52:24flyxwell I did similar things when writing an OpenGL binding for Ada. You can query *all* OpenGL functions that have been added in v1.1 or later. that makes sense if you don't know which OpenGL version you're running against
11:53:17Araqwell we have special compiler support for opengl so that dead code elimination continues to work
11:53:22BitPuffinwat
11:53:28BitPuffinwhy are you using glMatrixMode
11:53:34flyxbut it's still weird because glMatrixMode is OpenGL 1.0
11:53:38BitPuffinwhy would you do legacy GL
11:53:45Araqbbl
11:53:55BitPuffinall matrix stuff has been deprecated since 3.0 and removed from core in 3.1 and upwards
11:54:13BitPuffinyou construct them yourself and send them to the shaders instead
11:54:14flyxBitPuffin: because I just write some tests and the OGL 3.x stuff is way too much overhead for them
11:54:27BitPuffinflyx: well okay
11:54:38BitPuffinflyx: is glMatrixMode not in the binding?
11:54:58flyxBitPuffin: it is, but as Araq said, it only works after calling loadExtensions()
11:55:01BitPuffinbcause if it is, it should just be a matter of creating a context with old opengl
11:55:10BitPuffinthat's weird
11:55:57flyxI'm on OSX, it's creating an OGL 2.x context by default (unless I specify otherwise), so backwards compatibility shouldn't be the problem
11:56:16flyxanyway, seems like I have a glfw3 binding ready
11:56:39BitPuffinpretty sure glfw3 creates a gl 3.x context by default
11:56:45BitPuffindon't even know if it supports lesser
11:56:47BitPuffinask in #glfw
11:56:49BitPuffinI'm not sure
11:56:55flyxI'm pretty sure
11:57:08flyxI have used it in the past with Ada on OSX and other platforms
11:58:43BitPuffinglfw3?
11:58:46BitPuffinor just glfw2
11:58:52BitPuffinglfw2 creates old by default
11:59:08flyxboth
11:59:35flyxsee http://www.glfw.org/docs/latest/window.html#window_hints_values
12:00:20flyxon OSX, you have to explicitly query a core profile to get a 3.x context
12:00:41flyxby default, you get a compat profile
12:04:05SkrylarI'm pretty sure they removed the compat profile from OSX, unles they put it back
12:06:29flyxwell it works here, so I don't see how discussing that it shouldn't work gets us anywhere
12:18:19*Skrylar prods Araq, zahary and fowl to peer at this: https://gist.github.com/Skrylar/9739068 before skry spends a while engaging in macro-fu
12:21:07XenMasterhypothetically: person X knows only python, is very smart, and wants to help develop nimrod, what should he do?
12:23:41Skrylarthey really like compiler patches, though thats probably a bit too deep
12:24:58flyxhas anyone done a yaml parser for nimrod yet?
12:25:18Skrylari don't think theres a stdlib one
12:25:34Skrylaryaml is kind of nasty to parse :(
12:25:51flyxit seems like a good opportunity to test nimrod's metaprogramming features, but I don't want to do work that has already done by someone else
12:27:54Skrylari don't see one on a google search
12:28:06flyxneither did I
12:28:10XenMasternobody wants help from smart X? (X is realises he needs to learn something before contributing...)
12:28:31flyxlet's see how far I get
12:30:44SkrylarXenMaster: it'd be better to ask araq or zahary directly, since those two would know more about it
12:30:51Skrylaras far as helping nimrod directly
12:32:06XenMaster:araq, zahary: how can smart pers X, who knows only python, help working on nimrod? whats the next thing he should learn if python isnt sufficient?
12:33:12zahary_XenMaster, are the parts of the language that are particularly foreign to you?
12:33:23zahary_are there *
12:33:54XenMasteryou mean nimrod?
12:34:11XenMasteror python?
12:34:14zahary_yes, isn't your question about you learning nimrod? or is it about contributing
12:34:33XenMasterit is about contributing
12:35:35XenMasterI wanna contribute because i see future in nimrod, and i could learn from it
12:36:18zahary_ah, I see. good. if you want to dive into the deep and contribute to the compiler itself, I have always suggested implementing type traits as a first step
12:37:15zahary_otherwise, there are few infrastructure projects that need more work - nimbuild come to mind
12:37:37zahary_and everyone working on a libraries is helping both as a tester for our new cool stuff and by spreading the word
12:38:10XenMastercompiler is most appealing
12:39:13zahary_see my comments here if you are interested in the type traits I mentioned: http://forum.nimrod-lang.org/t/297
12:45:04AraqXenMaster: IMHO the best starting point is the tester
12:45:24Araqhttps://gist.github.com/anonymous/7abcfc8994d5c77a6980
12:46:25Araqthe failing tests need to be repaired
12:46:35XenMasterAraq: would you have said the same if X is smartest person in this room (hypethetically)?
12:47:10Araqno
12:47:23zahary_actually fixing the tests in much more hardcore than what I suggested :)
12:47:38XenMasterwould you have said compiler araq?
12:47:46Araqthen I would have said, "fix the remaining closure-related bugs by modifying compiler/lambdalifting.nim"
12:47:59XenMasterok
12:49:12Araqor: "implement write tracking"
12:49:21Araqor: "implement the new concurrency model"
12:49:45XenMasterI'll look into concurrency
12:49:54Araqor "implement the pure RC'ing GC for best interop with evil Objective C framework"
12:50:32zahary_codegen improvements are relatively easy to do - you could try to implement precise stack marking for the current GCs
12:51:02XenMasterI like the challenge of concurrency
12:53:59Araqthe concurrency stuff is all frontend related though, the backend already exists
12:57:07XenMasterbackend is bugfree?
13:00:05flyxis nimrod's compiler available through the stdlib? I think the nimrod lexer would be a good starting point for implementing yaml.
13:00:37Skrylarhm
13:01:09Skrylaras i understand it, 'var' implies pointer yes? so it ought to be safe to jink around the type system and call a proc(pointer) and hope for the best
13:01:27Skrylar(i wouldn't advocate this in regular code, but its to go in behind a delegate type)
13:04:25Araq'var' is a hidden pointer yes
13:04:49AraqXenMaster: the GC and backend stuff exists and is stable when it comes to threading
13:05:06Araqthe major problem is that the frontend doesn't catch mistakes
13:05:46Araqso it's easy to blame the backend when it's in fact a subtle bug in your code that a smarter compiler should have caught
13:06:54SkrylarAraq: i'm working on the event queue/map version today :P
13:07:46Araqwell actually ... the concurrency model builds onto our existing technology and has been designed so that I can implement it this year in my spare time :P
13:08:16Araqwith more resources it might look rather differently
13:20:18AraqXenMaster: you know about my blog, right? http://nimrod-lang.org/blog/
13:20:40AraqI have a working prototype for 'spawn' which I can send to you
13:21:26XenMasterBitpuffin has showed me
13:22:37XenMasteroriginally, I wanted to implement a cryptoproof messenger in nimrod, but the more I read about it, the more I am interestd in working on nimrod
13:22:51XenMasterif I can find a challenge in that, I will do that
13:23:15Araqcan't think of anything more challenging ... well ok, I can :P
13:24:12*io2 joined #nimrod
13:25:13XenMasterto contribute, learn C or nimrod?
13:28:03Araqnimrod
13:28:25BitPuffinI showed what?
13:28:38BitPuffinah
13:28:40BitPuffinthe blog
13:29:18BitPuffinindeed Araq, I point people in the right direction when you are not here, so don't think I'm not a nimrod guy just because I code C and objective C at the moment XD
13:29:53AraqBitPuffin: you know
13:30:15Araqif you said "waaa nim not stable, I'm using c++", I would understand
13:30:16BitPuffinno I don't :o
13:30:18BitPuffinah
13:30:39BitPuffinAraq: why?
13:30:45BitPuffinC++ is so much shittier than C
13:31:02BitPuffinGood C++ code = basically C
13:31:09Araqno
13:31:51AraqC = full of "if (errno) goto error;"
13:32:14BitPuffinI have no such line in my code
13:32:42BitPuffini have something like if (!al_init()) return false; though
13:32:43EXetoCwhatever your approach is then
13:32:50BitPuffinbut that code wolud be identical in C++
13:33:11BitPuffinEXetoC: do you really think I have time for error handling in a jam game :P
13:33:43EXetoCI guess not
13:34:09BitPuffinI just assume the files are there and load them for example
13:35:08AraqBitPuffin: ok fair point, error handling is quite dependent on the problem
13:36:31EXetoCAraq: speaking of var, who created the opengl modules? because someone was complaining about having to cast nil to var in some cases
13:36:51EXetoCI guess var makes sense as long as 'nil' isn't valid
13:37:02AraqI pas2nim'ed the opengl wrapper and cleaned it up a bit
13:37:16AraqI assumed 'var' is fine where the delphi version used 'var'
13:37:23Araqapparently I was wrong :P
13:37:59EXetoCis 'var' in delphi different in this respect?
13:39:09EXetoCeither that or the delphi version is badly implemented
13:40:04Araqthe latter
13:40:16Skrylarintriguing. nimrod gets confused if you try to assign 'result' in a function definition within a quote do:
13:40:25Skrylarhowever it understands return correctly
13:42:09zahary_Skrylar, quote do just produces verbatim AST - what are effect are you expecting from a result assignment there?
13:43:26zahary_*what effects* ; it will just give the AST of the "result = x" statement
13:43:58Skrylarhold on, let me gist it
13:44:10Skrylarit actually makes sense to do "result = something" where I do it
13:44:27EXetoCAraq: finding all cases where 'var' is acceptable is a pain in the ass I imagine, so should we just replace all instances of var with ptr?
13:45:29SkrylarEXetoC: but then you'd have to use addr() on input params
13:45:51SkrylarI thought 'var' was kind of like & in C++, you use it for "i will modify this, but its not *actually* a pointer so don't put & on it yourself"
13:46:15Skrylaror just pass-by-ref
13:46:27AraqSkrylar: it is C++'s &
13:47:00AraqEXetoC: fine with me, but breaks code. maybe better: overload what you need with 'ptr T' instead of 'var T'
13:47:08BitPuffinAraq: aren't C++ exceptions pretty shit anyway?
13:47:32AraqBitPuffin: pretty shit? zero cost exception handling is "pretty shit"?
13:47:51BitPuffinAraq: it was a question, not a statement
13:47:53Araqhow are explicit 'if's everywhere better for performance?
13:48:05Araqthat question was never answered by the C guys
13:48:23Skrylarzahary: https://gist.github.com/Skrylar/9740396
13:48:54Skrylarand C++ exceptions *weren't* "zero cost" for a very long time
13:49:21EXetoCzero compared to manual checking, right?
13:49:48SkrylarEXetoC; no, some of the older compilers had an exponential increase in code bloat as well as slow triggering of exceptions, or using complicated side-chains
13:49:56zahary_looks like bug Skrylar, feel free to post it
13:50:23SkrylarEXetoC: basically, they have cheaper exceptions *now* but a lot of opinions about it were formed pre-2013
13:51:41Skrylarzahary: noted. seems like i've been finding a lot of these lately, lol
13:52:08BitPuffinAraq: it was?
13:52:08Araqimho we should simply remove 'macros.quote'
13:52:31Araqit's buggy and/or weird and there are at least 2 other ways to accomplish the same
13:52:38zahary_I guess the goal of this code is to assign numeric IDs to types?
13:53:01Skrylarzahary: yeah, its used for priming event types
13:53:27zahary_there is a much simpler solution if so; proc mytypeid(x: typedesc) = var id {.global.} = nextId(); return id
13:54:16Araqmake that 'static nextId()'
13:55:29zahary_generating the sequence at run-time is still safer, because it works across modules
13:55:38EXetoCAraq: only 25 instances of 'var' in OpenGL. I expected it to be present everywhere
13:55:42zahary_static variables don't have that feature yet
13:55:46EXetoCok so that's not a very big problem then
13:55:57Skrylari tested two modules with that macro and it worked
13:56:04Skrylardidn't test 3 though
13:56:23Araqzahary_: static vars are now global across module boundaries
13:56:31zahary_ah, didn't know that
13:56:31EXetoCzahary_: have you looked into that UDTC issue? should I report it?
13:56:45Skrylari set aside a note to try the other method later though
13:56:55Araqyes you do, I told you. you asked my why the eval context is a singleton, remember?
13:57:35EXetoCzahary_: dumb question. I'll report it
13:57:41zahary_not yet EXetoC, I have it in my scratch.nim file (which is the first I open when I press NIM in vim)
13:58:30zahary_reporting is always better, because I don't have to think about commit messages :P
13:58:41EXetoCyep
14:01:41AraqEXetoC: so provide 25 overloads. you can mark the 'var' procs as deprecated
14:05:54*darkf quit (Quit: Leaving)
14:12:28Skrylarhrm
14:13:07Skrylarwell the bonus that i've seen so far to an event map, is that its possible to have static dispatch (which means zero-malloc processing)
14:13:46Skrylarthough it does appear to still require callbacks, admittedly those are centralized
14:21:48SkrylarAraq: do you think its reasonable to set a hardcap on event size? it would be possible to make a standard queue fully generic without invoking pointer insanity by doing so
14:22:21Skrylarmost of the C libs have an event size of like ~8 ints for all events IIRC
14:23:30*BitPuffin quit (Quit: WeeChat 0.4.3)
14:23:44*BitPuffin joined #nimrod
14:25:25AraqSkrylar: I like the idea but people will complain
14:25:51Skrylari'll prototype it for an hour or two.
14:26:04Skrylari have half a Wx-style event map setup
14:26:22Araqbtw did you look at exhu's project?
14:26:37Skrylari don't have the github link
14:32:05Araqmmm all I can find is this: https://github.com/exhu/nimrod-misc
14:32:27Araqso either he removed it or he never really started or he didn't put it online
14:32:46Skrylari could probably work on mine faster than i have been :/
14:32:59Skrylarits been off for a few days while i poked around with event models
14:33:12SkrylarI *really* like signals and slots, but it requires a lot of... Sadness.
14:35:54*Skrylar peers distrustfully at this article on event queues
14:36:18zahary_I recently starred a signals/slots library by fowl
14:36:43zahary_and I probably will soon use it as a test subject for varargs generics
14:36:51Skrylaryeah, i saw fowl's
14:37:31Skrylari wrote something similar and tested signal disconnection in finalizers with it, but there's a lot of ... sadness involved.
14:38:23zahary_btw, Araq, my GC doesn't have the finalizers bug reported by Skrylar
14:38:46Skrylarzahary_: the one where it keeps one pair of cycles alive conservatively?
14:38:54zahary_yes
14:39:55Araqzahary_: so? you do the stack scanning a bit differently
14:40:31Araqbtw your GC also caused random crashes on my machine
14:40:36zahary_is that it? I think I never managed to activate this part
14:41:29Araqwell I don't know I don't get how stacks work
14:41:50Araqin theory I should be able to mask the stack bottom to be at the page boundary
14:42:08Araqbut whenever I do it, it crashes in subtle ways
14:42:28Araqcomex said the stack is not page aligned but that makes no sense to me
14:42:50Araqeven it weren't the memory protection is page based
14:42:54Skrylarits up to the OS and compiler :/
14:43:13Araqso I am free to access random bits on the same page, in theory
14:43:20Skrylaryou can certainly align the stack to a page boundary in raw assembly, since you just set it to whatever you want
14:44:26Skrylari know some memory debugging setups will also push sentinel values to the stack to check for issues
14:44:55Skrylarbut.. yeah. stack debugging is a tiny hell
15:01:10*XenMaster quit (Quit: Ex-Chat)
15:02:01Skrylarlooks like SDL2's largest event is smaller than 64-bytes
15:16:08*brson joined #nimrod
15:24:12KeletCan anyone compile git master? I get compiler/semdata.nim(261, 16) Error: 'getSysType' cannot be passed to a procvar
15:59:25EXetoCKelet: I don't know. What about devel?
16:00:46EXetoCboth compile for me
16:01:17KeletOops, I meant devel
16:01:19Keletweird
16:02:00EXetoCKelet: try with -d:release
16:02:22*psquid joined #nimrod
16:02:35EXetoComitting it seems to be the problem
16:04:35*Guest10997 quit (Ping timeout: 252 seconds)
16:04:44EXetoCok this time it's not working for me
16:07:17comexAraq: what are you doing exactly?
16:07:39EXetoCapparently the tester can compile it
16:11:33*Demos joined #nimrod
16:14:31DemosI do not like signals and slots. Although I do not like them in the context of game programming, they are probably better for other stuff
16:15:37Demosalthough actually using a slot as a replacement for seq[proc(...)] could be good I guess, I just dont like them when you are like shooting events every which way and it is hard to figure out what the hell is going on
16:25:39*Demos_ joined #nimrod
16:26:49*Demos quit (Ping timeout: 265 seconds)
16:28:08*Skrylar quit (Ping timeout: 246 seconds)
16:35:01EXetoC"Untracked files: tests/..., tests/..., tests/..., tests/..., tests/..., tests/..., tests../, ..." :>
16:37:54EXetoCKelet: surround the argument of getSysType with params
16:38:22EXetoCthat particular syntax is supposed to work, but it's new
16:47:02*DAddYE joined #nimrod
16:47:38Kelethttp://pastebin.com/X0a2pMe6
16:47:56KeletWhy does this give: irc.nim(4, 19) Error: expression 'irc("irc.freenode.net", nick = "bot", joinChans = @ ["#keletbot"])' cannot be called
16:48:09KeletIs it because of the module/fxn name collision?
16:48:15zahary_nick: "bot", joinChans: @[]
16:48:20zahary_: instead of =
16:48:30EXetoChuh
16:48:54Keletoh.
16:48:55zahary_ah, that's not a type, my bad
16:50:02EXetoCKelet: does irc.irc(...) work?
16:51:03Keletno same error only for irc.irc(...)
16:52:31EXetoCKelet: the original code works for me
16:52:37EXetoCafter this change: "type -> typ"?
16:52:47EXetoCdisregard the question mark
16:52:52EXetoCso you are indeed on devel?
16:53:01Keletno im on the stable version atm
16:53:32Kelet0.9.2
16:53:38*Skrylar joined #nimrod
16:54:00EXetoCit's best to use devel for now
16:55:02EXetoCI told you how to make devel to compile. Did you notice? only that particular line needs to be modified
16:55:08EXetoC-to
16:55:55KeletI'll try it
16:56:21KeletI'm on a crappy network and don't have the sources though, which is why I was trying to avoid it. It takes a long time to get the sources and usually disconnects the way through :/
16:56:26Keletah well
16:57:55EXetoCoh
17:01:32*bot983298 joined #nimrod
17:01:35*bot983298 quit (Read error: Connection reset by peer)
17:02:54*Demos_ quit (Ping timeout: 268 seconds)
17:07:17*BitPuffin quit (Ping timeout: 252 seconds)
17:21:48KeletEXetoC: Now I get lib/system/inclrtl.nim(27, 24) Error: invalid exported symbol
17:21:53Keletwhen compiling devel
17:24:17EXetoCok I didn't get that
17:25:26fowl<Skrylar> i wrote something similar and tested signal disconnection in finalizers with it, but there's a lot of ... sadness involved.
17:25:36EXetoCKelet: ./koch boot?
17:25:50fowlSkrylar, what a pity that you dont run the tests i've written, i'd like to get some confirmation that it works because it seems to work fine
17:29:34EXetoCKelet: did you specify nimrtl explicitly?
17:40:14*BitPuffin joined #nimrod
17:45:55NimBotAraq/Nimrod devel cc677b6 Araq [+0 ±3 -1]: VM: endless loop prevention
17:45:55NimBotAraq/Nimrod devel 4c4b3fd Araq [+0 ±3 -0]: VM: attempt to get integer ops right
17:45:55NimBotAraq/Nimrod devel ef8e94c Araq [+1 ±7 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
17:58:47*psquid quit (Ping timeout: 246 seconds)
17:59:18*psquid joined #nimrod
18:01:38dom96Kelet: You should clone with --depth 1 if you're on a slow connection.
18:04:12fowlKelet, that will prevent them from getting the devel branch
18:13:36reactormonkKelet, I can give you a trimmed down repo
18:14:04reactormonkbtw: https://github.com/Araq/Nimrod/issues/958
18:14:06fowler i meant that @ dom96
18:14:43dom96fowl: hrm, really? But isn't the devel branch default now?
18:15:11dom96You can always just download https://github.com/Araq/Nimrod/archive/devel.zip
18:15:19fowlnot sure, i had to do some git magic to set it up to track all branches
18:15:32fowlmaybe you can specify devel branch in the clone command
18:26:41*q66 joined #nimrod
18:26:41*q66 quit (Changing host)
18:26:41*q66 joined #nimrod
18:30:15*Ransel_ joined #nimrod
18:39:08EXetoCfowl: it is indeed the default now
18:48:19*skyfex joined #nimrod
18:53:01*Mat3 joined #nimrod
18:53:06Mat3hi all
18:53:18*renesac quit (Ping timeout: 240 seconds)
18:54:18*Matthias247 joined #nimrod
18:59:54fowlhow can i see the gcc line used to compile
19:00:28Skrylaruh oh... stdlib code is broken :(
19:00:48Skrylarfowl: nimrod --listCmd?
19:01:08Skrylaror so its supposed to, i just tried it and it errors
19:01:29fowlah it works thanks
19:01:41*q66 quit (Ping timeout: 252 seconds)
19:01:42EXetoCand in the generated C sources
19:02:44dom96and the compiler will output it by default
19:02:49dom96when compiling
19:03:10dom96It depends on whether you have stuff in nimcache though I think
19:03:50fowlwow
19:03:51Skrylarwat
19:03:56*q66 joined #nimrod
19:04:00fowlits ignoring my {.passL.} directive
19:04:01Skrylar"error undeclared identifier: count" in queues.nim
19:04:27Skrylari checked the source file in the stdlib.. its certainly there
19:04:28Mat3the compiler command should be included as comment in the generated C files
19:05:50*renesac joined #nimrod
19:09:13Skrylaroh. it looks related to the newSeq derpage where newSeq won't work with certain inputs
19:12:29SkrylarNope, its apparently just generics breaking again
19:19:32EXetoCAraq: could the gl prefix not be removed automatically at the time when the modules were generated?
19:23:15Skrylarzahary: uhh.. so theres something derpy going on where "assert q.count" errors as being unable to find identifier 'count' yet commenting out the assert from stdlib code lets it compile...
19:24:02zaharyand I guess renaming the variable to something different than count solves the problem?
19:24:15Skrylari didn't try that (it's not my code)
19:24:38Skrylarthe line underneath "dec q.count" doesn't trip it; so Assert is specifically the derp
19:25:28zaharyI have reported similar issue with templates today - it's a bit outside of the part of generics I usually work, but I'll probably get to it at some point
19:26:39zaharyactually, it's probably exactly the same issue - assert being a template
19:33:11*Demos joined #nimrod
19:46:43Demosoh my god steam streaming is great
19:57:34*nequitans quit (Remote host closed the connection)
19:57:42*nequitans joined #nimrod
19:58:41*Demos quit (Remote host closed the connection)
20:01:08*Trimsty quit (Remote host closed the connection)
20:12:43*brson quit (Quit: leaving)
20:12:51*brson joined #nimrod
20:18:05*flaviu joined #nimrod
20:25:19*silven quit (Remote host closed the connection)
20:31:46*runvnc quit (Quit: WeeChat 0.4.1)
20:40:25dom96Things are really quiet on the forum lately.
20:43:36Mat3too much bug fixing
20:44:38dom96that must be it
20:45:58*faassen left #nimrod (#nimrod)
20:46:09*nequitans_ joined #nimrod
20:47:59*nequitans quit (Ping timeout: 268 seconds)
20:55:10BitPuffinso Araq, does nimrod compiler optimize much or does it leave that up to the C compiler?
20:55:27BitPuffinI'm asking because I'm thinking about how to write code that is easy for a compiler to optimize
20:55:42BitPuffinand if maybe that is a harder to do in a language where compilation happens "twice"
20:56:04Araqthe compiler does optimize but it does a shitty job at it
20:56:27BitPuffinAraq: ah, so one should try to cater to the C compiler then?
20:56:32Araqthere is no separate optimizer pass, most optimizations are part of the codegen
20:56:36BitPuffinat least at the very moment
20:57:10AraqI can't answer this question
20:57:22AraqI know too much to give any meaningful answer. :P
20:57:23BitPuffinno it's a weird question
20:57:25BitPuffin:P
20:57:37BitPuffinall hail the all knowing oracle
20:58:01BitPuffinI guess what I should do is to just look at the output assembly
20:58:10Araqindeed
20:59:29dom96whoa, did BitPuffin just summon Araq?
21:00:07Araqskyfex: if you're looking for work, you could implement the pure RC'ing GC
21:01:50*Gxen joined #nimrod
21:02:25skyfexAraq: What'd it be for?
21:04:40GxenAraq: woher kommst du? nord, sud?
21:07:17Araqhi Gxen: süd
21:07:17BitPuffinAraq: answer me this oh oracle, what is hoisting?
21:07:46dom96BitPuffin: It's when you catch a fish.
21:07:48Araqskyfex: better interop with the cocoa framework; the Gc is agnostic to the stacks
21:08:02dom96BitPuffin: And then you put it outside a loop.
21:08:05Araq--> can easily use C coroutine libraries
21:08:06dom96:P
21:08:29BitPuffindom96: wat
21:08:46BitPuffindom96: so it's literally just finding stuff you only need to do once and putting it outside the loop?
21:08:55dom96BitPuffin: yes
21:08:57dom96AFAIK
21:09:11skyfexAraq: Aha, hmm, would be an interesting project, but I'm worried my motivation wouldn't be great. I don't do much Cocoa programming anymore. But maybe it'd be useful in embedded applications too? hmm
21:09:22BitPuffinAraq: is thar correct, oh almightly oracle
21:09:46AraqBitPuffin: "loop invariant code hoisting", look it up
21:09:54Araq(yes dom96 is correct)
21:10:23BitPuffinyeah because searching for hoisting only gave me javascript lol
21:10:26dom96yay I'm correct.
21:10:40*dom96 pats himself on the back
21:10:48Matthias247skyfex: I think for real embedded stuff the current task-local GC is better suited
21:12:33BitPuffinoh well that was simple
21:12:59BitPuffinstuff that you should do anyway because compilers are silly
21:14:19flaviuhttps://pay.reddit.com/r/learnprogramming/comments/217z9b/what_are_the_bleeding_edge_technologies_today/cgaib07
21:15:27flaviuSeems to be a good reception there
21:16:08dom96hrm, nice find, or did you post it?
21:16:15flaviuI found it
21:16:25BitPuffinfilwit still not back?
21:16:39dom96BitPuffin: Yeah ;(
21:20:12BitPuffin:/
21:21:24Mat3flaviu: The Mill CPU architecture seem to realize some promising ideas
21:23:24flaviuYes, I'm really looking forward to that too. I'm also really exited about games on linux
21:24:46Mat3hmm, beside steam I see only minor development in these area (there exist some Linux versions of recent games however)
21:26:23flaviuHe mentions CryEngine coming to Linux, which might be leading up to a AAA title being released on linux
21:33:35Matthias247while valve now largely focuses on linux they somehow they are mostly focussing on Steam and apparently not on so much on developing games themselves. At least it looks so
21:34:52AraqGxen: and you? where are you from? and why is that important? ;-)
21:35:11Mat3everything is important these days
21:36:17GxenAraq: I saw a video of you, and you reminded me of someone I knew 10y ago when I studied in Germany/Oldenburg; he was a computerscientist student
21:36:24*psquid_ joined #nimrod
21:37:02GxenAraq: I am finnish
21:38:59*psquid quit (Ping timeout: 252 seconds)
21:40:52Gxen(new to nimrod, going over the tutorials) case..of..else: with string else is not needed cause not possible to cover all strings... not even with regex?
21:42:35EXetoCI don't know where regex comes in
21:43:14AraqGxen: well I didn't study in Oldenburg :-)
21:43:44Araqping zahary, zahary_
21:45:17EXetoCI wonder if that 'else' requirement was removed as a result of our discussion a while back
21:45:35Mat3ciao
21:45:39EXetoCbye
21:45:46*Mat3 quit (Quit: Verlassend)
21:46:41EXetoCI might've agreed with that other guy in that it wasn't necessary, but it's not like it requires particularly much effort
21:47:06Araqit wasn't removed
21:47:28Araqhe made a good point but I don't remember it :-/
21:47:31Araqdo you?
21:48:22dom96Araq: I've run into a bit of a dillema.
21:48:27EXetoCAraq: you mean it was never required?
21:48:39EXetoCor did I argue for the exact opposite? :p
21:49:00Araqthe guy was convincing but it's not like I do everything at once
21:49:11Araqand now I forgot his arguments
21:49:26dom96Araq: I'm keeping the async socket distinct. However, I have simply copied the definition of PSocket instead of writing "distinct PSocket" so that I don't need to export the fields of PSocket.
21:49:51dom96Araq: Now what I would like is to use a proc defined for a PSocket.
21:50:06dom96Araq: Should I be doing this whole thing differently?
21:50:13Araqno.
21:50:27dom96Araq: The only way I see what I want working is to cast to PSocket
21:50:31Araqmysocket.baseType is not too offensive, is it?
21:51:22Araqdom96: type conversions (not casts) work just fine with 'distinct'
21:51:50EXetoCAraq: I think the argument was that there's an infinite amount of variations, and so requiring it doesn't make much sense
21:51:51dom96Araq: Well I don't want to use 'distinct' like I said.
21:51:55*Matthias247 quit (Read error: Connection reset by peer)
21:52:03Araqhow often do you think people will need to pass an AsyncSocket to a SyncSocket?
21:52:16Gxenimo its stupid to omit the else requirement for strings.. the benefit for leaving it out doesnt outweight the cost of remembering when not to leave it out
21:52:19Araqshould not be common, so an explict type conversion is just fine
21:53:04EXetoCGxen: isn't it similar to requiring 'else' for 'if' blocks?
21:53:18*Endy quit (Ping timeout: 240 seconds)
21:53:47AraqGxen: no need to 'remember' anything, the compiler tells you
21:53:53GxenEXetoC: no, if else is a logical thing, case of else is a syntax thing
21:54:36Araqso use 'else' with a string case, it's not like it's not possible
21:56:17*Endy joined #nimrod
21:56:23dom96Araq: Re-read what I said
21:57:35Araqdom96: ok, got it
21:57:41*Araq is thinking about it
21:57:45EXetoCAraq: I think he wants it to be mandatory, but I don't know if it makes much sense when explicitly covering every case is impossible
21:58:26Araqah yeah that was the argument, "make me use the 'else' for string cases for consistency"
21:59:24Gxenof course thats what I want..
21:59:54AraqGxen: ok, ok, you're the 2nd. will add it to my todo
22:00:09GxenI don't wanna think every time:"is coering the whole range posssible and can I omit the else"... "oh, lets see what the compiler thinks"...
22:01:22*Endy quit (Ping timeout: 268 seconds)
22:01:34Araqthe point is: "I think/want to cover every case here, so I'm leaving out the 'else' and the compiler checks for me"
22:01:49EXetoCso you'll only add it to be sure *if* it's required? seems like an odd reasoning, but ok there's still the consistency argument
22:02:21GxenAraq: I excuse in advance.. I am gonna be your worst critic for the next x time.. but I mean it well :)
22:02:53Gxenexplicit is better than implicit..
22:03:22Araqthat's why I can't write down any types in python, right? :P
22:03:30Gxen:D
22:03:38EXetoCAraq: that sounds like something that would apply only when dealing with a finite set of variations
22:03:40Gxenfair enough..
22:05:05AraqEXetoC: the point of pattern matching is not the unpacking. It's the exhaustiveness check.
22:10:10EXetoCyes, in which case you can't ever leave out 'else' for strings, and that's why I couldn't figure out what you meant by your previous remark; but I suppose it's possible to extend the feature set for string matching
22:10:56*Gxen quit (Quit: Lost terminal)
22:13:19*DAddYE_ joined #nimrod
22:13:19*DAddYE quit (Read error: Connection reset by peer)
22:14:11EXetoCactually, that seems really complicated
22:15:22EXetoCTime to parse the rest of the OpenGL xml spec. too bad they didn't include null-validity for pointers
22:16:23fowlopengl xml spec?
22:16:58EXetoCI'll just take care of that 'var' issue first
22:17:26EXetoCfowl: yes, an official spec. for facilitating in writing bindings I assume
22:17:56EXetoCan official parseable spec to be exact. https://bitbucket.org/alfonse/gl-xml-specs/overview
22:20:03fowloh wow
22:20:13fowlthis is like c mixed with xml
22:20:32dom96Araq: Did you think of a solution?
22:20:34fowl <type requires="stddef">typedef ptrdiff_t <name>GLintptr</name>;</type>
22:21:36flaviuAt least enums are categorized...
22:22:25flaviuNever mind, the enums are just generic in the actual methods
22:22:44flaviusometimes, sometimes not
22:24:31*Ransel_ quit (Ping timeout: 264 seconds)
22:24:38Araqdom96: use a distinct type and export the fields for now
22:25:03EXetoCfowl: I hadn't noticed. I don't like that
22:25:14EXetoCbut it shouldn't complicate things all that much
22:26:35dom96Somebody advocate Nimrod in here: http://www.reddit.com/r/programming/comments/218yqw/using_and_abusing_macros/
22:29:28fowlEXetoC, it definitely is more complicated than just using xml
22:29:44EXetoCyes. some spec..
22:29:50fowl<type><base>ptrdiff_t</base><name>GLintptr</name></type> would be nice
22:33:24EXetoCmaybe I'll convert it to a proper spec
22:34:12BitPuffinAraq: if there is one good outcome of me doing this in C rather than nimrod is that in the future it won't feel as weird to use ptr instead of ref when I need to
22:36:09AraqBitPuffin: declaring an array like char** foo = {"a", "b" "c"}; will make you go back to nimrod
22:36:41Araq(note: comma missing means 2 elements instead of 3 and C does not perform any bounds checking)
22:39:48BitPuffindoesn't "b" "c" result in an invalid expression
22:40:03BitPuffinAraq: I'm not away from Nimrod, it's still my favorite language and I still use it :P
22:40:25BitPuffinsome things have been kind of weird
22:40:35BitPuffinlike I can't do vec3 x = WORLD_X
22:40:48BitPuffinwhere WORLD_X is a global const vec3
22:41:58dom96Did you finish your game?
22:42:47fowli dont know if C does it but C++ concats strings like "a" "b"
22:43:59dom96I can see why. It makes splitting up strings over multiple lines easier.
22:46:28*psquid_ is now known as psquid
22:51:39BitPuffinAraq: how does one go about to use intrinsic functions in nimrod?
22:51:57BitPuffinlike when defined(gcc): someGccFunc(ar,ch.ur,achurach)
22:57:07*DAddYE_ quit (Remote host closed the connection)
22:57:45*DAddYE joined #nimrod
23:00:56EXetoCBitPuffin: you should use importc I think
23:01:27EXetoCand yes that appears to be how you determine what C compiler is used
23:16:23*brson quit (Quit: leaving)
23:23:05dom96Araq: ugh. I have to cast to that type if I want to access any field...
23:24:34BitPuffinEXetoC: seems simple enough then
23:24:59dom96BitPuffin: I'll take the lack of answer as a no.
23:25:23BitPuffindom96: I'ms still working on it
23:25:38BitPuffindom96: I didn't notice your question because you didn't highlight me :P
23:25:58dom96excuses excuses
23:26:44dom96If only you used Nimrod. It would be done by now :P
23:31:45*darkf joined #nimrod
23:37:47*gverilla joined #nimrod
23:38:13gverillahi
23:38:25dom96hi gverilla
23:39:16gverillai'm starting to learn rust: is there a elegant way to convert a sequence of strings to a sequence of ints?
23:39:58BitPuffindom96: No I'd still be wrapping allegro
23:40:09dom96gverilla: Rust? This is #nimrod not #rust.
23:40:10BitPuffingverilla: this is not rust lol
23:40:19gverillaright, i meant nimrod :)
23:40:25gverillasorry :)
23:40:28BitPuffinhaha
23:40:35dom96BitPuffin: Yeah, because you are using every single function in allegro right?
23:40:40BitPuffindom96: totally
23:40:51BitPuffinhow did you know?
23:41:13BitPuffingverilla: if there isn't it would be quick to implement
23:42:18*q66 quit (Quit: Leaving)
23:42:38gverillaive implemented a loop with parseint, but i feel there should be a simpler solution :P
23:42:55dom96You can use map.
23:43:06EXetoCor mapIt
23:43:40dom96Procedural style isn't that bad usually though
23:43:43dom96It grows on you.
23:44:05*io2 quit ()
23:45:09gverilladom96, thanks! i find to prefer simple oneliners for simple tasks like this. no need to clutter the code with ten lines for this... ;)
23:45:28dom96gverilla: https://gist.github.com/dom96/a6cb03559189f8b104a8
23:45:37EXetoClib/pure/collections/sequtils.nim:419: strings = nums.mapIt(string, $(4 * it))
23:45:40BitPuffingverilla: well then mapping parseint sounds like a good choice
23:46:03Araqdom96: or simply x.map(parseInt)
23:46:24EXetoCneat
23:47:00dom96Araq: If only the procvar pragma wasn't necessary I would feel more safe in assuming that that would work :P
23:47:01*flaviu quit (Quit: Leaving.)
23:47:46AraqparseInt is .procvar :P
23:48:17dom96It could very easily not have been.
23:48:22gverillathanks guys! yeah, it still needs a wrapper to get the int from parseint
23:48:36gverillabut i've got it from here ^^
23:50:55dom96Araq: What about my problem?
23:56:11Araqdom96: I have to see your code
23:56:20Araqbrb
23:56:27dom96Araq: it's on github
23:56:34dom96net/asyncnet