<< 21-05-2015 >>

00:01:44*Climenty quit ()
00:15:47*johnsoft quit (Ping timeout: 250 seconds)
00:16:19*Sembei quit (Ping timeout: 255 seconds)
00:23:56*johnsoft joined #nim
00:31:18vikatonanyone here good with nim-cfsml?
00:31:44def-vikaton: I tried it out at least
00:31:58vikatonIm not sure how tot set the window bg :(
00:33:28fowlvikaton, window.clear White
00:33:39def-https://github.com/BlaXpirit/nim-csfml/blob/2.2/examples/pong.nim#L168
00:33:44vikatonI should have been more clear, set the bg to a picture
00:33:47*ddl_smurf joined #nim
00:34:08vikatonnot a definite color :P
00:34:36fowlvikaton, it doesnt work like that, you just draw the sprite before everything else
00:34:52fowlcovering the back of the screen
00:35:03fowlthere are some options for texture repeating if it needs to do that
00:35:58fowlhttps://github.com/BlaXpirit/nim-csfml/blob/2.2/src/private/csfml_graphics_gen.nim#L2580
00:36:37fowlthen you set the sprite's texture width to be as big as the screen and draw it at 0,0
00:36:46fowlsprites texture rect*
00:38:44vikatonhmm
00:38:51*kumul joined #nim
00:39:22vikatonis this how you do it? https://github.com/BlaXpirit/nim-csfml/blob/2.2/examples/shader.nim#L15
00:42:06*renesac quit (Ping timeout: 276 seconds)
00:43:45*renesac joined #nim
00:44:20*gokr quit (Ping timeout: 246 seconds)
00:47:13*johnsoft quit (Ping timeout: 265 seconds)
00:47:48*johnsoft joined #nim
00:49:43*Kingsquee quit (Quit: Konversation terminated!)
00:53:00vikatonwindow.clear color(50, 200, 50)
00:53:03vikatondoesnt even work ^
00:53:48vikatonnvm
00:54:34ZZZZZZZZZsdl > sfml
00:54:47ZZZZZZZZZsdl2*
00:55:19vikatonrly?
00:56:00vikatonis the sdl2 lib for Nim even active?
00:56:45vikatonhttps://github.com/Vladar4/sdl2-nim
00:57:07ZZZZZZZZZhttps://github.com/nim-lang/sdl2
00:57:46ZZZZZZZZZbut its preference really.
00:58:15*brson quit (Quit: leaving)
00:58:28ZZZZZZZZZim confident about sdl2, its used by valve etc
01:01:08*renesac quit (Remote host closed the connection)
01:01:26ZZZZZZZZZthe nim wrapper is super thin, so you can just pretty much follow the sdl2 doc
01:01:46vikatoni see
01:02:42ZZZZZZZZZif i remember correctly.
01:03:03ZZZZZZZZZi use it mainly for opengl
01:03:23ZZZZZZZZZwindows setup + input, not so much for the rest
01:03:37vikatonIf SDL has some easy way of setting a bg pic, I'm down for it :P
01:03:54*kumul quit (Ping timeout: 252 seconds)
01:04:19ZZZZZZZZZyour doing a 2d game?
01:05:43*hello12341234 joined #nim
01:10:39ZZZZZZZZZanyway, all you would need to do is just render your background image first, then render the rest
01:13:09ZZZZZZZZZhttp://programmersranch.blogspot.ca/2014/03/sdl2-animations-with-sprite-sheets.html you should be able to adapt this to nim pretty easily imo
01:14:27ZZZZZZZZZstarting from this https://github.com/nim-lang/sdl2/blob/master/examples/sdl_skeleton.nim
01:16:05vikatonhmm
01:17:02ZZZZZZZZZdoesnt show exactly what you want
01:17:14ZZZZZZZZZbut it load an image, and shows it on the screen
01:17:41ZZZZZZZZZjust make it fullscreen and you win!
01:18:42ZZZZZZZZZim mostly using opengl directly, so for direct sdl rendering capabilities, i cant help you much more than tell you to find some tutorial or look at the doc ;P
01:18:50*boydgreenfield quit (Quit: boydgreenfield)
01:18:57vikatonhmm
01:21:21vikatonZZZZZZZZZ: do I get the src code zip file? https://www.libsdl.org/download-2.0.php
01:23:10ZZZZZZZZZvikaton: pretty sure you just need the dll
01:23:35vikatonso Dev libs?
01:25:19ZZZZZZZZZyour on windows or linux&?
01:25:26*CARAM__ quit ()
01:25:40*CARAM__ joined #nim
01:25:54vikatonwindows
01:26:28VarriountAraq: I have 64-bit pcre, ncurses, and sqlite dll's
01:27:34*vendethiel joined #nim
01:28:29*taesoo joined #nim
01:29:41ZZZZZZZZZvikaton: you are probably using mingw right?
01:29:47vikatonyeah
01:29:56*gsingh93_ quit (Ping timeout: 252 seconds)
01:30:32vikatonZZZZZZZZZ: BIG question, does sdl accept mp3's as audio files?
01:31:46ZZZZZZZZZi havent used the sound with it, but with sdl_mixer you can load FLAC, MikMod, Ogg Vorbis and MP3
01:31:53ZZZZZZZZZyou should look at the doc
01:32:31ZZZZZZZZZhttp://libsdl.org/release/SDL2-devel-2.0.3-mingw.tar.gz
01:32:37ZZZZZZZZZthats what you need
01:32:55VarriountHi guys
01:33:05ZZZZZZZZZsetup the libs include with your mingw
01:39:25vikatonZZZZZZZZZ: is there no way to get all the dllsin one folder like sfml?
01:39:35ZZZZZZZZZyes
01:39:41ZZZZZZZZZjust put the dll with the exe
01:43:46vikatoni can only find one
01:43:53vikatonother are liked foo.dll.a
01:44:39fowlthe addons are sold separately
01:44:46fowler not sold
01:47:36ZZZZZZZZZyou mean sdl_mixer and gfx etc?
01:49:10fowlyeah they're all available here https://www.libsdl.org/projects/
01:50:57vikatonYeah ngfx
01:51:00vikatoncant find gfx
02:00:14VarriountZZZZZZZZZ: What are you using opengl for?
02:02:06ZZZZZZZZZat the moment, im toying with it with nim, but eventually want to make a similar game to ut2k4, but focused on dueling.
02:02:16ZZZZZZZZZVarriout: ^
02:02:26ZZZZZZZZZVarriount: ^
02:03:37ZZZZZZZZZtheres no good modern arena fps :(
02:04:07ZZZZZZZZZtheres reflex, but its basicaly CPMA, i prefer ut2k4 movement style.
02:04:17ZZZZZZZZZand ut4 movement is shit.
02:04:47ZZZZZZZZZvikaton: sorry, seems like you would need to compile it yourself T_T
02:05:04vikaton:[
02:05:10ZZZZZZZZZi just searched, and havent found a 'safe' place to download it
02:05:13vikaton2much hassle atm
02:06:18vikatonZZZZZZZZZ: https://github.com/AngryLawyer/rust-sdl2#windows-mingw ?
02:08:18*darkf joined #nim
02:08:22VarriountZZZZZZZZZ: Ah.
02:08:38VarriountZZZZZZZZZ: Any experience with 'ray marching'?
02:09:05ZZZZZZZZZi havent done any myself, but ive seen plenty of example on shadertoy.org
02:09:10Varriounthttps://news.ycombinator.com/item?id=9576212
02:09:37VarriountI really dislike being envious of people I don't know, for doing things I don't understand.
02:14:07*boydgreenfield joined #nim
02:14:18ZZZZZZZZZlol
02:14:49ZZZZZZZZZive done some distance fields, but making a complete game with this technique is pretty crazy
02:15:09ZZZZZZZZZif hes really just render on a quad in pure fragment shader
02:15:14ZZZZZZZZZredering*
02:15:25VarriountApparently, yes.
02:15:34ZZZZZZZZZbut yeh that could work for voxel i guess
02:15:36VarriountZZZZZZZZZ: It's like, I should be amazed at this guys work, and I am, but part of me goes, "Why can't I be that smart?"
02:15:43ZZZZZZZZZlol
02:16:05ZZZZZZZZZim pumped for the new graphics api soon!
02:16:13Varriount?
02:16:30ZZZZZZZZZvulkan
02:16:34ZZZZZZZZZto replace opengl
02:16:55ZZZZZZZZZa spec should be released this year
02:17:30VarriountYeah, but is the API going to be anything remotely understandable?
02:17:43ZZZZZZZZZand some working library should be released at the same time i guess, since all the major vendors are developping it at the same time
02:18:43ZZZZZZZZZive watched some demos, and i think it can be understood pretty easily, but it takes a lot of work to get something going
02:19:16ZZZZZZZZZso using it directly will be hard, i think it will be more used with some wrapper or framework on top of it
02:19:22ZZZZZZZZZcompared to using it as pure opengl
02:19:53ZZZZZZZZZbut you could reimplement an opengl-like framework on top of it, and still access the lower level if needed.
02:20:26ZZZZZZZZZthe main advantaged to me is, no more global states.
02:20:41ZZZZZZZZZ(theres plenty of others... but)
02:21:26VarriountSee, this is why I wish my college offered a course on modern OpenGL. I know what a global state is, however I don't know what it means in this given context.
02:22:01VarriountHow do people actually *learn* to use OpenGL?
02:23:07ZZZZZZZZZhttps://open.gl/
02:23:08ZZZZZZZZZ:)
02:23:13fowli suppose you could read about it lol
02:23:20fowlor trial/error/copying code
02:23:23ZZZZZZZZZeasy to follow tutorial
02:23:57ZZZZZZZZZonce you understand the basics, you can read the real opengl doc
02:24:14ZZZZZZZZZit explain pretty much everything
02:26:07ZZZZZZZZZVarriount: do you have any experience with basic 3d? or graphics programming other than opengl?
02:26:57VarriountNot really. I've toyed around with a few things, but other than that, no.
02:27:04ZZZZZZZZZimo if you have no previous 3d experience you shouldnt start with pure opengl
02:27:21ZZZZZZZZZyou should be familiar with the maths and the pure concepts first
02:27:40VarriountWhat would you recommend I start with then?
02:27:49ZZZZZZZZZopengl is a pain to use, you will be overwelmed by it while learing 3d at the same time
02:28:04ZZZZZZZZZmmm some kind of framework, in your language of choice
02:28:18ZZZZZZZZZi started with software rendering ;)
02:28:26ZZZZZZZZZwhen i was like 10 lol
02:28:31VarriountHm. Well, Nim is probably out of the question... How about Python?
02:28:58VarriountDo you mean something like SDL or Allegro?
02:29:09VarriountThose are primarily 2d.
02:29:09ZZZZZZZZZsure, theres 3d framework in pyton for sure
02:29:21ZZZZZZZZZpyglet i think?
02:29:26ZZZZZZZZZor something like that, let me check
02:30:07vikatonto much pink coming from u guys
02:30:08vikatonhttp://prntscr.com/77l20q
02:30:29Varriountvikaton: Change your font then.
02:30:47vikatonIt's not my choice
02:30:56dhasenanZZZZZZZZZ: try Urho3D?
02:31:11vikatonits either ur all black of automatically color coded
02:31:22dhasenanProbably easier if you have a full engine.
02:32:24ZZZZZZZZZdhasenan: no i havent. i prefer bare bone opengl :)
02:33:07ZZZZZZZZZVarriount: i havent used http://www.panda3d.org/
02:33:18ZZZZZZZZZfor python, but ive heard good thing about it
02:36:34ZZZZZZZZZor you could try darkbasic LOL, thats what i was using 15 years ago
02:42:44VarriountZZZZZZZZZ: If you need sound effects, try using this tool: http://www.drpetter.se/project_sfxr.html
02:43:00*vendethiel quit (Ping timeout: 276 seconds)
02:43:57ZZZZZZZZZwhat i was actually planning to do, was try to make a simple synth with sdl
02:44:06ZZZZZZZZZto make simple sound effects
02:45:19ZZZZZZZZZtheres plenty of C example to get started, and i found https://gist.github.com/triplefox/45c8ffebc0d6301d525d
02:46:55ZZZZZZZZZbut sfxr looks pretty cool
02:50:36*ZZZZZZZZZ is now known as lI
02:50:48*lI is now known as lIl
02:51:11*lIl is now known as zdsa
02:51:56*zdsa is this less pink? :)
02:52:09Varriountvikaton: ^
02:52:28vikatonyeah :P
02:52:34vikatonits dark blue now :P
02:52:41*hello12341234 quit (Quit: Page closed)
02:52:58vikatongtg, night
02:53:46fowlany open source voxel engines
02:55:46zdsatheres one for unreal engine
02:55:50zdsaif i remember correctly
02:55:57zdsaplugin for that is
02:56:07*pregressive joined #nim
02:57:00zdsahttp://www.volumesoffun.com/update-on-cubiquity-for-unreal-engine-4/
02:58:04zdsao shit i thought it was open source, sorry
02:58:13VarriountTo anyone who loves adventure games: http://www.wadjeteyegames.com/pre-order/technobabylon/
02:58:27Varriount<3
02:58:55zdsafowl: https://www.reddit.com/r/VoxelGameDev/ look on the right sidebar, theres a big list
02:59:51fowlzdsa, thanks :)
03:00:06zdsafowl: http://www.reddit.com/r/VoxelGameDev/comments/why8x/the_big_list_of_block_engines/
03:00:17zdsai think u might have enough :P
03:01:22*Perelandric quit (Ping timeout: 246 seconds)
03:01:42*BitPuffin|osx quit (Ping timeout: 272 seconds)
03:07:48*boydgreenfield quit (Quit: boydgreenfield)
03:10:54*kumul joined #nim
03:11:05*dtscode quit (Quit: Leaving)
03:12:32*dtscode joined #nim
03:37:27*endragor joined #nim
03:50:30*Kingsquee joined #nim
04:17:12*boydgreenfield joined #nim
04:17:57*kumul quit (Ping timeout: 265 seconds)
04:23:06*TEttinger joined #nim
04:29:03*Varriount quit (Read error: Connection reset by peer)
04:29:29*Varriount joined #nim
04:36:17*pregressive quit (Remote host closed the connection)
04:36:54*pregressive joined #nim
04:40:57*pregressive quit (Ping timeout: 240 seconds)
05:16:05*xificurC joined #nim
05:16:12*intra quit (Ping timeout: 244 seconds)
05:17:32*ddl_smurf quit (Quit: ddl_smurf)
05:21:55gokr_why dont you guys consider Urhonimo?
05:28:02*BlaXpirit joined #nim
05:31:40*yglukhov__ joined #nim
05:34:00*jbomo quit ()
05:35:14*yglukhov__ quit (Client Quit)
05:47:52*intra joined #nim
05:58:09*taesoo quit (Ping timeout: 240 seconds)
06:14:03*Kingsquee quit (Quit: Konversation terminated!)
06:22:29*darkf_ joined #nim
06:22:50fowlgokr_, it would be my choice, i tried out the networking synchronization and its great
06:25:30*darkf quit (Ping timeout: 256 seconds)
06:30:31*darkf_ is now known as darkf
06:32:00AraqVarriount: one problem here is that we don't distinguish between prcre32.dll and pcre64.dll
06:32:23Araqwe should depart from the standard DLL names and the problem goes away
06:34:21dtscodeAraq: I would like to propose a feature for nim :D
06:34:26dtscodeIf you don't mind
06:34:55Araqgo ahead
06:35:06dtscodeI actually need to write up an example real quick
06:37:53dtscodeAraq: https://bpaste.net/show/4bd27c3c8351
06:37:56*gokr joined #nim
06:38:17dtscodeSo, something like __asm blocks for Nim (except it would be C blocks instead of asm)
06:38:29*zahary joined #nim
06:38:33Araq.emit pragma?
06:38:47dtscodeOh I was not aware of that
06:41:01*yglukhov__ joined #nim
06:43:10*wedowmaker quit (*.net *.split)
06:43:11*IronY quit (*.net *.split)
06:43:11*vinnie quit (*.net *.split)
06:43:11*Triplefox quit (*.net *.split)
06:43:18*vinnie joined #nim
06:44:29*Triplefox joined #nim
06:46:40*epichero joined #nim
06:46:46*epichero quit (Remote host closed the connection)
06:49:41*darkf_ joined #nim
06:53:06*darkf quit (Ping timeout: 265 seconds)
06:53:59*johnsoft quit (Ping timeout: 256 seconds)
06:54:07*johnsoft joined #nim
07:02:28*Kingsquee joined #nim
07:08:19*endragor_ joined #nim
07:08:53*Varriount quit (Ping timeout: 264 seconds)
07:09:22*Varriount joined #nim
07:11:45*endragor quit (Ping timeout: 240 seconds)
07:16:35*johnsoft quit (Ping timeout: 244 seconds)
07:16:44*johnsoft joined #nim
07:18:53*endragor_ quit (Remote host closed the connection)
07:19:32*endragor joined #nim
07:20:18reactormonkAraq, why exactly can't procvar be the default of procs?
07:20:49Araqreactormonk: it would defeat its purpose
07:22:56reactormonk"The rules' purpose is to prevent the case that extending a non-procvar procedure with default parameters breaks client code." - how would additional default parameters break client code?
07:22:57Araqdom96: we need a better spam filter on the forum
07:23:50Araqreactormonk: let foo: proc (s: string): seq[string] = strutils.split
07:24:12Araqstrutils evolves, split grows a new defautl parameter
07:24:29Araqand the above line doesn't compile anymore
07:25:04Araqso adding a default param to strutils.split is a change that can break code
07:25:17reactormonkhmmm... would it be possible to convert procs by chunking off default parameters? Or too ugly?
07:25:36*johnsoft quit (Ping timeout: 252 seconds)
07:25:49Araqtoo much work.
07:25:50reactormonktoo flimsy, might break?
07:25:52*johnsoft joined #nim
07:26:21reactormonkSo should I put it up as a feature request, just in case?
07:26:46Araqjust add this to the existing RFC that .procvar needs to die
07:26:59reactormonkok
07:27:55Araqdom96: when I ban a user all its posts should be deleted
07:31:31*darkf_ is now known as darkf
07:33:28reactormonkhttp://pastie.org/10199899 <- I assume :foo is a symbol?
07:36:40reactormonkiterators are first-class, right?
07:36:50Araqreactormonk: closure iterators are, yes
07:37:12Araq:foo is a compiler generated symbol
07:37:26*pregressive joined #nim
07:39:25reactormonkok, assumed as much.
07:41:49*pregressive quit (Ping timeout: 264 seconds)
07:44:32Araqreactormonk: any progress on the idetools front?
07:47:34Araqreactormonk: the problem seems to be that compileModule only checks for checkDepMem() when the module has never been compiled
07:47:49Araqno wait hrm
07:48:44reactormonkAraq, the file invoked with has a different ID the second time
07:49:14Araqreactormonk: that's awful
07:49:20Araqit shouldn't have
07:49:47reactormonkyeah, different fileIdx
07:50:07reactormonkhaven't found out why yet, but that's approx. where I stopped
07:51:59Araqrelevant code:
07:52:02Araq var isKnownFile = true
07:52:03Araq if orig.len == 0: err()
07:52:05Araq let dirtyIdx = orig.fileInfoIdx(isKnownFile)
07:52:06Araq?
07:52:50*IronY joined #nim
07:54:29Araqreactormonk: do you generate a new dirty filename each time?
07:54:37reactormonkerr, yup...
07:54:59Araqreactormonk: nevertheless that should work
07:55:08Araqthe original name is used for the lookup
07:55:15Araqand not it's dirty alias
07:55:22Araq*its
07:55:41reactormonkyup.
07:57:11*Trustable joined #nim
07:57:47reactormonkdarn, I need sleep. I'll take a look at it when I wake up - laptop's right next to my bed anyway
07:59:00*johnsoft quit (Ping timeout: 256 seconds)
07:59:26Araqtoo bad your brain how no usb ports
07:59:53*johnsoft joined #nim
08:03:34*coffeepot joined #nim
08:05:06*vendethiel joined #nim
08:06:38fowllol
08:10:37*boydgreenfield quit (Quit: boydgreenfield)
08:13:50coffeepotdoes nim have anything like a standard variant in the stdlib? I know it's simple to set one up with object variants, just wondering if it's already provided
08:15:05*Sembei joined #nim
08:15:05*intra quit (Ping timeout: 258 seconds)
08:20:56Varriountcoffeepot: What exactly is a standard variant?
08:21:06*boydgreenfield joined #nim
08:21:49fowlcoffeepot: there's typeinfo that provides a generic interface for any type
08:22:18fowlIt is like go's bare interface{}
08:22:51coffeepotwell I noticed a lot of modules use some kind of object variant that allows you to store various different types, just wondering if there's a version of this in the stdlib since it's such a common thing to do
08:23:24coffeepotfor example I'm doing it for values from a database, the json module does it, and many more
08:23:56coffeepotfowl I'm more talking about storing different types than referencing them, if that makes sense
08:24:06fowlExamples of variant types? Or are you asking for a single variant type to hold any data
08:24:57coffeepotsingle variant to hold any data - I've already set one up, but it seems so common (and easy), just wondering if something exists already
08:26:03fowlYes in typeinfo
08:26:10coffeepotcool :)
08:26:15fowlIts not a variant object
08:26:28fowlBut it does what you describe
08:26:29coffeepotTAny ?
08:26:34fowlYea
08:26:37coffeepot:)
08:27:05coffeepotcool, I knew there would be! :)
08:27:10coffeepotthanks fowl
08:27:43fowlit only holds a reference though
08:28:31coffeepotyeah
08:29:45fowlBecause if it held a copy then you need more functionality, at least a way to deref GC memory held
08:29:51coffeepotwell, anyway it was more of an academic question, but also I didn't want to reinvent the wheel
08:30:10coffeepotso it seems that object variants don't have this issue though?
08:30:29coffeepoti say issue, but obviously it's been designed with a use in mind
08:30:30fowlcoffeepot: I have an example that makes concept types instanceable
08:30:44fowlcoffeepot: no because in your variant it has a known type
08:30:58coffeepotahh yes good point
08:31:11fowlWhereas here we have a pointer to data and a pointer to type
08:31:37coffeepotso it's more of a reference any type kind of structure, but the type is stored elsewhere?
08:32:42coffeepotmakes sense, as it's part of typeinfo
08:32:43fowlYea it provides runtime reflection
08:32:59coffeepotah right, i see :)
08:34:29fowlcoffeepot: see also https://bitbucket.org/fowlsoft/interfaces/wiki/Home
08:37:20*boydgreenfield quit (Quit: boydgreenfield)
08:39:41Araqcoffeepot: imo json is the variant type you're looking for
08:39:57Araqand should be the base for DB modules
08:40:19fowlJsonnode should cover all possible database types
08:40:39fowlSQL at least
08:41:06coffeepotAraq, I was actually thinking of using the json module for this, which is why it was mentioned above. I'm kinda glad you've said that as I am including translation to json in my module anyway, so that'll probably make it easier :)
08:43:37coffeepotfowl, I'm consistently impressed by how readable Nim is when dealing with stuff that in other languages is often compiler magic. Looking forward to your interfaces being part of the stdlib somewhen(?) At home when I'm in game writing mode, I would have loves to have interfaces
08:43:51coffeepotloved
08:44:23coffeepotthough I don't feel they're as needed in other languages, it's a useful concept in larger code bases
08:45:32fowlcoffeepot: it can be used to get around the issue of forward declaring types
08:45:55fowlYou can already use generics for that but generics are infectious
08:46:04coffeepothaha I love generics :3
08:46:14coffeepotbut yes you're right
08:56:48Araqfowl: once interfaces work really well, can we remove "method" from the language?
08:57:43*Araq really wants to get rid of 'method'
08:57:48coffeepotaren't interfaces going to be higher overhead than method?
08:58:28coffeepotout of interest, why do you want to get rid of methods?
08:58:32fowlAraq: multiple dispatch is rarely needed but when it is, it sucks to implement from single dispatch, and I'm not sure its possible to do with this
08:58:53Araqcoffeepot: neither interface nor methods are really useful when you care about performance
09:00:39fowlInstead of f(x,y) you end up with a bunch of f_x1(y, x) functions that are never used outside of the fake dispatching
09:02:00Araqcoffeepot: cause they are buggy, don't interact well with generics even in principle and rarely used
09:04:27coffeepotwell, fair enough :) I think the rarely used part is only because people aren't yet using Nim in anger, for large OO projects, but it sounds like interfaces do a similar job. But they are different concepts, aren't they? I mean, proccing against type vs proccing against interface is a different beast (though only subtly)
09:05:02coffeepotAIUI anyway
09:05:32coffeepotI guess methods are a subset of interfaces, kinda
09:05:45Araqfowl: also a bit of macro machinery can generate dispatchTable[x + y*rows]() which is faster than the current implementation
09:06:07fowlbut the table has to be huge
09:07:10Araqdunno. it's worth a try
09:07:15fowlalso most of the entries might be blank
09:07:43Araqyou can special case the "default" implementation
09:08:11fowlthe table is (number of x children types * number of y children types) big right
09:08:33fowlthen it breaks as soon as you subclass one of them
09:11:02Araqwell the table is per proc, not per type
09:14:19*Kingsquee quit (Quit: Konversation terminated!)
09:21:50r-kucan i define some kind of converter that would allow str("κόσμε") type of conversion as opposed to var s: str = "κόσμε" (which works already by defining converter toStr*(x: string): str). str is my own string type.
09:22:28*Kingsquee joined #nim
09:24:54Araqr-ku: seems like a bug if that doesn't work
09:25:21r-kuk, will make an issue on github
09:28:00*ingsoc joined #nim
09:28:07Araqty
09:29:47*ddl_smurf joined #nim
09:33:56r-kui noticed that exceptions are non-ref types. is there any use of them as non-ref at all? since you cant raise non-ref it makes me wonder why there is this barrier preventing raise ValueError(msg: "...")
09:36:24Araqwell
09:36:45Araqthe reason is historic
09:37:22Araqnot sure if we can fix that without breaking every project out there
09:37:54r-kuthey should use newException() anyway right? surely it can be made to work with ref types
09:40:50Araqyeah, please play with it
09:41:00Araqand tell us what it breaks ;-)
09:44:33*low-profile joined #nim
09:45:11Araqhi low-profile welcome
09:45:27low-profileHi, thanks
09:47:57*bjz joined #nim
09:54:27*xcombelle joined #nim
10:30:13dom96Araq: What if I want to ban someone without removing their posts?
10:30:20dom96Araq: It should be an option if anything.
10:40:23fowlAraq: I'll try to implement a multi dispatch table. Sounds like an interesting problem
11:23:25*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
11:25:34gokrdom96: Btw, one thing I have wanted in the forum is to be able to click on a user and then click to read all posts from that user.
11:26:36dom96gokr: same. Someday I will go on a frenzy and implement lots of nice things in the forum :)
11:30:13*Kingsquee quit (Quit: Konversation terminated!)
11:44:32*pipeep quit (Ping timeout: 256 seconds)
11:46:47gokrNeat: https://github.com/jangko/msgpack4nim
11:47:46*pipeep joined #nim
11:50:16*gokr_ quit (Quit: IRC for Sailfish 0.9)
11:56:38*egrep quit (Quit: Error -38: Black hole has swalled this client.)
11:57:18*egrep joined #nim
12:04:09*allan0 quit (Ping timeout: 240 seconds)
12:05:53*banister joined #nim
12:06:11*vikaton quit ()
12:17:29*allan0 joined #nim
12:34:48*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:35:34*dddddd joined #nim
12:36:38*ddl_smurf quit (Quit: ddl_smurf)
12:47:28coffeepotgokr that's really cool, thanks for sharing!
12:49:13def-i agree, exactly what I asked for for the other msgpack implementation
12:53:47coffeepotjust reorganising my code, does anyone else write stuff as "type A <procs for type A> ... type B <procs for type B>" etc.? I was organising it with all the types at the top then a huge list of procs, but this is a bit easier to navigate as associated types and routines are next to each other. I suppose I'm just wondering if there are any disadvanta
12:53:47coffeepotges to this or if people would look at it and go "eww" :)
12:58:29BlaXpiritcoffeepot, i find writing one type then its functions much better
12:58:45BlaXpiritproblem is it doesn't always work out in Nim
13:01:52coffeepothow so?
13:02:59BlaXpiritrelations between types
13:03:14BlaXpiritnot even necessarily recursive
13:03:28BlaXpiritjust when one type's proc works with a different type and vice versa
13:06:52coffeepotisn't that a problem in most languages though? I mean, you can forward declare a type can't you? Not actually needed to yet.
13:07:34coffeepotwhere that would have been a problem, I've split those types into a separate file and I include them, so I don't have to see their dirty faces
13:08:13coffeepotyet they're still declared 'out of sequence' in terms of the types they relate to
13:08:31*banister joined #nim
13:08:34*banister quit (Max SendQ exceeded)
13:08:59*banister joined #nim
13:09:03*banister quit (Max SendQ exceeded)
13:13:17*banister joined #nim
13:13:21*banister quit (Max SendQ exceeded)
13:14:27*banister joined #nim
13:15:51fowlcoffeepot: it works inside the same type section
13:16:48fowlcoffeepot: he means when you go to define all the functions for type X and one of them relies on type Y you'd have to break uniformity
13:16:49coffeepotahhhh right, that's useful to know :)
13:17:10coffeepotI see yes this is a point worth knowing
13:25:01*BitPuffin|osx joined #nim
13:27:18*intra joined #nim
13:28:40*pregressive joined #nim
13:33:15*pregressive quit (Ping timeout: 258 seconds)
13:45:30*boopisaway is now known as boop
13:45:33*BlaXpirit_ joined #nim
13:45:33*BlaXpirit quit (Killed (orwell.freenode.net (Nickname regained by services)))
13:45:33*BlaXpirit_ is now known as BlaXpirit
13:45:37*banister quit (Read error: Connection reset by peer)
13:46:36*banister joined #nim
13:50:20*darkf quit (Quit: Leaving)
13:56:26*vikaton joined #nim
14:01:01*banister quit (Ping timeout: 264 seconds)
14:01:52*banister joined #nim
14:04:27vikatonmy bad
14:04:47vikatonhttps://www.irccloud.com/pastebin/YkbBsddG
14:05:12vikatonif I have that ^, how can I make count increment 1 without waiting for the while loop?
14:06:51dom96what is your use case?
14:07:47vikatondom96: It's event based, so it a key is pressed, the timer starts and something else increments another variable
14:08:14vikatonhttps://www.irccloud.com/pastebin/lg4KIdnu
14:08:19vikatondom96 ^
14:08:21dom96you shouldn't be sleeping the thread then, your event loop should have timer support
14:08:32*ddl_smurf joined #nim
14:08:50vikatonI may be misusing the word "event based"
14:11:29dom96are you using sdl?
14:11:56vikatondom96, no sfml
14:12:24dom96http://www.sfml-dev.org/tutorials/2.0/system-time.php
14:12:31dom96Use a sf::Clock
14:12:41dom96likely just Clock in Nim.
14:21:40vikatondom96: sleep(seconds(1)) still blocks
14:25:20dom96http://www.sfml-dev.org/tutorials/2.0/system-time.php#measuring-time
14:25:25dom96You shouldn't be using sleep()
14:25:45*milosn quit (Quit: leaving)
14:26:12vikatondom96: https://github.com/BlaXpirit/nim-csfml/blob/871f403a462a1ace88ebb0e42a62ee9942e68272/examples/test_system.nim#L16 ?
14:26:33dom96sleep will block your thread
14:26:53dom96Better yet, if you want to measure time then do something like this:
14:27:01dom96var timerStart = epochTime()
14:27:24dom96if epochTime() - timerStart >= 10: doSomethingAfter10Seconds()
14:27:36vikatonhmm
14:27:43BlaXpiritthat changes nothing...
14:27:53dom96Make sure you restart it then by setting timerStart again
14:27:58BlaXpiritjust learn the basics about event loop
14:28:48BlaXpiriti really doubt measuring time is the goal here
14:29:41BlaXpiritwell maybe it is
14:30:04*pregressive joined #nim
14:36:52vikatonhow can I break out of multiple loops in Nim?
14:37:21*TEttinger quit (Ping timeout: 276 seconds)
14:39:23vikatonnvm got it
14:41:14*bjz joined #nim
14:41:56*bjz quit (Client Quit)
14:42:45*bjz joined #nim
14:53:14*jbomo joined #nim
14:54:59*Siecje joined #nim
14:56:09*yglukhov__ quit (Ping timeout: 240 seconds)
15:06:26*Ven joined #nim
15:16:58*boop is now known as boopisaway
15:38:29*boydgreenfield joined #nim
15:49:06*endragor quit (Ping timeout: 264 seconds)
15:50:06*boydgreenfield quit (Quit: boydgreenfield)
15:56:56*Jesin quit (Quit: Leaving)
15:57:18*banister quit (Ping timeout: 276 seconds)
15:57:41*gsingh93_ joined #nim
16:05:39*TEttinger joined #nim
16:11:24*pregressive quit (Remote host closed the connection)
16:12:57*yglukhov___ joined #nim
16:13:16*taesoo joined #nim
16:13:52*Cyberfunk joined #nim
16:14:52CyberfunkHello. Is someone available ? I've got a little problem with my code...
16:15:54*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
16:17:45wtwjust ask, if someone's available they will answer (or not ;) )
16:20:50def-Cyberfunk: hi
16:21:07*Cyberfunk quit (Ping timeout: 246 seconds)
16:29:41reactormonkAraq, I'd prefer a firewire on that one ;-)
16:30:27*taesoo quit (Ping timeout: 276 seconds)
16:31:29*bluenote joined #nim
16:33:21*flaviu joined #nim
16:34:33*gokr_ joined #nim
16:36:57reactormonkin terms of https://github.com/Araq/Nim/pull/2700 - any idea how to do proper encoding handling with type safety?
16:37:30*milosn joined #nim
16:41:15flaviureactormonk: "with type safety"? Impossible, string encoding can only be determined at runtime.
16:41:59flaviuBut it's always possible to go the python route of `.decode("utf8")` and have strings be polymorphic.
16:42:02reactormonkflaviu, well, yes. What I mean is something to tag a string as unicode and then make it bail if you use a non-unicode procedure or the other way round where you can require a string to be marked as unicode
16:43:41flaviureactormonk: Well, attaching an encoding tag to a string and asserting that at the beginning of a proc would work.
16:44:06reactormonkflaviu, question is, how do we do that with the nim type system.
16:44:09TEttingernow you just need an enum with every encoding ever used
16:44:21TEttingerviscii!
16:44:29flaviuTEttinger: ^^
16:44:53flaviureactormonk: A "EncodedString" type?
16:45:07TEttingerI was kinda joking, it seems extremely difficult to get a complete possible list!
16:45:08reactormonkflaviu, maybe similar to python's way of doing things, yup.
16:45:27reactormonkI'd honestly prefer to use a lib or similar for that...
16:46:00flaviuTEttinger: yep, although you can get pretty close. A 99% solution would be easy enough.
16:46:23reactormonkflaviu, remember, you also need the unicode tables for that stuff
16:46:42reactormonke.g. LATIN1 -> UTF8 encoding points
16:47:09*kumul joined #nim
16:47:11*Cyberfunk joined #nim
16:48:31reactormonkI'd really prefer to use e.g. ICU just because encodings are ugly
16:49:02flaviuSounds like someone could have a lot of fun wrapping ICU idiomatically :)
16:49:11TEttingerisn't ICU a huge dep though?
16:49:18reactormonkyes, yes it is
16:49:40reactormonkBut encoding is ugly, and I'd prefer to have a 99% instead of a hand-built 80%...
16:50:09flaviuAlso, unicode changes relatively quickly. Having someone else do all the hard work might be useful.
16:50:24CyberfunkSo here's my code : https://pastee.org/d58gs (proxy server in Nim). When I try to compile it, I obtain an error : proxy.nim(55, 19) Error: 'spawn' takes a GC safe call expression . I know I can't just call "request()" at line 31, but I don't know how to resolve my problem. Could someone help me, please ?
16:50:28reactormonkLet's see what c2nim tells me about that
16:51:27reactormonkCyberfunk, you can't pass the socket in there would be my first guess
16:51:40reactormonkhm, wait. Should work.
16:51:54reactormonkNot sure if the compiler knows tat part though
16:52:58CyberfunkI don't even use sockets, I parse the data received from the client and make a HTTP request with the request() function from the httpclient library
16:53:27Cyberfunk(except for the client, of course)
16:57:01CyberfunkSo, help.
16:57:27reactormonknot enough caps
17:00:52reactormonkCyberfunk, you need to mark handle with {.noSideEffect.}
17:01:20reactormonk... which will then complain it can have side effects
17:03:08CyberfunkNow I have a different error. But, what then ?...
17:04:30reactormonkcan't have read in there. I think you should be able to, but I'm not sure how to tell the compiler that
17:09:02Araqreactormonk: to do input validation use the taint mode
17:11:43*zero_coder joined #nim
17:12:14AraqCyberfunk: sorry, spawn doesn't yeah work with async, known issue
17:12:21Araq*doesn't yet
17:12:51Araqbut I have the code for it "almost" ready
17:13:05flaviuIs there someway to get https://gist.github.com/anonymous/e6c5a6110693afb6b99f to work?
17:13:58reactormonkflaviu, are the concepts ready for stdlib?
17:14:46CyberfunkAraq: Oh. Never mind. Thanks ! (and reactormonk also)
17:15:06flaviureactormonk: hmm? my question is completely unrelated to any discussion, I'm just playing around.
17:16:11reactormonkflaviu, just wanted your general statement. I have no idea how well they work yet.
17:16:25reactormonkand with playing around, you'll most likely find stuff that doesn't work as expected.
17:17:30*boopisaway is now known as boop
17:20:34*boydgreenfield joined #nim
17:23:14flaviucompiler stack overflow :(
17:23:27*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:23:28flaviuhttps://gist.github.com/9195f488e2b037e8b48a
17:24:56reactormonkuhh, how exactly do you deprecate types?
17:27:38flaviureactormonk: See the stdlib: {.deprecated: [FReadEnv: ReadEnvEffect, FWriteEnv: WriteEnvEffect].}
17:27:49reactormonkthanks
17:36:00*pregressive joined #nim
17:36:01*Cyberfunk quit (Ping timeout: 246 seconds)
17:41:11*Ven joined #nim
17:42:41*boydgreenfield quit (Quit: boydgreenfield)
17:43:56*pregressive quit (Remote host closed the connection)
17:44:52*pregressive joined #nim
17:49:38*shodan45 joined #nim
18:06:26*mgee joined #nim
18:08:23mgeehi, I have a little issue with a const array of objects. Here is a minimal example: http://pastebin.com/NdSZ4dMz
18:08:47mgeecompiling this snippet gives me: "test.nim(5, 3) Error: internal error: expr(skType); unknown symbol"
18:09:07*taesoo joined #nim
18:09:33mgeehowever, if I replace the object with a tuple it works. I don't quite understand why it doesn't work with objects though
18:09:57def-just a compiler bug, I'd guess
18:12:06mgeeok, then I file an issue on github. thanks!
18:12:17def-missing case is in ccgexprs.nim:2021
18:17:01*taesoo quit (Ping timeout: 265 seconds)
18:17:09reactormonkdef-, got a fix up already?
18:17:34def-No
18:19:54reactormonkuh, ok. genTypeSection is empty?
18:19:55*gokr_ quit (Read error: Connection reset by peer)
18:20:00reactormonkproc genTypeSection(m: BModule, n: PNode) =
18:20:02reactormonk discard
18:20:30*endragor joined #nim
18:21:43mgeehere is the github issue: https://github.com/Araq/Nim/issues/2774
18:22:27reactormonkmgee, btw, use lowercase even for consts
18:22:37mgeereactormonk: ok thanks
18:24:39reactormonkmgee, btw, the full compiler trace helps
18:26:38*taesoo joined #nim
18:26:47reactormonkmgee, wanna try a fix? just add of skType: genTypeInfo(p, n) into the location def- mentioned
18:27:09reactormonkwell, below the of nkSym section
18:27:37reactormonkjust above ccgexprs.nim:2019
18:27:54mgeereactormonk: yeap
18:28:30reactormonkand recompile via ./koch temp c test.nim
18:30:37mgeecompiler/ccgexprs.nim(2022, 18) Error: type mismatch: got (BProc, PNode)
18:30:56mgeebut expected one of: cgen.genTypeInfo(m: BModule, t: PType)
18:31:54reactormonkok, was just a guess
18:32:00Araqreactormonk: that fix is completely wrong
18:32:04Araq;-)
18:32:05*boydgreenfield joined #nim
18:32:22reactormonkAraq, it's getting you to fix it, so I consider it at least useful
18:32:39*banister joined #nim
18:32:44*banister quit (Max SendQ exceeded)
18:33:16mgeereactormonk: I updated the github issue with a full compiler trace
18:33:18*Siecje quit (Ping timeout: 276 seconds)
18:33:23reactormonkmgee, neat, thanks
18:34:00*banister joined #nim
18:34:04*banister quit (Max SendQ exceeded)
18:35:05*shodan45 quit (Quit: Konversation terminated!)
18:37:20*banister joined #nim
18:38:08*TEttinger quit (Ping timeout: 246 seconds)
18:38:10*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:38:14*Arrrrrr joined #nim
18:57:04*endragor quit (Remote host closed the connection)
18:58:50*endragor joined #nim
19:03:15*shodan45 joined #nim
19:05:40*endragor quit (Remote host closed the connection)
19:15:52*Siecje joined #nim
19:17:09*mgee_ joined #nim
19:21:04*mgee_ quit (Client Quit)
19:21:12*mgee_ joined #nim
19:21:23*mgee quit (Ping timeout: 276 seconds)
19:21:35*Ven joined #nim
19:21:41*mgee_ quit (Remote host closed the connection)
19:21:55*mgee joined #nim
19:22:49*Ven quit (Client Quit)
19:26:24*Ven joined #nim
19:27:41*filcuc joined #nim
19:31:57*Matthias247 joined #nim
19:37:53vikatonWell I finished my school project :P https://github.com/Vikaton/SpaceBarRace
19:42:10BlaXpirit> window.clear color(math.random(255),math.random(255),math.random(255))
19:42:14BlaXpiritwell that's gonna hurt
19:44:21*boydgreenfield quit (Quit: boydgreenfield)
19:44:50ArrrrrrSome poeple just want to see the world in flames.
19:45:08vikatonheh :P
19:47:05*kumul quit (Ping timeout: 250 seconds)
19:50:15ArrrrrrThis is also a great lib for games, you should check it out vikaton https://github.com/EXetoC/nim-glfw
19:50:29vikatono
19:51:02vikatonwill check out
19:51:12*Arrrrrr quit (Quit: Page closed)
20:01:23vikatonDoes Nim compile or transpile?
20:01:32*jubalh joined #nim
20:01:33jubalhhi
20:02:33Araqvikaton: it compiles.
20:02:36Araqjubalh: hey
20:03:25vikatonCoo
20:04:58*OnO joined #nim
20:06:26def-vikaton: think of C as portable assembler for Nim
20:06:51vikatonyeah
20:07:16vikatonThe C compiled from my Nim project sure doesnt look like any C I have seen/used https://gist.github.com/Vikaton/510f50ba3e808c9194f5
20:07:51def-compile with -d:release, then there's less noise
20:08:47flaviuTo be pedantic, "transpile" means the same thing as compile.
20:09:01flaviuor at least compile means the same thing as "transpile"
20:09:30Araqflaviu: maybe. usually people think it's a source to source translation though
20:09:32def-no
20:12:42*jubalh quit (Ping timeout: 258 seconds)
20:15:18*BitPuffin|osx quit (Ping timeout: 272 seconds)
20:16:40*OnO quit (Remote host closed the connection)
20:17:08dom96High level language to low level language -> Compiler. High level language to a different high level language -> Transpiler.
20:17:18dom96At least as far as I understand from skimming http://en.wikipedia.org/wiki/Source-to-source_compiler
20:18:03*filcuc quit (Ping timeout: 258 seconds)
20:18:39dom96vikaton: You really shouldn't commit DLLs.
20:18:50strcmp1sounds about right, dom96
20:19:16flaviucompilers ⊇ transpilers
20:19:53dom96indeed
20:20:09vikatondom96, I did so ppl can easily git clone and run it
20:20:26vikatondom96, but its Nim low-level? :(
20:20:29vikaton:) *
20:20:40dom96nim is not low-level
20:21:02vikatono
20:21:36vikatonwhats low-level defined by? steps taken to compile into an executable for example?
20:22:02Varriountvikaton: How close it is to the actual code run by the hardware.
20:22:20*xcombelle quit (Quit: Leaving)
20:22:21vikatonO
20:22:28*xcombelle joined #nim
20:23:09*xcombelle_ joined #nim
20:23:50*xcombelle__ joined #nim
20:23:56*filcuc joined #nim
20:25:21*jubalh joined #nim
20:26:57*xcombelle__ quit (Client Quit)
20:26:58*xcombelle_ quit (Client Quit)
20:26:58*xcombelle quit (Client Quit)
20:31:39*jubalh quit (Quit: Leaving)
20:32:56*boydgreenfield joined #nim
20:43:02*kumul joined #nim
20:47:24*vikaton quit ()
20:47:30*kumul quit (Ping timeout: 252 seconds)
20:50:03*vikaton joined #nim
20:55:06*mgee quit (Quit: Leaving...)
20:56:37*mgee joined #nim
21:03:15*intra quit (Ping timeout: 244 seconds)
21:03:17*yglukhov___ quit (Quit: Be back later ...)
21:05:37dom96Any of you guys bored and wanna get this going? https://github.com/exercism/xnim
21:07:54vikatonis Jester ever going to be optimized? jw?
21:09:57Araqvikaton: will you ever learn that you're not google? :P
21:10:12Araqit got optimized btw, I think
21:11:22strcmp1last time i heard "you're not facebook, you're not google" etc, it was from a ruby on rails maintainer, and that didnt work out too well ;)
21:12:02*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:12:28*gsingh93_ quit (Ping timeout: 265 seconds)
21:13:00vbtt_seriously, jester is fast enough
21:13:05vbtt_even youtube runs on python: http://highscalability.com/blog/2012/3/26/7-years-of-youtube-scalability-lessons-in-30-minutes.html
21:13:12vbtt_nothing in python is as fast as jester i believe
21:13:19dom96vikaton: Have you tested Jester's performance lately?
21:13:27vbtt_your bottlenecks will be elsewhere
21:14:40def-vikaton: see benchmarks here, for being single-threaded Nim isn't doing badly: https://github.com/nanoant/WebFrameworkBenchmark
21:15:08def-would still be nice to get multi-threaded async
21:15:49def-(that's a 6core/12thread CPU)
21:16:10Araqstrcmp1: we had a guy from google here in #nim who said 10K requests per second is already very good and it's more about the features of the http server
21:16:41vbtt_bah, you can just run miltiple processes instead of multi threaded
21:16:53vbtt_one process per core
21:17:27Araqvbtt_: shhhttt, the goal is to run one process on your 500 core CPU with 3000 GB of RAM
21:18:34*taesoo quit (Ping timeout: 245 seconds)
21:18:35zdsait should be pretty ez to remove everything from the banned user if needed, sql-> on delete cascade, delete the user, reinsert it
21:18:44zdsanothing to more to do
21:18:53zdsamore to do*
21:19:07vbtt_yeah, lets not get too sidetracked by benchmarks
21:19:48Araqzdsa: thanks, yeah of course. but I don't have time to even clean up my nim branches
21:20:31vbtt_we need a good balance of performance and features. in the end you never know where you'll need to optimize until you create your hugely successful website.
21:21:14zdsaAraq: i MIGHT look at it this weekend if i got nothing to do.
21:21:57*touch joined #nim
21:22:21*touch is now known as Guest38908
21:22:21dom96zdsa: If you are going to implement this in the forum then please make it optional.
21:23:00*Guest38908 left #nim (#nim)
21:23:11zdsadom96: yes of course, the ban itself would just ban, a 'delete all user items' or something would be an additional feature
21:23:36vbtt_does delete actually delete the row or just mark it deleted?
21:23:47dom96vbtt_: There are many more ways that we can optimise it. I have a couple of vague ideas and I'm sure that there will be networking experts in the future that will optimise it even further.
21:24:08dom96vbtt_: deletes it
21:24:26*mgee quit (Quit: Linkinus - http://linkinus.com)
21:24:45Araqdom96, zdsa and while we're at it, don't make give a reason for the banning
21:24:53Araqit's always "spammer" anyway
21:25:06zdsaAraq: ok
21:25:10vbtt_dom96:I suggest never deleting rows from the db, just mark a deleted column or something
21:25:21vbtt_so you can recover from accidents
21:25:37vikatonah nice
21:25:41dom96Araq: Is it really that hard to write that?
21:25:48vikatonanyhow, I have a problem
21:25:49zdsavbtt_: thats another ballpark imo
21:26:01vbtt_dom96:sure, optimization is good, but at this point i think newer and complete features will be more attractive.
21:26:01vikaton2 windows machines, 1 Nim file
21:26:03*bassa joined #nim
21:26:06dom96IMO you should be forced to write it, stops you from accidentally banning people.
21:26:07vbtt_does jester support websockets?
21:26:09vikaton1 machine works, the other segfaults
21:26:10vbtt_or http 2.0?
21:26:37BlaXpirit:D
21:26:41vbtt_dom96:which is why with the deleted column, you can unban and recover everything.
21:27:25dom96vbtt_: I'd rather not add more complexity.
21:27:31zdsavbtt_: sure it can be done, but its way more complex
21:27:34dom96vbtt_: Better to backup the DB regularly.
21:27:40zdsaand opens up the whole 'hide my post x'
21:27:44zdsaor whatever
21:28:18zdsaaka not a 10 minute job as adding on cascade delete on the fk lol
21:28:37vikatondef-, what does it take to get multi-threaded async?
21:29:00vikatonalso, does anyone here have a windows machine at hand?
21:29:07Araqvikaton: an Araq with more time
21:29:20zdsavbtt_: plus there is probably backups of the forums, if a mistake is made
21:29:27zdsa(or at least i hope so)
21:29:44*taesoo joined #nim
21:30:27vikatonAraq: I have never seen him before :/
21:30:43vbtt_sure, imo deleted column is preferable to recovery from backups, but it's understandably more work and not essential
21:30:50*Matthias247 quit (Quit: Matthias247)
21:31:20dom96zdsa: I still need to set up proper automated backups...
21:31:22vbtt_btw, what would it take to integrate something like http://lthread.readthedocs.org/ with nim? unfortunately it's linux/fbsd only.
21:32:21zdsadom96: at least its just a sqlite .db, easier to setup backups compared to mysql or something
21:32:41dom96zdsa: yeah, just a case of copying the file.
21:33:38zdsacronjob gzip scp gg
21:36:22Araqvbtt_: these things can work out with the newish setupForeignThreadGC()
21:37:07*vendethiel quit (Ping timeout: 265 seconds)
21:37:36vbtt_Araq: ah awesome - does that handle gc handing for stacks that are not on the actual stack? (if that made sense)
21:37:53zdsadom96: if i ever want to add some meta data for javascript in nimforums html are you ok with that? aka data-post-id, data-last-post-id etc etc, i was thinking of maybe implementing a client-side 'new messages' and be able to mark what you have read, or sticky posts or whatever else someone might want, but client side.
21:38:06Araqvbtt_: kind of, it setups a thread local GC for a thread that hasn't been created by Nim's runtime.
21:38:23zdsajust something i MIGHt work on someday
21:38:28Araqvbtt_: then you only need to enforce .gcsafe'ty and things work out
21:38:47dom96zdsa: why client-side? I'm planning on implementing that feature but server-side :)
21:39:06dom96zdsa: well, I guess I can see why you might wanna do it client-side.
21:39:20dom96although, some cookies might be enough
21:39:27zdsadom96: lol sure then, it just doesnt new table or anything, and be customizable
21:39:37dom96bbl
21:39:42zdsao i was using key-value storage
21:40:02zdsabetter than cookies
21:40:11*taesoo quit (Ping timeout: 250 seconds)
21:40:32*pregressive quit ()
21:44:54*Matthias247 joined #nim
21:54:54*saml quit (Read error: Connection reset by peer)
22:06:38*vendethiel joined #nim
22:07:41*vikaton quit ()
22:21:03*boop is now known as boopisaway
22:26:59*boydgreenfield quit (Quit: boydgreenfield)
22:28:55*boopisaway is now known as boop
22:34:13flaviuAraq: I already made a list of dead branches in the nim repo: https://github.com/Araq/Nim/issues/1893
22:35:32Araqflaviu: yeah but not my point, I have a couple of unfinished / unpushed branches
22:35:48flaviuah, I see.
22:36:51*boydgreenfield joined #nim
22:47:06*gsingh93_ joined #nim
22:47:10*vendethiel quit (Ping timeout: 272 seconds)
22:51:00*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:51:35*^aurora^ joined #nim
22:51:41*Trustable quit (Remote host closed the connection)
22:51:55*filcuc quit (Quit: Konversation terminated!)
22:53:51*BlaXpirit quit (Quit: Quit Konversation)
22:55:22*boydgreenfield quit (Quit: boydgreenfield)
23:01:33*Matthias247 quit (Read error: Connection reset by peer)
23:02:01*Kingsquee joined #nim
23:09:32zdsahttp://www.reddit.com/r/programming/comments/36qvbm/jon_blow_jai_custom_allocators_and_threads/
23:09:51zdsathe 'context' allocator looks like a good idea
23:11:05zdsachange memory management style in the caller, transparent to the callee
23:11:15zdsagenius
23:22:27*Jesin joined #nim
23:37:43Araqzdsa: pretty sure this has been reinvented hundreds of times by now
23:38:49zdsaprobably, i just had never seen it at the language level
23:39:20*Jesin quit (Quit: Leaving)
23:39:54*Jesin joined #nim
23:40:10*Axord joined #nim
23:42:46Araqzdsa: how does he do it "at the language level"? all I see is function calls
23:45:58*Siecje quit (Read error: Connection reset by peer)
23:47:09zdsaAraw: its all because of the implicit 'context' var
23:47:53zdsaAraq: ^
23:49:04zdsahttps://www.youtube.com/watch?v=ciGQCP6HgqI&feature=youtu.be&t=910 timestamp where he explains it
23:49:48*boop is now known as boopisaway
23:50:48Araqzdsa: that's a global or thread local "context" variable
23:51:03Araqthat's still no "language feature"
23:51:23Araqin fact, that's what you can do in delphi since 1985 or something
23:53:53vbtt_are global allocators really that useful? i would think type specific allocators are more useful
23:54:33vbtt_also, does jai have a gc? how do cross pool references work?
23:54:56AraqNim can do very similar things thanks to its thread local GCs
23:55:32Araqyou can disable the GC for your thread that should only do bump pointer allocations and then discard the memory at the end
23:55:41vbtt_ah awesome
23:55:47vbtt_didn't realize that's possible
23:56:02*Axord left #nim ("Death by grue.")
23:56:10Araqwell I guess I need to export the proc to do that but still
23:56:17vbtt_hehe ok
23:56:23Araqit's not hard
23:56:47Araqto answer your question: no his language has no GC because "GCs are bad"
23:57:17vbtt_oh, sounds like a lot of fun ;-)
23:58:00vbtt_so are you mostly bugfixing these days, Araq?
23:58:37*^aurora^ quit (Ping timeout: 264 seconds)
23:59:30Araqdepends on what "these days" means
23:59:43AraqI won't get into serious bugfixing before June
23:59:45reactormonkAraq, btw, how would you code https://pastee.org/d58gs ?